MENU navbar-image

Introduction

This API is designed to let you do (almost) everything you can do from the timetoreply portal programmatically via API requests

Authentication

We currently only support personal access tokens for authentication. These can be obtained by logging into a company administrator account on timetoreply, visiting the API section, and clicking "Generate Access Token". Tokens have an expiration time of 1 year.

All requests made to our api with these generated access tokens will be assigned to the user that generated the access token.

You can create as many access tokens as you like, and you can revoke their access at any time from the same page when you created them.

Rate Limiting

Our API is rate limited to 30 requests per minute and the lower limit of 900 requests per hour.

If you exceed these limits, responses will get a Retry-After header which indicates how long you should wait until trying again.

Dates and Times

Most Dates and Times are converted into the timezone of your user profile on the fly before being sent to you.

Reply times are usually returned in seconds, but many reply times also have a "Friendly Reply Time" which is a formatted string.

Nomenclature

General

Responses have been generally optimized for use in our own front-end, and as such, the structure of responses might not be exactly as you expect. It may also contain information that is not relevant to you. Unfortunately we currently do not offer a method to get exactly the information you want, but we may create this functionality in future.

Authenticating requests

To authenticate requests, include an Authorization header with the value "Bearer {YOUR_AUTH_KEY}".

All authenticated endpoints are marked with a requires authentication badge in the documentation below.

You can generate your token by logging in and visiting TOOLS > API

Reports

Overview

Overview - Report

requires authentication

Overview Report Data

Example request:
const url = new URL(
    "https://portal.timetoreply.com/api/reports/overview"
);

const params = {
    "from": "2020-01-01",
    "to": "2020-01-08",
    "model": "My Company",
    "model_type": "Internal",
    "exclude_cc": "0",
    "model_com": "1",
    "model_type_com": "Contact Group",
    "exclude_cc_com": "0",
    "exclusive": "0",
    "label[0]": "INBOX",
    "thread_type": "inbound,outbound,internal",
    "thread_status": "internal,await-customer,closed,await-agent",
    "has_replies": "hasReplies,hasForwards,hasNoRepliesOrForwards",
    "classification": "calculating,first,reply,reply-all,forward",
    "messageType": "inbound,outbound,internal",
    "replies_over": "15",
    "message_replies_over": "15",
    "no_reply_for": "15",
    "sort_by": "threads.total",
    "direction": "desc",
    "per_page_agents": "2",
    "page_agents": "1",
    "per_page_contacts": "2",
    "page_contacts": "1",
    "per_page_domains": "2",
    "page_domains": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/reports/overview';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'from' => '2020-01-01',
            'to' => '2020-01-08',
            'model' => 'My Company',
            'model_type' => 'Internal',
            'exclude_cc' => '0',
            'model_com' => '1',
            'model_type_com' => 'Contact Group',
            'exclude_cc_com' => '0',
            'exclusive' => '0',
            'label[0]' => 'INBOX',
            'thread_type' => 'inbound,outbound,internal',
            'thread_status' => 'internal,await-customer,closed,await-agent',
            'has_replies' => 'hasReplies,hasForwards,hasNoRepliesOrForwards',
            'classification' => 'calculating,first,reply,reply-all,forward',
            'messageType' => 'inbound,outbound,internal',
            'replies_over' => '15',
            'message_replies_over' => '15',
            'no_reply_for' => '15',
            'sort_by' => 'threads.total',
            'direction' => 'desc',
            'per_page_agents' => '2',
            'page_agents' => '1',
            'per_page_contacts' => '2',
            'page_contacts' => '1',
            'per_page_domains' => '2',
            'page_domains' => '1',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://portal.timetoreply.com/api/reports/overview?from=2020-01-01&to=2020-01-08&model=My+Company&model_type=Internal&exclude_cc=&model_com=1&model_type_com=Contact+Group&exclude_cc_com=&exclusive=&label[]=INBOX&thread_type=inbound%2Coutbound%2Cinternal&thread_status=internal%2Cawait-customer%2Cclosed%2Cawait-agent&has_replies=hasReplies%2ChasForwards%2ChasNoRepliesOrForwards&classification=calculating%2Cfirst%2Creply%2Creply-all%2Cforward&messageType=inbound%2Coutbound%2Cinternal&replies_over=15&message_replies_over=15&no_reply_for=15&sort_by=threads.total&direction=desc&per_page_agents=2&page_agents=1&per_page_contacts=2&page_contacts=1&per_page_domains=2&page_domains=1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
tracking-events: []
 

{
    "stats": {
        "threads": {
            "total": 1,
            "internal": 0,
            "inbound": 0,
            "outbound": 1,
            "sent_internally": 0,
            "await_customer": 0,
            "await_agent": 1,
            "closed": 0,
            "have_replies": 0,
            "have_replies_from_agents": 0,
            "have_no_replies_from_agents": 1,
            "completionRatio": {
                "ratio": 0,
                "numerator": 0,
                "denominator": 0
            },
            "handledRate": {
                "rate": 0,
                "numerator": 0,
                "denominator": 1
            },
            "labels": {
                "total": 7,
                "list": [
                    {
                        "key": "CATEGORY_PERSONAL",
                        "doc_count": 1
                    },
                    {
                        "key": "CATEGORY_PROMOTIONS",
                        "doc_count": 1
                    },
                    {
                        "key": "IMPORTANT",
                        "doc_count": 1
                    },
                    {
                        "key": "INBOX",
                        "doc_count": 1
                    },
                    {
                        "key": "SENT",
                        "doc_count": 1
                    },
                    {
                        "key": "STARRED",
                        "doc_count": 1
                    },
                    {
                        "key": "UNREAD",
                        "doc_count": 1
                    }
                ]
            },
            "messages_per_conversations_avg": 1,
            "messages_sent_per_conversations_avg": 1,
            "messages_received_per_conversations_avg": 0,
            "top_labels": ""
        },
        "messages": {
            "count": 1,
            "initial": 1,
            "replies": 0,
            "forward": 0,
            "follow_up": 0,
            "received": {
                "count": 0,
                "initial": 0,
                "replies": 0,
                "forward": 0,
                "follow_up": 0,
                "initial_replies": 0,
                "dayOfWeek": {
                    "Monday": 0,
                    "Tuesday": 0,
                    "Wednesday": 0,
                    "Thursday": 0,
                    "Friday": 0,
                    "Saturday": 0,
                    "Sunday": 0
                },
                "hourOfDay": {
                    "00:00": 0,
                    "01:00": 0,
                    "02:00": 0,
                    "03:00": 0,
                    "04:00": 0,
                    "05:00": 0,
                    "06:00": 0,
                    "07:00": 0,
                    "08:00": 0,
                    "09:00": 0,
                    "10:00": 0,
                    "11:00": 0,
                    "12:00": 0,
                    "13:00": 0,
                    "14:00": 0,
                    "15:00": 0,
                    "16:00": 0,
                    "17:00": 0,
                    "18:00": 0,
                    "19:00": 0,
                    "20:00": 0,
                    "21:00": 0,
                    "22:00": 0,
                    "23:00": 0
                },
                "avg_wait": "N/A",
                "avg_wait_raw": null,
                "avg_first_wait": "N/A",
                "avg_first_wait_raw": null
            },
            "sent": {
                "count": 1,
                "initial": 1,
                "replies": 0,
                "forward": 0,
                "follow_up": 0,
                "initial_replies": 0,
                "dayOfWeek": {
                    "Monday": 1,
                    "Tuesday": 0,
                    "Wednesday": 0,
                    "Thursday": 0,
                    "Friday": 0,
                    "Saturday": 0,
                    "Sunday": 0
                },
                "hourOfDay": {
                    "00:00": 0,
                    "01:00": 0,
                    "02:00": 0,
                    "03:00": 0,
                    "04:00": 0,
                    "05:00": 0,
                    "06:00": 0,
                    "07:00": 0,
                    "08:00": 0,
                    "09:00": 0,
                    "10:00": 0,
                    "11:00": 0,
                    "12:00": 0,
                    "13:00": 0.13,
                    "14:00": 0,
                    "15:00": 0,
                    "16:00": 0,
                    "17:00": 0,
                    "18:00": 0,
                    "19:00": 0,
                    "20:00": 0,
                    "21:00": 0,
                    "22:00": 0,
                    "23:00": 0
                }
            }
        },
        "overallTTR": {
            "friendly": "N/A",
            "raw": null,
            "friendly_no_business": "N/A",
            "raw_no_business": null,
            "deviation_friendly": "N/A",
            "deviation_raw": null,
            "deviation_friendly_no_business": "N/A",
            "deviation_raw_no_business": null,
            "median_friendly": "N/A",
            "median_raw": null,
            "median_friendly_no_business": "N/A",
            "median_raw_no_business": null,
            "consistency_score": "N/A",
            "consistency_score_no_business": "N/A",
            "percentileRanks": [
                {
                    "key": "2h:0m",
                    "value": 0,
                    "count": 0
                },
                {
                    "key": "4h:0m",
                    "value": 0,
                    "count": 0
                },
                {
                    "key": "8h:0m",
                    "value": 0,
                    "count": 0
                },
                {
                    "key": "16h:0m",
                    "value": 0,
                    "count": 0
                }
            ],
            "percentileRanksRaw": [
                {
                    "key": "2h:0m",
                    "value": 0,
                    "count": 0
                },
                {
                    "key": "4h:0m",
                    "value": 0,
                    "count": 0
                },
                {
                    "key": "8h:0m",
                    "value": 0,
                    "count": 0
                },
                {
                    "key": "16h:0m",
                    "value": 0,
                    "count": 0
                }
            ],
            "within_sla": 0,
            "within_sla_percentage_friendly": "N/A",
            "sla_breach": 0,
            "sla_breach_percentage_friendly": "N/A",
            "excluded_from_sla": 0,
            "excluded_from_sla_percentage_friendly": "N/A"
        },
        "initialTTR": {
            "friendly": "N/A",
            "raw": null,
            "friendly_no_business": "N/A",
            "raw_no_business": null,
            "deviation_friendly": "N/A",
            "deviation_raw": null,
            "deviation_friendly_no_business": "N/A",
            "deviation_raw_no_business": null,
            "median_friendly": "N/A",
            "median_raw": null,
            "median_friendly_no_business": "N/A",
            "median_raw_no_business": null,
            "consistency_score": "N/A",
            "consistency_score_no_business": "N/A",
            "percentileRanks": [
                {
                    "key": "1h:0m",
                    "value": 0,
                    "count": 0
                },
                {
                    "key": "2h:0m",
                    "value": 0,
                    "count": 0
                },
                {
                    "key": "4h:0m",
                    "value": 0,
                    "count": 0
                },
                {
                    "key": "8h:0m",
                    "value": 0,
                    "count": 0
                }
            ],
            "percentileRanksRaw": [
                {
                    "key": "1h:0m",
                    "value": 0,
                    "count": 0
                },
                {
                    "key": "2h:0m",
                    "value": 0,
                    "count": 0
                },
                {
                    "key": "4h:0m",
                    "value": 0,
                    "count": 0
                },
                {
                    "key": "8h:0m",
                    "value": 0,
                    "count": 0
                }
            ],
            "within_sla": 0,
            "within_sla_percentage_friendly": "N/A",
            "sla_breach": 0,
            "sla_breach_percentage_friendly": "N/A",
            "excluded_from_sla": 0,
            "excluded_from_sla_percentage_friendly": "N/A"
        },
        "overallTTF": {
            "friendly": "N/A",
            "raw": null,
            "friendly_no_business": "N/A",
            "raw_no_business": null
        },
        "overallTTC": {
            "friendly": "N/A",
            "raw": null,
            "friendly_no_business": "N/A",
            "raw_no_business": null,
            "percentileRanks": [
                {
                    "key": "12h:0m",
                    "value": 0,
                    "count": 0
                },
                {
                    "key": "24h:0m",
                    "value": 0,
                    "count": 0
                },
                {
                    "key": "48h:0m",
                    "value": 0,
                    "count": 0
                },
                {
                    "key": "96h:0m",
                    "value": 0,
                    "count": 0
                }
            ],
            "percentileRanksRaw": [
                {
                    "key": "12h:0m",
                    "value": 0,
                    "count": 0
                },
                {
                    "key": "24h:0m",
                    "value": 0,
                    "count": 0
                },
                {
                    "key": "48h:0m",
                    "value": 0,
                    "count": 0
                },
                {
                    "key": "96h:0m",
                    "value": 0,
                    "count": 0
                }
            ],
            "within_sla": 0,
            "within_sla_percentage_friendly": "N/A",
            "sla_breach": 0,
            "sla_breach_percentage_friendly": "N/A"
        },
        "dailyStats": [
            {
                "timestamp": 1707091200000,
                "date": "Mon, 5th Feb",
                "messages": {
                    "sent": 1,
                    "forward": 0,
                    "reply": 0,
                    "received": 0
                },
                "overallTTR": {
                    "raw": null,
                    "raw_no_business": null
                },
                "overallTTF": {
                    "raw": null,
                    "raw_no_business": null
                },
                "initialTTR": {
                    "raw": null,
                    "raw_no_business": null
                },
                "threads": {
                    "total": 0,
                    "have_replies_from_agents": 0,
                    "have_no_replies_from_agents": 0,
                    "completionRatio": null
                }
            }
        ]
    },
    "all_agent_stats": {
        "maxima": {
            "name": "Total",
            "threads.total": 1,
            "threads.internal": 0,
            "threads.inbound": 0,
            "threads.outbound": 1,
            "threads.sent_internally": 0,
            "threads.await_customer": 0,
            "threads.await_agent": 1,
            "threads.closed": 0,
            "threads.have_replies": 0,
            "threads.handledRate.rate": 0,
            "threads.messages_per_conversations_avg": 1,
            "threads.messages_sent_per_conversations_avg": 1,
            "threads.messages_received_per_conversations_avg": 0,
            "threads.top_labels": "",
            "messages.received.count": 0,
            "messages.received.initial": 0,
            "messages.received.replies": 0,
            "messages.received.forward": 0,
            "messages.received.follow_up": 0,
            "messages.received.avg_first_wait": "N/A",
            "messages.received.avg_wait": "N/A",
            "messages.sent.count": 1,
            "messages.sent.initial": 1,
            "messages.sent.replies": 0,
            "messages.sent.forward": 0,
            "messages.sent.follow_up": 0,
            "overallTTR.friendly": "N/A",
            "overallTTR.friendly_no_business": "N/A",
            "overallTTR.deviation_friendly": "N/A",
            "overallTTR.deviation_friendly_no_business": "N/A",
            "overallTTR.median_friendly": "N/A",
            "overallTTR.median_friendly_no_business": "N/A",
            "overallTTR.consistency_score": "N/A",
            "overallTTR.consistency_score_no_business": "N/A",
            "initialTTR.friendly": "N/A",
            "initialTTR.friendly_no_business": "N/A",
            "initialTTR.deviation_friendly": "N/A",
            "initialTTR.deviation_friendly_no_business": "N/A",
            "initialTTR.median_friendly": "N/A",
            "initialTTR.median_friendly_no_business": "N/A",
            "initialTTR.consistency_score": "N/A",
            "initialTTR.consistency_score_no_business": "N/A",
            "overallTTC.friendly": "N/A",
            "overallTTC.friendly_no_business": "N/A",
            "overallTTF.friendly": "N/A",
            "overallTTF.friendly_no_business": "N/A"
        },
        "data": {
            "current_page": 1,
            "data": [
                {
                    "name": "[email protected]",
                    "threads": {
                        "total": 1,
                        "internal": 0,
                        "inbound": 0,
                        "outbound": 1,
                        "sent_internally": 0,
                        "await_customer": 0,
                        "await_agent": 1,
                        "closed": 0,
                        "have_replies": 0,
                        "have_initial_replies": 0,
                        "handledRate": {
                            "rate": 0
                        },
                        "top_labels": [
                            "CATEGORY_PERSONAL",
                            "CATEGORY_PROMOTIONS",
                            "IMPORTANT",
                            "INBOX",
                            "SENT"
                        ],
                        "messages_per_conversations_avg": 1,
                        "messages_received_per_conversations_avg": 0,
                        "messages_sent_per_conversations_avg": 1
                    },
                    "messages": {
                        "count": 0,
                        "initial": 0,
                        "replies": 0,
                        "forward": 0,
                        "follow_up": 0,
                        "sent": {
                            "count": 1,
                            "initial": 1,
                            "replies": 0,
                            "forward": 0,
                            "follow_up": 0,
                            "initial_replies": 0,
                            "dailyStats": []
                        },
                        "received": {
                            "count": 0,
                            "initial": 0,
                            "replies": 0,
                            "forward": 0,
                            "follow_up": 0,
                            "initial_replies": 0,
                            "dailyStats": null,
                            "avg_wait": "N/A",
                            "avg_wait_raw": null,
                            "avg_first_wait": "N/A",
                            "avg_first_wait_raw": null
                        }
                    },
                    "overallTTR": {
                        "friendly": "N/A",
                        "raw": null,
                        "friendly_no_business": "N/A",
                        "raw_no_business": null,
                        "deviation_friendly": "N/A",
                        "deviation_raw": null,
                        "deviation_friendly_no_business": "N/A",
                        "deviation_raw_no_business": null,
                        "median_friendly": "N/A",
                        "median_raw": null,
                        "median_friendly_no_business": "N/A",
                        "median_raw_no_business": null,
                        "consistency_score": "N/A",
                        "consistency_score_no_business": "N/A",
                        "percentileRanks": [
                            {
                                "key": "2h:0m",
                                "value": 0,
                                "count": 0
                            },
                            {
                                "key": "4h:0m",
                                "value": 0,
                                "count": 0
                            },
                            {
                                "key": "8h:0m",
                                "value": 0,
                                "count": 0
                            },
                            {
                                "key": "16h:0m",
                                "value": 0,
                                "count": 0
                            }
                        ],
                        "percentileRanksRaw": [
                            {
                                "key": "2h:0m",
                                "value": 0,
                                "count": 0
                            },
                            {
                                "key": "4h:0m",
                                "value": 0,
                                "count": 0
                            },
                            {
                                "key": "8h:0m",
                                "value": 0,
                                "count": 0
                            },
                            {
                                "key": "16h:0m",
                                "value": 0,
                                "count": 0
                            }
                        ],
                        "within_sla": 0,
                        "within_sla_percentage_friendly": "N/A",
                        "sla_breach": 0,
                        "sla_breach_percentage_friendly": "N/A",
                        "excluded_from_sla": 0,
                        "excluded_from_sla_percentage_friendly": "N/A"
                    },
                    "overallTTF": {
                        "friendly": "N/A",
                        "raw": null,
                        "friendly_no_business": "N/A",
                        "raw_no_business": null
                    },
                    "initialTTR": {
                        "friendly": "N/A",
                        "raw": null,
                        "friendly_no_business": "N/A",
                        "raw_no_business": null,
                        "deviation_friendly": "N/A",
                        "deviation_raw": null,
                        "deviation_friendly_no_business": "N/A",
                        "deviation_raw_no_business": null,
                        "median_friendly": "N/A",
                        "median_raw": null,
                        "median_friendly_no_business": "N/A",
                        "median_raw_no_business": null,
                        "consistency_score": "N/A",
                        "consistency_score_no_business": "N/A",
                        "percentileRanks": [
                            {
                                "key": "1h:0m",
                                "value": 0,
                                "count": 0
                            },
                            {
                                "key": "2h:0m",
                                "value": 0,
                                "count": 0
                            },
                            {
                                "key": "4h:0m",
                                "value": 0,
                                "count": 0
                            },
                            {
                                "key": "8h:0m",
                                "value": 0,
                                "count": 0
                            }
                        ],
                        "percentileRanksRaw": [
                            {
                                "key": "1h:0m",
                                "value": 0,
                                "count": 0
                            },
                            {
                                "key": "2h:0m",
                                "value": 0,
                                "count": 0
                            },
                            {
                                "key": "4h:0m",
                                "value": 0,
                                "count": 0
                            },
                            {
                                "key": "8h:0m",
                                "value": 0,
                                "count": 0
                            }
                        ],
                        "within_sla": 0,
                        "within_sla_percentage_friendly": "N/A",
                        "sla_breach": 0,
                        "sla_breach_percentage_friendly": "N/A",
                        "excluded_from_sla": 0,
                        "excluded_from_sla_percentage_friendly": "N/A"
                    },
                    "overallTTC": {
                        "friendly": "N/A",
                        "raw": null,
                        "friendly_no_business": "N/A",
                        "raw_no_business": null,
                        "within_sla": 0,
                        "within_sla_percentage_friendly": "N/A",
                        "sla_breach": 0,
                        "sla_breach_percentage_friendly": "N/A",
                        "percentileRanks": [
                            {
                                "key": "12h:0m",
                                "value": 0,
                                "count": 0
                            },
                            {
                                "key": "24h:0m",
                                "value": 0,
                                "count": 0
                            },
                            {
                                "key": "48h:0m",
                                "value": 0,
                                "count": 0
                            },
                            {
                                "key": "96h:0m",
                                "value": 0,
                                "count": 0
                            }
                        ],
                        "percentileRanksRaw": [
                            {
                                "key": "12h:0m",
                                "value": 0,
                                "count": 0
                            },
                            {
                                "key": "24h:0m",
                                "value": 0,
                                "count": 0
                            },
                            {
                                "key": "48h:0m",
                                "value": 0,
                                "count": 0
                            },
                            {
                                "key": "96h:0m",
                                "value": 0,
                                "count": 0
                            }
                        ]
                    }
                },
                {
                    "name": "[email protected]",
                    "threads": {
                        "total": 0,
                        "internal": 0,
                        "inbound": 0,
                        "outbound": 0,
                        "sent_internally": 0,
                        "await_customer": 0,
                        "await_agent": 0,
                        "closed": 0,
                        "have_replies": 0,
                        "have_initial_replies": 0,
                        "handledRate": {
                            "rate": 0
                        },
                        "top_labels": [],
                        "messages_per_conversations_avg": "N/A",
                        "messages_received_per_conversations_avg": "N/A",
                        "messages_sent_per_conversations_avg": "N/A"
                    },
                    "messages": {
                        "count": 0,
                        "initial": 0,
                        "replies": 0,
                        "forward": 0,
                        "follow_up": 0,
                        "sent": {
                            "count": 0,
                            "initial": 0,
                            "replies": 0,
                            "forward": 0,
                            "follow_up": 0,
                            "initial_replies": 0,
                            "dailyStats": null
                        },
                        "received": {
                            "count": 0,
                            "initial": 0,
                            "replies": 0,
                            "forward": 0,
                            "follow_up": 0,
                            "initial_replies": 0,
                            "dailyStats": null,
                            "avg_wait": "N/A",
                            "avg_wait_raw": null,
                            "avg_first_wait": "N/A",
                            "avg_first_wait_raw": null
                        }
                    },
                    "overallTTR": {
                        "friendly": "N/A",
                        "raw": null,
                        "friendly_no_business": "N/A",
                        "raw_no_business": null,
                        "deviation_friendly": "N/A",
                        "deviation_raw": null,
                        "deviation_friendly_no_business": "N/A",
                        "deviation_raw_no_business": null,
                        "median_friendly": "N/A",
                        "median_raw": null,
                        "median_friendly_no_business": "N/A",
                        "median_raw_no_business": null,
                        "consistency_score": "N/A",
                        "consistency_score_no_business": "N/A",
                        "percentileRanks": [],
                        "percentileRanksRaw": [],
                        "within_sla": 0,
                        "within_sla_percentage_friendly": "N/A",
                        "sla_breach": 0,
                        "sla_breach_percentage_friendly": "N/A",
                        "excluded_from_sla": 0,
                        "excluded_from_sla_percentage_friendly": "N/A"
                    },
                    "overallTTF": {
                        "friendly": "N/A",
                        "raw": null,
                        "friendly_no_business": "N/A",
                        "raw_no_business": null
                    },
                    "initialTTR": {
                        "friendly": "N/A",
                        "raw": null,
                        "friendly_no_business": "N/A",
                        "raw_no_business": null,
                        "deviation_friendly": "N/A",
                        "deviation_raw": null,
                        "deviation_friendly_no_business": "N/A",
                        "deviation_raw_no_business": null,
                        "median_friendly": "N/A",
                        "median_raw": null,
                        "median_friendly_no_business": "N/A",
                        "median_raw_no_business": null,
                        "consistency_score": "N/A",
                        "consistency_score_no_business": "N/A",
                        "percentileRanks": [],
                        "percentileRanksRaw": [],
                        "within_sla": 0,
                        "within_sla_percentage_friendly": "N/A",
                        "sla_breach": 0,
                        "sla_breach_percentage_friendly": "N/A",
                        "excluded_from_sla": 0,
                        "excluded_from_sla_percentage_friendly": "N/A"
                    },
                    "overallTTC": {
                        "friendly": "N/A",
                        "raw": null,
                        "friendly_no_business": "N/A",
                        "raw_no_business": null,
                        "within_sla": 0,
                        "within_sla_percentage_friendly": "N/A",
                        "sla_breach": 0,
                        "sla_breach_percentage_friendly": "N/A"
                    }
                }
            ],
            "first_page_url": "https://portal.timetoreply.com/api/reports/overview?model=My%20Company&model_type=Internal&model_com=1&model_type_com=Contact%20Group&direction=desc&per_page_agents=2&page_agents=1&per_page_contacts=2&page_contacts=1&per_page_domains=2&page_domains=1&per_page=2&page=1",
            "from": 1,
            "last_page": 3,
            "last_page_url": "https://portal.timetoreply.com/api/reports/overview?model=My%20Company&model_type=Internal&model_com=1&model_type_com=Contact%20Group&direction=desc&per_page_agents=2&page_agents=1&per_page_contacts=2&page_contacts=1&per_page_domains=2&page_domains=1&per_page=2&page=3",
            "links": [
                {
                    "url": null,
                    "label": "« Previous",
                    "active": false
                },
                {
                    "url": "https://portal.timetoreply.com/api/reports/overview?model=My%20Company&model_type=Internal&model_com=1&model_type_com=Contact%20Group&direction=desc&per_page_agents=2&page_agents=1&per_page_contacts=2&page_contacts=1&per_page_domains=2&page_domains=1&per_page=2&page=1",
                    "label": "1",
                    "active": true
                },
                {
                    "url": "https://portal.timetoreply.com/api/reports/overview?model=My%20Company&model_type=Internal&model_com=1&model_type_com=Contact%20Group&direction=desc&per_page_agents=2&page_agents=1&per_page_contacts=2&page_contacts=1&per_page_domains=2&page_domains=1&per_page=2&page=2",
                    "label": "2",
                    "active": false
                },
                {
                    "url": "https://portal.timetoreply.com/api/reports/overview?model=My%20Company&model_type=Internal&model_com=1&model_type_com=Contact%20Group&direction=desc&per_page_agents=2&page_agents=1&per_page_contacts=2&page_contacts=1&per_page_domains=2&page_domains=1&per_page=2&page=3",
                    "label": "3",
                    "active": false
                },
                {
                    "url": "https://portal.timetoreply.com/api/reports/overview?model=My%20Company&model_type=Internal&model_com=1&model_type_com=Contact%20Group&direction=desc&per_page_agents=2&page_agents=1&per_page_contacts=2&page_contacts=1&per_page_domains=2&page_domains=1&per_page=2&page=2",
                    "label": "Next »",
                    "active": false
                }
            ],
            "next_page_url": "https://portal.timetoreply.com/api/reports/overview?model=My%20Company&model_type=Internal&model_com=1&model_type_com=Contact%20Group&direction=desc&per_page_agents=2&page_agents=1&per_page_contacts=2&page_contacts=1&per_page_domains=2&page_domains=1&per_page=2&page=2",
            "path": "https://portal.timetoreply.com/api/reports/overview",
            "per_page": 2,
            "prev_page_url": null,
            "to": 2,
            "total": 5
        }
    },
    "all_domain_stats": {
        "maxima": [],
        "data": {
            "current_page": 1,
            "data": [],
            "first_page_url": "https://portal.timetoreply.com/api/reports/overview?model=My%20Company&model_type=Internal&model_com=1&model_type_com=Contact%20Group&direction=desc&per_page_agents=2&page_agents=1&per_page_contacts=2&page_contacts=1&per_page_domains=2&page_domains=1&per_page=2&page=1",
            "from": null,
            "last_page": 1,
            "last_page_url": "https://portal.timetoreply.com/api/reports/overview?model=My%20Company&model_type=Internal&model_com=1&model_type_com=Contact%20Group&direction=desc&per_page_agents=2&page_agents=1&per_page_contacts=2&page_contacts=1&per_page_domains=2&page_domains=1&per_page=2&page=1",
            "links": [
                {
                    "url": null,
                    "label": "« Previous",
                    "active": false
                },
                {
                    "url": "https://portal.timetoreply.com/api/reports/overview?model=My%20Company&model_type=Internal&model_com=1&model_type_com=Contact%20Group&direction=desc&per_page_agents=2&page_agents=1&per_page_contacts=2&page_contacts=1&per_page_domains=2&page_domains=1&per_page=2&page=1",
                    "label": "1",
                    "active": true
                },
                {
                    "url": null,
                    "label": "Next »",
                    "active": false
                }
            ],
            "next_page_url": null,
            "path": "https://portal.timetoreply.com/api/reports/overview",
            "per_page": 2,
            "prev_page_url": null,
            "to": null,
            "total": 0
        }
    },
    "all_customer_stats": {
        "maxima": [],
        "data": {
            "current_page": 1,
            "data": [
                {
                    "name": "[email protected]",
                    "threads": {
                        "total": 1,
                        "internal": 0,
                        "inbound": 0,
                        "outbound": 1,
                        "sent_internally": 0,
                        "await_customer": 0,
                        "await_agent": 1,
                        "closed": 0,
                        "have_replies": 0,
                        "have_initial_replies": 0,
                        "handledRate": {
                            "rate": 0
                        },
                        "top_labels": [],
                        "messages_per_conversations_avg": 1,
                        "messages_received_per_conversations_avg": 0,
                        "messages_sent_per_conversations_avg": 1
                    },
                    "messages": {
                        "count": 0,
                        "initial": 0,
                        "replies": 0,
                        "forward": 0,
                        "follow_up": 0,
                        "sent": {
                            "count": 1,
                            "initial": 1,
                            "replies": 0,
                            "forward": 0,
                            "follow_up": 0,
                            "initial_replies": 0,
                            "dailyStats": []
                        },
                        "received": {
                            "count": 0,
                            "initial": 0,
                            "replies": 0,
                            "forward": 0,
                            "follow_up": 0,
                            "initial_replies": 0,
                            "dailyStats": null,
                            "avg_wait": "N/A",
                            "avg_wait_raw": null,
                            "avg_first_wait": "N/A",
                            "avg_first_wait_raw": null
                        }
                    },
                    "overallTTR": {
                        "friendly": "N/A",
                        "raw": null,
                        "friendly_no_business": "N/A",
                        "raw_no_business": null,
                        "deviation_friendly": "N/A",
                        "deviation_raw": null,
                        "deviation_friendly_no_business": "N/A",
                        "deviation_raw_no_business": null,
                        "median_friendly": "N/A",
                        "median_raw": null,
                        "median_friendly_no_business": "N/A",
                        "median_raw_no_business": null,
                        "consistency_score": "N/A",
                        "consistency_score_no_business": "N/A",
                        "percentileRanks": [
                            {
                                "key": "2h:0m",
                                "value": 0,
                                "count": 0
                            },
                            {
                                "key": "4h:0m",
                                "value": 0,
                                "count": 0
                            },
                            {
                                "key": "8h:0m",
                                "value": 0,
                                "count": 0
                            },
                            {
                                "key": "16h:0m",
                                "value": 0,
                                "count": 0
                            }
                        ],
                        "percentileRanksRaw": [
                            {
                                "key": "2h:0m",
                                "value": 0,
                                "count": 0
                            },
                            {
                                "key": "4h:0m",
                                "value": 0,
                                "count": 0
                            },
                            {
                                "key": "8h:0m",
                                "value": 0,
                                "count": 0
                            },
                            {
                                "key": "16h:0m",
                                "value": 0,
                                "count": 0
                            }
                        ],
                        "within_sla": 0,
                        "within_sla_percentage_friendly": "N/A",
                        "sla_breach": 0,
                        "sla_breach_percentage_friendly": "N/A",
                        "excluded_from_sla": 0,
                        "excluded_from_sla_percentage_friendly": "N/A"
                    },
                    "overallTTF": {
                        "friendly": "N/A",
                        "raw": null,
                        "friendly_no_business": "N/A",
                        "raw_no_business": null
                    },
                    "initialTTR": {
                        "friendly": "N/A",
                        "raw": null,
                        "friendly_no_business": "N/A",
                        "raw_no_business": null,
                        "deviation_friendly": "N/A",
                        "deviation_raw": null,
                        "deviation_friendly_no_business": "N/A",
                        "deviation_raw_no_business": null,
                        "median_friendly": "N/A",
                        "median_raw": null,
                        "median_friendly_no_business": "N/A",
                        "median_raw_no_business": null,
                        "consistency_score": "N/A",
                        "consistency_score_no_business": "N/A",
                        "percentileRanks": [
                            {
                                "key": "1h:0m",
                                "value": 0,
                                "count": 0
                            },
                            {
                                "key": "2h:0m",
                                "value": 0,
                                "count": 0
                            },
                            {
                                "key": "4h:0m",
                                "value": 0,
                                "count": 0
                            },
                            {
                                "key": "8h:0m",
                                "value": 0,
                                "count": 0
                            }
                        ],
                        "percentileRanksRaw": [
                            {
                                "key": "1h:0m",
                                "value": 0,
                                "count": 0
                            },
                            {
                                "key": "2h:0m",
                                "value": 0,
                                "count": 0
                            },
                            {
                                "key": "4h:0m",
                                "value": 0,
                                "count": 0
                            },
                            {
                                "key": "8h:0m",
                                "value": 0,
                                "count": 0
                            }
                        ],
                        "within_sla": 0,
                        "within_sla_percentage_friendly": "N/A",
                        "sla_breach": 0,
                        "sla_breach_percentage_friendly": "N/A",
                        "excluded_from_sla": 0,
                        "excluded_from_sla_percentage_friendly": "N/A"
                    },
                    "overallTTC": {
                        "friendly": "N/A",
                        "raw": null,
                        "friendly_no_business": "N/A",
                        "raw_no_business": null,
                        "within_sla": 0,
                        "within_sla_percentage_friendly": "N/A",
                        "sla_breach": 0,
                        "sla_breach_percentage_friendly": "N/A",
                        "percentileRanks": [
                            {
                                "key": "12h:0m",
                                "value": 0,
                                "count": 0
                            },
                            {
                                "key": "24h:0m",
                                "value": 0,
                                "count": 0
                            },
                            {
                                "key": "48h:0m",
                                "value": 0,
                                "count": 0
                            },
                            {
                                "key": "96h:0m",
                                "value": 0,
                                "count": 0
                            }
                        ],
                        "percentileRanksRaw": [
                            {
                                "key": "12h:0m",
                                "value": 0,
                                "count": 0
                            },
                            {
                                "key": "24h:0m",
                                "value": 0,
                                "count": 0
                            },
                            {
                                "key": "48h:0m",
                                "value": 0,
                                "count": 0
                            },
                            {
                                "key": "96h:0m",
                                "value": 0,
                                "count": 0
                            }
                        ]
                    }
                },
                {
                    "name": "[email protected]",
                    "threads": {
                        "total": 0,
                        "internal": 0,
                        "inbound": 0,
                        "outbound": 0,
                        "sent_internally": 0,
                        "await_customer": 0,
                        "await_agent": 0,
                        "closed": 0,
                        "have_replies": 0,
                        "have_initial_replies": 0,
                        "handledRate": {
                            "rate": 0
                        },
                        "top_labels": [],
                        "messages_per_conversations_avg": "N/A",
                        "messages_received_per_conversations_avg": "N/A",
                        "messages_sent_per_conversations_avg": "N/A"
                    },
                    "messages": {
                        "count": 0,
                        "initial": 0,
                        "replies": 0,
                        "forward": 0,
                        "follow_up": 0,
                        "sent": {
                            "count": 0,
                            "initial": 0,
                            "replies": 0,
                            "forward": 0,
                            "follow_up": 0,
                            "initial_replies": 0,
                            "dailyStats": null
                        },
                        "received": {
                            "count": 0,
                            "initial": 0,
                            "replies": 0,
                            "forward": 0,
                            "follow_up": 0,
                            "initial_replies": 0,
                            "dailyStats": null,
                            "avg_wait": "N/A",
                            "avg_wait_raw": null,
                            "avg_first_wait": "N/A",
                            "avg_first_wait_raw": null
                        }
                    },
                    "overallTTR": {
                        "friendly": "N/A",
                        "raw": null,
                        "friendly_no_business": "N/A",
                        "raw_no_business": null,
                        "deviation_friendly": "N/A",
                        "deviation_raw": null,
                        "deviation_friendly_no_business": "N/A",
                        "deviation_raw_no_business": null,
                        "median_friendly": "N/A",
                        "median_raw": null,
                        "median_friendly_no_business": "N/A",
                        "median_raw_no_business": null,
                        "consistency_score": "N/A",
                        "consistency_score_no_business": "N/A",
                        "percentileRanks": [],
                        "percentileRanksRaw": [],
                        "within_sla": 0,
                        "within_sla_percentage_friendly": "N/A",
                        "sla_breach": 0,
                        "sla_breach_percentage_friendly": "N/A",
                        "excluded_from_sla": 0,
                        "excluded_from_sla_percentage_friendly": "N/A"
                    },
                    "overallTTF": {
                        "friendly": "N/A",
                        "raw": null,
                        "friendly_no_business": "N/A",
                        "raw_no_business": null
                    },
                    "initialTTR": {
                        "friendly": "N/A",
                        "raw": null,
                        "friendly_no_business": "N/A",
                        "raw_no_business": null,
                        "deviation_friendly": "N/A",
                        "deviation_raw": null,
                        "deviation_friendly_no_business": "N/A",
                        "deviation_raw_no_business": null,
                        "median_friendly": "N/A",
                        "median_raw": null,
                        "median_friendly_no_business": "N/A",
                        "median_raw_no_business": null,
                        "consistency_score": "N/A",
                        "consistency_score_no_business": "N/A",
                        "percentileRanks": [],
                        "percentileRanksRaw": [],
                        "within_sla": 0,
                        "within_sla_percentage_friendly": "N/A",
                        "sla_breach": 0,
                        "sla_breach_percentage_friendly": "N/A",
                        "excluded_from_sla": 0,
                        "excluded_from_sla_percentage_friendly": "N/A"
                    },
                    "overallTTC": {
                        "friendly": "N/A",
                        "raw": null,
                        "friendly_no_business": "N/A",
                        "raw_no_business": null,
                        "within_sla": 0,
                        "within_sla_percentage_friendly": "N/A",
                        "sla_breach": 0,
                        "sla_breach_percentage_friendly": "N/A"
                    }
                }
            ],
            "first_page_url": "https://portal.timetoreply.com/api/reports/overview?model=My%20Company&model_type=Internal&model_com=1&model_type_com=Contact%20Group&direction=desc&per_page_agents=2&page_agents=1&per_page_contacts=2&page_contacts=1&per_page_domains=2&page_domains=1&per_page=2&page=1",
            "from": 1,
            "last_page": 3,
            "last_page_url": "https://portal.timetoreply.com/api/reports/overview?model=My%20Company&model_type=Internal&model_com=1&model_type_com=Contact%20Group&direction=desc&per_page_agents=2&page_agents=1&per_page_contacts=2&page_contacts=1&per_page_domains=2&page_domains=1&per_page=2&page=3",
            "links": [
                {
                    "url": null,
                    "label": "« Previous",
                    "active": false
                },
                {
                    "url": "https://portal.timetoreply.com/api/reports/overview?model=My%20Company&model_type=Internal&model_com=1&model_type_com=Contact%20Group&direction=desc&per_page_agents=2&page_agents=1&per_page_contacts=2&page_contacts=1&per_page_domains=2&page_domains=1&per_page=2&page=1",
                    "label": "1",
                    "active": true
                },
                {
                    "url": "https://portal.timetoreply.com/api/reports/overview?model=My%20Company&model_type=Internal&model_com=1&model_type_com=Contact%20Group&direction=desc&per_page_agents=2&page_agents=1&per_page_contacts=2&page_contacts=1&per_page_domains=2&page_domains=1&per_page=2&page=2",
                    "label": "2",
                    "active": false
                },
                {
                    "url": "https://portal.timetoreply.com/api/reports/overview?model=My%20Company&model_type=Internal&model_com=1&model_type_com=Contact%20Group&direction=desc&per_page_agents=2&page_agents=1&per_page_contacts=2&page_contacts=1&per_page_domains=2&page_domains=1&per_page=2&page=3",
                    "label": "3",
                    "active": false
                },
                {
                    "url": "https://portal.timetoreply.com/api/reports/overview?model=My%20Company&model_type=Internal&model_com=1&model_type_com=Contact%20Group&direction=desc&per_page_agents=2&page_agents=1&per_page_contacts=2&page_contacts=1&per_page_domains=2&page_domains=1&per_page=2&page=2",
                    "label": "Next »",
                    "active": false
                }
            ],
            "next_page_url": "https://portal.timetoreply.com/api/reports/overview?model=My%20Company&model_type=Internal&model_com=1&model_type_com=Contact%20Group&direction=desc&per_page_agents=2&page_agents=1&per_page_contacts=2&page_contacts=1&per_page_domains=2&page_domains=1&per_page=2&page=2",
            "path": "https://portal.timetoreply.com/api/reports/overview",
            "per_page": 2,
            "prev_page_url": null,
            "to": 2,
            "total": 5
        }
    },
    "args": {
        "model": {
            "icon": "building",
            "id": null,
            "model_type": "Internal",
            "name": "My Company",
            "value": "My Company"
        },
        "modelCom": {
            "id": 1,
            "name": "Top Revenue Customers",
            "email_usernames": [
                "[email protected]",
                "[email protected]"
            ],
            "customer_domains": [
                "cormier.com",
                "hills.com"
            ],
            "model_type": "Contact Group",
            "icon": "user-friends"
        }
    },
    "mailbox_names": {
        "data": {
            "[email protected]": "Kareem Bogisich",
            "[email protected]": "Fred Heidenreich",
            "[email protected]": "Top Revenue Customers",
            "[email protected]": "Top Revenue Customers"
        },
        "enabled": false
    },
    "show_comparisons_in_leaderboard": true
}
 

Request   

GET api/reports/overview

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

from   string  optional  

The start date of your request in the format "YYYY-MM-DD". Must be less than or equal to "to". Example: 2020-01-01

to   string  optional  

The end date of your request in the format "YYYY-MM-DD". Must be greater than or equal to "from". Example: 2020-01-08

model   string  optional  

The ID, Name, email address or domain you want statistics for. Use the models endpoint to get a list. Example: My Company

model_type   string  optional  

Model Type of the model being queried. Use "Contact" for email address and domain. Example: Internal

exclude_cc   boolean  optional  

Should we exclude CC messages from the statistics. Example: false

model_com   string  optional  

Model Communicating With, same as Model, except now for who/what the Model is communicating with. Example: 1

model_type_com   string  optional  

Model Type of the model you are communicating with. Use "Contact" for email address and domain. Example: Contact Group

exclude_cc_com   boolean  optional  

Should we exclude CC messages from the statistics for the communicating with model. Example: false

exclusive   boolean  optional  

Should we only focus on statistics where exclusively Model and ModelCom were involved?. Example: false

search   string  optional  

Search a specific email subject line (warning this is very slow!).

label   string[]  optional  

Label, if your mail provider supports labels/categories, you can filter your results using them.

thread_type   string  optional  

A comma separated list (no spaces) of any combination of the following: inbound,outbound,internal. Example: inbound,outbound,internal

thread_status   string  optional  

A comma separated list (no spaces) of any combination of the following: internal,await-customer,closed,await-agent. Example: internal,await-customer,closed,await-agent

has_replies   string  optional  

A comma separated list (no spaces) of any combination of the following: hasReplies,hasForwards,hasNoRepliesOrForwards. Example: hasReplies,hasForwards,hasNoRepliesOrForwards

classification   string  optional  

A comma separated list (no spaces) of any combination of the following: calculating,first,reply,reply-all,forward,follow-up. Example: calculating,first,reply,reply-all,forward

messageType   string  optional  

A comma separated list (no spaces) of any combination of the following: inbound,outbound,internal. Example: inbound,outbound,internal

replies_over   integer  optional  

Limit results to conversations with first reply times over X minutes. Should not be used at same time as message_replies_over. Example: 15

message_replies_over   integer  optional  

Limit results to messages where the reply time was over X minutes. Should not be used at same time as replies_over. Example: 15

no_reply_for   integer  optional  

Limit results to messages that have not had a reply for at least X minutes. Example: 15

sort_by   string  optional  

Field Name to sort agents by. Defaults to threads.total. Example: threads.total

direction   string  optional  

Direction in which to sort paginated results. Must be either asc or desc. Example: desc

per_page_agents   integer  optional  

For paginated results, how many results per page. Max 200. Example: 2

page_agents   integer  optional  

For paginated results, which page to get. Example: 1

per_page_contacts   integer  optional  

For paginated results, how many results per page. Max 200. Example: 2

page_contacts   integer  optional  

For paginated results, which page to get. Example: 1

per_page_domains   integer  optional  

For paginated results, how many results per page. Max 200. Example: 2

page_domains   integer  optional  

For paginated results, which page to get. Example: 1

Productivity

Productivity - Report

requires authentication

Productivity Report Data

Example request:
const url = new URL(
    "https://portal.timetoreply.com/api/reports/productivity"
);

const params = {
    "date": "2020-01-01",
    "model": "My Company",
    "model_type": "Internal",
    "model_com": "1",
    "model_type_com": "Contact Group",
    "label[0]": "INBOX",
    "per_page": "2",
    "sort_by": "threads.total",
    "direction": "desc",
    "page": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/reports/productivity';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'date' => '2020-01-01',
            'model' => 'My Company',
            'model_type' => 'Internal',
            'model_com' => '1',
            'model_type_com' => 'Contact Group',
            'label[0]' => 'INBOX',
            'per_page' => '2',
            'sort_by' => 'threads.total',
            'direction' => 'desc',
            'page' => '1',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://portal.timetoreply.com/api/reports/productivity?date=2020-01-01&model=My+Company&model_type=Internal&model_com=1&model_type_com=Contact+Group&label[]=INBOX&per_page=2&sort_by=threads.total&direction=desc&page=1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
tracking-events: []
 

{
    "email_volumes": {
        "columns": [
            {
                "field": "name",
                "label": "Mailbox",
                "sortable": true,
                "visible": true,
                "subheading": "Overall:",
                "meta": {
                    "hasEmails": true,
                    "tooltip": "These are the email accounts you're currently tracking."
                },
                "headerClass": "has-tooltip"
            },
            {
                "field": "messages_received_count",
                "label": "Emails Received",
                "sortable": true,
                "visible": true,
                "subheading": "0",
                "meta": {
                    "hasSpark": true,
                    "tooltip": "The total number of emails received for this period, regardless of business hours."
                },
                "headerClass": "has-tooltip"
            },
            {
                "field": "messages_sent_count",
                "label": "Emails Sent",
                "sortable": true,
                "visible": true,
                "subheading": "0",
                "meta": {
                    "hasSpark": true,
                    "tooltip": "The total number of emails sent for the period regardless of business hours."
                },
                "headerClass": "has-tooltip"
            },
            {
                "field": "messages_sent_replies_percent",
                "label": "% Replies Sent",
                "sortable": true,
                "visible": true,
                "subheading": "0",
                "meta": {
                    "tooltip": "The percentage of sent emails that were replies, regardless of business hours.",
                    "subheadingPercentage": 0
                },
                "headerClass": "has-tooltip"
            },
            {
                "field": "messages_sent_initial_percent",
                "label": "% New Emails Sent",
                "sortable": true,
                "visible": true,
                "subheading": "0",
                "meta": {
                    "tooltip": "The percentage of sent emails that were new emails (i.e. not a reply or a forward) regardless of business hours.",
                    "subheadingPercentage": 0
                },
                "headerClass": "has-tooltip"
            },
            {
                "field": "messages_sent_forwards_percent",
                "label": "% Forwards Sent",
                "sortable": true,
                "visible": true,
                "subheading": "0",
                "meta": {
                    "tooltip": "The percentage of sent emails that were emails that were forwards regardless of business hours.",
                    "subheadingPercentage": 0
                },
                "headerClass": "has-tooltip"
            },
            {
                "field": "messages_sent_follow_ups_percent",
                "label": "% Follow-Ups Sent",
                "sortable": true,
                "visible": true,
                "subheading": "0",
                "meta": {
                    "tooltip": "The percentage of sent emails that were emails that were follow-ups regardless of business hours.",
                    "subheadingPercentage": 0
                },
                "headerClass": "has-tooltip"
            }
        ],
        "data": [
            {
                "name": "[email protected]",
                "messages_received_count": {
                    "display": 0,
                    "spark": {
                        "Tue 24th Dec": 0,
                        "Wed 25th Dec": 0,
                        "Thu 26th Dec": 0,
                        "Fri 27th Dec": 0,
                        "Sat 28th Dec": 0,
                        "Sun 29th Dec": 0,
                        "Mon 30th Dec": 0,
                        "Tue 31st Dec": 0,
                        "Wed 1st Jan": 0
                    }
                },
                "messages_sent_count": {
                    "display": 0,
                    "spark": {
                        "Tue 24th Dec": 0,
                        "Wed 25th Dec": 0,
                        "Thu 26th Dec": 0,
                        "Fri 27th Dec": 0,
                        "Sat 28th Dec": 0,
                        "Sun 29th Dec": 0,
                        "Mon 30th Dec": 0,
                        "Tue 31st Dec": 0,
                        "Wed 1st Jan": 0
                    }
                },
                "messages_sent_replies_percent": {
                    "display": 0,
                    "percentage": 0
                },
                "messages_sent_initial_percent": {
                    "display": 0,
                    "percentage": 0
                },
                "messages_sent_forwards_percent": {
                    "display": 0,
                    "percentage": 0
                },
                "messages_sent_follow_ups_percent": {
                    "display": 0,
                    "percentage": 0
                }
            },
            {
                "name": "[email protected]",
                "messages_received_count": {
                    "display": 0,
                    "spark": {
                        "Tue 24th Dec": 0,
                        "Wed 25th Dec": 0,
                        "Thu 26th Dec": 0,
                        "Fri 27th Dec": 0,
                        "Sat 28th Dec": 0,
                        "Sun 29th Dec": 0,
                        "Mon 30th Dec": 0,
                        "Tue 31st Dec": 0,
                        "Wed 1st Jan": 0
                    }
                },
                "messages_sent_count": {
                    "display": 0,
                    "spark": {
                        "Tue 24th Dec": 0,
                        "Wed 25th Dec": 0,
                        "Thu 26th Dec": 0,
                        "Fri 27th Dec": 0,
                        "Sat 28th Dec": 0,
                        "Sun 29th Dec": 0,
                        "Mon 30th Dec": 0,
                        "Tue 31st Dec": 0,
                        "Wed 1st Jan": 0
                    }
                },
                "messages_sent_replies_percent": {
                    "display": 0,
                    "percentage": 0
                },
                "messages_sent_initial_percent": {
                    "display": 0,
                    "percentage": 0
                },
                "messages_sent_forwards_percent": {
                    "display": 0,
                    "percentage": 0
                },
                "messages_sent_follow_ups_percent": {
                    "display": 0,
                    "percentage": 0
                }
            }
        ],
        "default_sort": [
            "messages_sent_count",
            "desc"
        ],
        "default_sort_direction": "desc",
        "loading": false,
        "per_page": 2,
        "total": 5,
        "page": 1
    },
    "activity": {
        "columns": [
            {
                "field": "name",
                "label": "Mailbox",
                "sortable": true,
                "visible": true,
                "subheading": "Overall:",
                "meta": {
                    "hasEmails": true,
                    "tooltip": "These are the email accounts you're currently tracking."
                },
                "headerClass": "has-tooltip"
            },
            {
                "field": "first_activity",
                "label": "Time of First Activity",
                "sortable": true,
                "visible": true,
                "meta": {
                    "tooltip": "The time that the first email was sent by the mailbox on the date you are viewing for the report. (uses the mailbox's own timezone if available)"
                },
                "headerClass": "has-tooltip"
            },
            {
                "field": "last_activity",
                "label": "Time of Last Activity",
                "sortable": true,
                "visible": true,
                "meta": {
                    "tooltip": "The time that the last email was sent by the mailbox on the date you are viewing for the report. (uses the mailbox's own timezone if available)"
                },
                "headerClass": "has-tooltip"
            },
            {
                "field": "in_business_hours",
                "label": "Sent Within Business Hours",
                "sortable": true,
                "visible": true,
                "meta": {
                    "tooltip": "The total number of emails that were sent during business hours for the date you are viewing the report. (uses the mailbox's own timezone if available)",
                    "subheadingPercentage": 0
                },
                "headerClass": "has-tooltip"
            },
            {
                "field": "out_business_hours",
                "label": "Sent Outside Business Hours",
                "sortable": true,
                "visible": true,
                "meta": {
                    "tooltip": "The total number of emails that were sent outside business hours for the date you are viewing the report. (uses the mailbox's own timezone if available)",
                    "subheadingPercentage": 0
                },
                "headerClass": "has-tooltip"
            },
            {
                "field": "received_per_hour",
                "label": "Average Emails Received Per Hour",
                "sortable": true,
                "visible": true,
                "subheading": "0",
                "meta": {
                    "tooltip": "The average number of emails that were received by the mailbox per hour (ignoring business hours) for the date you are viewing the report."
                },
                "headerClass": "has-tooltip"
            },
            {
                "field": "sent_per_hour",
                "label": "Average Emails Sent Per Hour",
                "sortable": true,
                "visible": true,
                "subheading": "0",
                "meta": {
                    "tooltip": "The average number of emails that were sent by the mailbox per hour (ignoring business hours) for the date you are viewing the report."
                },
                "headerClass": "has-tooltip"
            }
        ],
        "data": [
            {
                "name": "[email protected]",
                "first_activity": "N/A",
                "last_activity": "N/A",
                "in_business_hours": {
                    "display": 0,
                    "percentage": 0
                },
                "out_business_hours": {
                    "display": 0,
                    "percentage": 0
                },
                "received_per_hour": "0",
                "sent_per_hour": "0"
            },
            {
                "name": "[email protected]",
                "first_activity": "N/A",
                "last_activity": "N/A",
                "in_business_hours": {
                    "display": 0,
                    "percentage": 0
                },
                "out_business_hours": {
                    "display": 0,
                    "percentage": 0
                },
                "received_per_hour": "0",
                "sent_per_hour": "0"
            }
        ],
        "default_sort": [
            "first_activity",
            "asc"
        ],
        "default_sort_direction": "desc",
        "loading": false,
        "per_page": 2,
        "total": 5,
        "page": 1
    },
    "conversations": {
        "columns": [
            {
                "field": "name",
                "label": "Mailbox",
                "sortable": true,
                "visible": true,
                "subheading": "Overall:",
                "meta": {
                    "hasEmails": true,
                    "tooltip": "These are the email accounts you're currently tracking."
                },
                "headerClass": "has-tooltip"
            },
            {
                "field": "threads_count",
                "label": "Conversations",
                "sortable": true,
                "visible": true,
                "subheading": "0",
                "meta": {
                    "tooltip": "The total number of conversations (or email threads) that each mailbox was part of for the date range you are viewing. A conversation is a group of emails received and sent that all form part of the same thread."
                },
                "headerClass": "has-tooltip"
            },
            {
                "field": "threads_inbound",
                "label": "Inbound Conversations",
                "sortable": true,
                "visible": true,
                "subheading": "0",
                "meta": {
                    "tooltip": "The number of conversations that were started by someone outside of your company, i.e. the first email in the conversation was from someone outside of your company.",
                    "subheadingPercentage": 0
                },
                "headerClass": "has-tooltip"
            },
            {
                "field": "threads_outbound",
                "label": "Outbound Conversations",
                "sortable": true,
                "visible": true,
                "subheading": "0",
                "meta": {
                    "tooltip": "The number of conversations that were started by someone in your company, i.e. the first email in the conversation was from someone inside of your company to someone external to your company.",
                    "subheadingPercentage": 0
                },
                "headerClass": "has-tooltip"
            },
            {
                "field": "threads_internal",
                "label": "Internal Conversations",
                "sortable": true,
                "visible": true,
                "subheading": "0",
                "meta": {
                    "tooltip": "The number of conversations where all participants have been in your company.",
                    "subheadingPercentage": 0
                },
                "headerClass": "has-tooltip"
            },
            {
                "field": "threads_await_agent",
                "label": "Conversations waiting for a reply",
                "sortable": true,
                "visible": true,
                "subheading": "0",
                "meta": {
                    "tooltip": "The last email was from someone external, so the ball's in your court to reply. For better accuracy, this should be used in conjunction with our \"close conversations\" function that allows you to mark conversations that have been completed or no longer require a reply as \"closed\".",
                    "subheadingPercentage": 0
                },
                "headerClass": "has-tooltip",
                "cellClass": "has-background-white-ter"
            },
            {
                "field": "threads_closed",
                "label": "Conversations closed",
                "sortable": true,
                "visible": true,
                "subheading": "0",
                "meta": {
                    "tooltip": "The number of conversations that the mailbox that you are viewing has been part of that have been marked as \"closed\" using our \"close conversations\" functionality. You can find this under TOOLS > SETTINGS > COMPANY > CLOSE CONVERSATION SETTINGS",
                    "subheadingPercentage": 0
                },
                "headerClass": "has-tooltip",
                "cellClass": "has-background-white-ter"
            }
        ],
        "data": [
            {
                "name": "[email protected]",
                "threads_count": 0,
                "threads_inbound": {
                    "display": 0,
                    "percentage": 0
                },
                "threads_outbound": {
                    "display": 0,
                    "percentage": 0
                },
                "threads_internal": {
                    "display": 0,
                    "percentage": 0
                },
                "threads_await_agent": {
                    "display": 0,
                    "percentage": 0
                },
                "threads_closed": {
                    "display": 0,
                    "percentage": 0
                }
            },
            {
                "name": "[email protected]",
                "threads_count": 0,
                "threads_inbound": {
                    "display": 0,
                    "percentage": 0
                },
                "threads_outbound": {
                    "display": 0,
                    "percentage": 0
                },
                "threads_internal": {
                    "display": 0,
                    "percentage": 0
                },
                "threads_await_agent": {
                    "display": 0,
                    "percentage": 0
                },
                "threads_closed": {
                    "display": 0,
                    "percentage": 0
                }
            }
        ],
        "default_sort": [
            "threads_count",
            "desc"
        ],
        "default_sort_direction": "desc",
        "loading": false,
        "per_page": 2,
        "total": 5,
        "page": 1
    },
    "average_reply_times": {
        "columns": [
            {
                "field": "name",
                "label": "Mailbox",
                "sortable": true,
                "visible": true,
                "subheading": "Overall:",
                "meta": {
                    "hasEmails": true,
                    "tooltip": "These are the email accounts you're currently tracking."
                },
                "headerClass": "has-tooltip"
            },
            {
                "field": "initialTTR7Days",
                "label": "7 day avg. First Reply Time",
                "centered": true,
                "sortable": true,
                "visible": true,
                "subheading": "N/A",
                "meta": {
                    "tooltip": "This is your average First Reply time for the last 7 days prior to the date you have selected for the report."
                },
                "headerClass": "has-tooltip"
            },
            {
                "field": "initialTTR",
                "label": "Current avg. First Reply Time",
                "centered": true,
                "sortable": true,
                "visible": true,
                "subheading": "N/A",
                "meta": {
                    "hasComparison": true,
                    "tooltip": "The average First Reply Time is the average time it takes to reply to the first email in a new email conversation. It only looks at the first reply that goes back to the conversation starter, the first \"from\". This average takes business hours into account and only calculates the time that has elapsed during business hours when calculating the average."
                },
                "headerClass": "has-tooltip"
            },
            {
                "field": "overallTTR7Days",
                "label": "7 days avg. Overall Reply Time",
                "centered": true,
                "sortable": true,
                "visible": true,
                "subheading": "N/A",
                "meta": {
                    "tooltip": "This is your average overall reply time for the last 7 days prior to the date you have selected for this report."
                },
                "headerClass": "has-tooltip"
            },
            {
                "field": "overallTTR",
                "label": "Current avg. Overall Reply Time",
                "centered": true,
                "sortable": true,
                "visible": true,
                "subheading": "N/A",
                "meta": {
                    "hasComparison": true,
                    "tooltip": "The average Overall Reply Time is the average time it takes to reply to any email. First and all subsequent replies are included in the avg. Overall Reply Time. This average takes business hours into account, and only calculates the time that has elapsed during business hours when calculating the average."
                },
                "headerClass": "has-tooltip"
            }
        ],
        "data": [
            {
                "name": "[email protected]",
                "initialTTR7Days": "N/A",
                "initialTTR": {
                    "display": "N/A",
                    "comparison": {
                        "value": "N/A",
                        "improved": true,
                        "separatedColumns": true
                    }
                },
                "overallTTR7Days": "N/A",
                "overallTTR": {
                    "display": "N/A",
                    "comparison": {
                        "value": "N/A",
                        "improved": true,
                        "separatedColumns": true
                    }
                }
            },
            {
                "name": "[email protected]",
                "initialTTR7Days": "N/A",
                "initialTTR": {
                    "display": "N/A",
                    "comparison": {
                        "value": "N/A",
                        "improved": true,
                        "separatedColumns": true
                    }
                },
                "overallTTR7Days": "N/A",
                "overallTTR": {
                    "display": "N/A",
                    "comparison": {
                        "value": "N/A",
                        "improved": true,
                        "separatedColumns": true
                    }
                }
            }
        ],
        "default_sort": [
            "initialTTR",
            "asc"
        ],
        "default_sort_direction": "asc",
        "loading": false,
        "per_page": 2,
        "total": 5,
        "page": 1
    },
    "responsiveness": {
        "columns": [
            {
                "field": "name",
                "label": "Mailbox",
                "sortable": true,
                "visible": true,
                "subheading": "Overall:",
                "meta": {
                    "hasEmails": true,
                    "tooltip": "These are the email accounts you're currently tracking."
                },
                "headerClass": "has-tooltip"
            },
            {
                "field": "replies_count",
                "label": "Replies Sent",
                "sortable": true,
                "visible": true,
                "subheading": "0",
                "meta": {
                    "tooltip": "The total replies that were sent (used to calculate reply times), regardless of business hours."
                },
                "headerClass": "has-tooltip"
            },
            {
                "field": "replies_under_7200",
                "label": "Replies under 2h:0m",
                "sortable": true,
                "visible": true,
                "subheading": "0",
                "meta": {
                    "tooltip": "Percentage of replies that happened in under 2h:0m (takes business hours into account)",
                    "subheadingPercentage": 0
                },
                "headerClass": "has-tooltip"
            },
            {
                "field": "replies_under_14400",
                "label": "Replies under 4h:0m",
                "sortable": true,
                "visible": true,
                "subheading": "0",
                "meta": {
                    "tooltip": "Percentage of replies that happened in under 4h:0m (takes business hours into account)",
                    "subheadingPercentage": 0
                },
                "headerClass": "has-tooltip"
            },
            {
                "field": "replies_under_28800",
                "label": "Replies under 8h:0m",
                "sortable": true,
                "visible": true,
                "subheading": "0",
                "meta": {
                    "tooltip": "Percentage of replies that happened in under 8h:0m (takes business hours into account)",
                    "subheadingPercentage": 0
                },
                "headerClass": "has-tooltip"
            },
            {
                "field": "replies_under_57600",
                "label": "Replies under 16h:0m",
                "sortable": true,
                "visible": true,
                "subheading": "0",
                "meta": {
                    "tooltip": "Percentage of replies that happened in under 16h:0m (takes business hours into account)",
                    "subheadingPercentage": 0
                },
                "headerClass": "has-tooltip"
            }
        ],
        "data": [
            {
                "name": "[email protected]",
                "replies_count": 0,
                "replies_under_7200": {
                    "display": 0,
                    "percentage": 0
                },
                "replies_under_14400": {
                    "display": 0,
                    "percentage": 0
                },
                "replies_under_28800": {
                    "display": 0,
                    "percentage": 0
                },
                "replies_under_57600": {
                    "display": 0,
                    "percentage": 0
                }
            },
            {
                "name": "[email protected]",
                "replies_count": 0,
                "replies_under_7200": {
                    "display": 0,
                    "percentage": 0
                },
                "replies_under_14400": {
                    "display": 0,
                    "percentage": 0
                },
                "replies_under_28800": {
                    "display": 0,
                    "percentage": 0
                },
                "replies_under_57600": {
                    "display": 0,
                    "percentage": 0
                }
            }
        ],
        "default_sort": [
            "replies_under_14400",
            "desc"
        ],
        "default_sort_direction": "desc",
        "loading": false,
        "per_page": 2,
        "total": 5,
        "page": 1
    },
    "stats": {
        "messages": {
            "received": {
                "hourOfDay": []
            },
            "sent": {
                "hourOfDay": []
            }
        }
    },
    "page": 1,
    "total": 5,
    "args": {
        "model": {
            "icon": "building",
            "id": null,
            "model_type": "Internal",
            "name": "My Company",
            "value": "My Company"
        },
        "modelCom": {
            "id": 1,
            "name": "Top Revenue Customers",
            "email_usernames": [
                "[email protected]",
                "[email protected]"
            ],
            "customer_domains": [
                "cormier.com",
                "hills.com"
            ],
            "model_type": "Contact Group",
            "icon": "user-friends"
        }
    }
}
 

Request   

GET api/reports/productivity

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

date   string  optional  

The date of your request in the format "YYYY-MM-DD". Example: 2020-01-01

model   string  optional  

The ID, Name, email address or domain you want statistics for. Use the models endpoint to get a list. Example: My Company

model_type   string  optional  

Model Type of the model being queried. Use "Contact" for email address and domain. Example: Internal

model_com   string  optional  

Model Communicating With, same as Model, except now for who/what the Model is communicating with. Example: 1

model_type_com   string  optional  

Model Type of the model you are communicating with. Use "Contact" for email address and domain. Example: Contact Group

label   string[]  optional  

Label, if your mail provider supports labels/categories, you can filter your results using them.

per_page   integer  optional  

For paginated results, how many results per page. Max 200. Example: 2

sort_by   string  optional  

Field Name to sort agents by. Defaults to threads.total. Example: threads.total

direction   string  optional  

Direction in which to sort paginated results. Must be either asc or desc. Example: desc

page   integer  optional  

For paginated results, which page to get. Example: 1

Comparative

Comparative - Report

requires authentication

Comparative Report Data

Example request:
const url = new URL(
    "https://portal.timetoreply.com/api/reports/comparative"
);

const params = {
    "from": "2020-01-01",
    "to": "2020-01-08",
    "model": "My Company",
    "model_type": "Internal",
    "exclude_cc": "0",
    "model_com": "1",
    "model_type_com": "Contact Group",
    "exclude_cc_com": "0",
    "exclusive": "0",
    "label[0]": "INBOX",
    "thread_type": "inbound,outbound,internal",
    "thread_status": "internal,await-customer,closed,await-agent",
    "has_replies": "hasReplies,hasForwards,hasNoRepliesOrForwards",
    "classification": "calculating,first,reply,reply-all,forward",
    "messageType": "inbound,outbound,internal",
    "replies_over": "15",
    "message_replies_over": "15",
    "no_reply_for": "15",
    "per_page": "2",
    "direction": "desc",
    "page": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/reports/comparative';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'from' => '2020-01-01',
            'to' => '2020-01-08',
            'model' => 'My Company',
            'model_type' => 'Internal',
            'exclude_cc' => '0',
            'model_com' => '1',
            'model_type_com' => 'Contact Group',
            'exclude_cc_com' => '0',
            'exclusive' => '0',
            'label[0]' => 'INBOX',
            'thread_type' => 'inbound,outbound,internal',
            'thread_status' => 'internal,await-customer,closed,await-agent',
            'has_replies' => 'hasReplies,hasForwards,hasNoRepliesOrForwards',
            'classification' => 'calculating,first,reply,reply-all,forward',
            'messageType' => 'inbound,outbound,internal',
            'replies_over' => '15',
            'message_replies_over' => '15',
            'no_reply_for' => '15',
            'per_page' => '2',
            'direction' => 'desc',
            'page' => '1',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://portal.timetoreply.com/api/reports/comparative?from=2020-01-01&to=2020-01-08&model=My+Company&model_type=Internal&exclude_cc=&model_com=1&model_type_com=Contact+Group&exclude_cc_com=&exclusive=&label[]=INBOX&thread_type=inbound%2Coutbound%2Cinternal&thread_status=internal%2Cawait-customer%2Cclosed%2Cawait-agent&has_replies=hasReplies%2ChasForwards%2ChasNoRepliesOrForwards&classification=calculating%2Cfirst%2Creply%2Creply-all%2Cforward&messageType=inbound%2Coutbound%2Cinternal&replies_over=15&message_replies_over=15&no_reply_for=15&per_page=2&direction=desc&page=1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
tracking-events: []
 

{
    "replyTimePercentages": {
        "categories": [
            "[email protected]",
            "[email protected]"
        ],
        "series": [
            {
                "name": "Replies in under 2h:0m",
                "data": [
                    0,
                    0
                ],
                "index": 3,
                "legendIndex": 0,
                "stringKey": "2h:0m"
            },
            {
                "name": "Replies in under 4h:0m",
                "data": [
                    0,
                    0
                ],
                "index": 2,
                "legendIndex": 1,
                "stringKey": "4h:0m"
            },
            {
                "name": "Replies in under 8h:0m",
                "data": [
                    0,
                    0
                ],
                "index": 1,
                "legendIndex": 2,
                "stringKey": "8h:0m"
            },
            {
                "name": "Replies in under 16h:0m",
                "data": [
                    0,
                    0
                ],
                "index": 0,
                "legendIndex": 3,
                "stringKey": "16h:0m"
            }
        ]
    },
    "forwardTimePercentages": {
        "categories": [
            "[email protected]",
            "[email protected]"
        ],
        "series": [
            {
                "name": "Forwards in under 2h:0m",
                "data": [
                    0,
                    0
                ],
                "index": 3,
                "legendIndex": 0,
                "stringKey": "2h:0m"
            },
            {
                "name": "Forwards in under 4h:0m",
                "data": [
                    0,
                    0
                ],
                "index": 2,
                "legendIndex": 1,
                "stringKey": "4h:0m"
            },
            {
                "name": "Forwards in under 8h:0m",
                "data": [
                    0,
                    0
                ],
                "index": 1,
                "legendIndex": 2,
                "stringKey": "8h:0m"
            },
            {
                "name": "Forwards in under 16h:0m",
                "data": [
                    0,
                    0
                ],
                "index": 0,
                "legendIndex": 3,
                "stringKey": "16h:0m"
            }
        ]
    },
    "agentStats": {
        "initialTTR.raw": [
            {
                "name": "[email protected]",
                "threads": {
                    "total": 1,
                    "internal": 0,
                    "inbound": 0,
                    "outbound": 1,
                    "sent_internally": 0,
                    "await_customer": 0,
                    "await_agent": 0,
                    "closed": 0,
                    "have_replies": 0,
                    "have_initial_replies": 0,
                    "handledRate": {
                        "rate": 0
                    },
                    "top_labels": [],
                    "messages_per_conversations_avg": 1,
                    "messages_received_per_conversations_avg": 0,
                    "messages_sent_per_conversations_avg": 1
                },
                "messages": {
                    "count": 0,
                    "initial": 0,
                    "replies": 0,
                    "forward": 0,
                    "follow_up": 0,
                    "sent": {
                        "count": 1,
                        "initial": 1,
                        "replies": 0,
                        "forward": 0,
                        "follow_up": 0,
                        "initial_replies": 0,
                        "dailyStats": []
                    },
                    "received": {
                        "count": 0,
                        "initial": 0,
                        "replies": 0,
                        "forward": 0,
                        "follow_up": 0,
                        "initial_replies": 0,
                        "dailyStats": null,
                        "avg_wait": "N/A",
                        "avg_wait_raw": null,
                        "avg_first_wait": "N/A",
                        "avg_first_wait_raw": null
                    }
                },
                "overallTTR": {
                    "friendly": "N/A",
                    "raw": null,
                    "friendly_no_business": "N/A",
                    "raw_no_business": null,
                    "deviation_friendly": "N/A",
                    "deviation_raw": null,
                    "deviation_friendly_no_business": "N/A",
                    "deviation_raw_no_business": null,
                    "median_friendly": "N/A",
                    "median_raw": null,
                    "median_friendly_no_business": "N/A",
                    "median_raw_no_business": null,
                    "consistency_score": "N/A",
                    "consistency_score_no_business": "N/A",
                    "percentileRanks": [
                        {
                            "key": "2h:0m",
                            "value": 0,
                            "count": 0
                        },
                        {
                            "key": "4h:0m",
                            "value": 0,
                            "count": 0
                        },
                        {
                            "key": "8h:0m",
                            "value": 0,
                            "count": 0
                        },
                        {
                            "key": "16h:0m",
                            "value": 0,
                            "count": 0
                        }
                    ],
                    "percentileRanksRaw": [],
                    "within_sla": null,
                    "within_sla_percentage_friendly": "N/A",
                    "sla_breach": null,
                    "sla_breach_percentage_friendly": "N/A",
                    "excluded_from_sla": 0,
                    "excluded_from_sla_percentage_friendly": "N/A"
                },
                "overallTTF": {
                    "friendly": "N/A",
                    "raw": null,
                    "friendly_no_business": "N/A",
                    "raw_no_business": null
                },
                "initialTTR": {
                    "friendly": "N/A",
                    "raw": null,
                    "friendly_no_business": "N/A",
                    "raw_no_business": null,
                    "deviation_friendly": "N/A",
                    "deviation_raw": null,
                    "deviation_friendly_no_business": "N/A",
                    "deviation_raw_no_business": null,
                    "median_friendly": "N/A",
                    "median_raw": null,
                    "median_friendly_no_business": "N/A",
                    "median_raw_no_business": null,
                    "consistency_score": "N/A",
                    "consistency_score_no_business": "N/A",
                    "percentileRanks": [],
                    "percentileRanksRaw": [],
                    "within_sla": 0,
                    "within_sla_percentage_friendly": "N/A",
                    "sla_breach": 0,
                    "sla_breach_percentage_friendly": "N/A",
                    "excluded_from_sla": 0,
                    "excluded_from_sla_percentage_friendly": "N/A"
                },
                "overallTTC": {
                    "friendly": "N/A",
                    "raw": null,
                    "friendly_no_business": "N/A",
                    "raw_no_business": null,
                    "within_sla": 0,
                    "within_sla_percentage_friendly": "N/A",
                    "sla_breach": 0,
                    "sla_breach_percentage_friendly": "N/A",
                    "percentileRanks": [],
                    "percentileRanksRaw": []
                }
            },
            {
                "name": "[email protected]",
                "threads": {
                    "total": 0,
                    "internal": 0,
                    "inbound": 0,
                    "outbound": 0,
                    "sent_internally": 0,
                    "await_customer": 0,
                    "await_agent": 0,
                    "closed": 0,
                    "have_replies": 0,
                    "have_initial_replies": 0,
                    "handledRate": {
                        "rate": 0
                    },
                    "top_labels": [],
                    "messages_per_conversations_avg": "N/A",
                    "messages_received_per_conversations_avg": "N/A",
                    "messages_sent_per_conversations_avg": "N/A"
                },
                "messages": {
                    "count": 0,
                    "initial": 0,
                    "replies": 0,
                    "forward": 0,
                    "follow_up": 0,
                    "sent": {
                        "count": 0,
                        "initial": 0,
                        "replies": 0,
                        "forward": 0,
                        "follow_up": 0,
                        "initial_replies": 0,
                        "dailyStats": null
                    },
                    "received": {
                        "count": 0,
                        "initial": 0,
                        "replies": 0,
                        "forward": 0,
                        "follow_up": 0,
                        "initial_replies": 0,
                        "dailyStats": null,
                        "avg_wait": "N/A",
                        "avg_wait_raw": null,
                        "avg_first_wait": "N/A",
                        "avg_first_wait_raw": null
                    }
                },
                "overallTTR": {
                    "friendly": "N/A",
                    "raw": null,
                    "friendly_no_business": "N/A",
                    "raw_no_business": null,
                    "deviation_friendly": "N/A",
                    "deviation_raw": null,
                    "deviation_friendly_no_business": "N/A",
                    "deviation_raw_no_business": null,
                    "median_friendly": "N/A",
                    "median_raw": null,
                    "median_friendly_no_business": "N/A",
                    "median_raw_no_business": null,
                    "consistency_score": "N/A",
                    "consistency_score_no_business": "N/A",
                    "percentileRanks": [],
                    "percentileRanksRaw": [],
                    "within_sla": 0,
                    "within_sla_percentage_friendly": "N/A",
                    "sla_breach": 0,
                    "sla_breach_percentage_friendly": "N/A",
                    "excluded_from_sla": 0,
                    "excluded_from_sla_percentage_friendly": "N/A"
                },
                "overallTTF": {
                    "friendly": "N/A",
                    "raw": null,
                    "friendly_no_business": "N/A",
                    "raw_no_business": null
                },
                "initialTTR": {
                    "friendly": "N/A",
                    "raw": null,
                    "friendly_no_business": "N/A",
                    "raw_no_business": null,
                    "deviation_friendly": "N/A",
                    "deviation_raw": null,
                    "deviation_friendly_no_business": "N/A",
                    "deviation_raw_no_business": null,
                    "median_friendly": "N/A",
                    "median_raw": null,
                    "median_friendly_no_business": "N/A",
                    "median_raw_no_business": null,
                    "consistency_score": "N/A",
                    "consistency_score_no_business": "N/A",
                    "percentileRanks": [],
                    "percentileRanksRaw": [],
                    "within_sla": 0,
                    "within_sla_percentage_friendly": "N/A",
                    "sla_breach": 0,
                    "sla_breach_percentage_friendly": "N/A",
                    "excluded_from_sla": 0,
                    "excluded_from_sla_percentage_friendly": "N/A"
                },
                "overallTTC": {
                    "friendly": "N/A",
                    "raw": null,
                    "friendly_no_business": "N/A",
                    "raw_no_business": null,
                    "within_sla": 0,
                    "within_sla_percentage_friendly": "N/A",
                    "sla_breach": 0,
                    "sla_breach_percentage_friendly": "N/A"
                }
            }
        ],
        "messages.received.count": [
            {
                "name": "[email protected]",
                "threads": {
                    "total": 1,
                    "internal": 0,
                    "inbound": 0,
                    "outbound": 1,
                    "sent_internally": 0,
                    "await_customer": 0,
                    "await_agent": 0,
                    "closed": 0,
                    "have_replies": 0,
                    "have_initial_replies": 0,
                    "handledRate": {
                        "rate": 0
                    },
                    "top_labels": [],
                    "messages_per_conversations_avg": 1,
                    "messages_received_per_conversations_avg": 0,
                    "messages_sent_per_conversations_avg": 1
                },
                "messages": {
                    "count": 0,
                    "initial": 0,
                    "replies": 0,
                    "forward": 0,
                    "follow_up": 0,
                    "sent": {
                        "count": 1,
                        "initial": 1,
                        "replies": 0,
                        "forward": 0,
                        "follow_up": 0,
                        "initial_replies": 0,
                        "dailyStats": []
                    },
                    "received": {
                        "count": 0,
                        "initial": 0,
                        "replies": 0,
                        "forward": 0,
                        "follow_up": 0,
                        "initial_replies": 0,
                        "dailyStats": null,
                        "avg_wait": "N/A",
                        "avg_wait_raw": null,
                        "avg_first_wait": "N/A",
                        "avg_first_wait_raw": null
                    }
                },
                "overallTTR": {
                    "friendly": "N/A",
                    "raw": null,
                    "friendly_no_business": "N/A",
                    "raw_no_business": null,
                    "deviation_friendly": "N/A",
                    "deviation_raw": null,
                    "deviation_friendly_no_business": "N/A",
                    "deviation_raw_no_business": null,
                    "median_friendly": "N/A",
                    "median_raw": null,
                    "median_friendly_no_business": "N/A",
                    "median_raw_no_business": null,
                    "consistency_score": "N/A",
                    "consistency_score_no_business": "N/A",
                    "percentileRanks": [
                        {
                            "key": "2h:0m",
                            "value": 0,
                            "count": 0
                        },
                        {
                            "key": "4h:0m",
                            "value": 0,
                            "count": 0
                        },
                        {
                            "key": "8h:0m",
                            "value": 0,
                            "count": 0
                        },
                        {
                            "key": "16h:0m",
                            "value": 0,
                            "count": 0
                        }
                    ],
                    "percentileRanksRaw": [],
                    "within_sla": null,
                    "within_sla_percentage_friendly": "N/A",
                    "sla_breach": null,
                    "sla_breach_percentage_friendly": "N/A",
                    "excluded_from_sla": 0,
                    "excluded_from_sla_percentage_friendly": "N/A"
                },
                "overallTTF": {
                    "friendly": "N/A",
                    "raw": null,
                    "friendly_no_business": "N/A",
                    "raw_no_business": null
                },
                "initialTTR": {
                    "friendly": "N/A",
                    "raw": null,
                    "friendly_no_business": "N/A",
                    "raw_no_business": null,
                    "deviation_friendly": "N/A",
                    "deviation_raw": null,
                    "deviation_friendly_no_business": "N/A",
                    "deviation_raw_no_business": null,
                    "median_friendly": "N/A",
                    "median_raw": null,
                    "median_friendly_no_business": "N/A",
                    "median_raw_no_business": null,
                    "consistency_score": "N/A",
                    "consistency_score_no_business": "N/A",
                    "percentileRanks": [],
                    "percentileRanksRaw": [],
                    "within_sla": 0,
                    "within_sla_percentage_friendly": "N/A",
                    "sla_breach": 0,
                    "sla_breach_percentage_friendly": "N/A",
                    "excluded_from_sla": 0,
                    "excluded_from_sla_percentage_friendly": "N/A"
                },
                "overallTTC": {
                    "friendly": "N/A",
                    "raw": null,
                    "friendly_no_business": "N/A",
                    "raw_no_business": null,
                    "within_sla": 0,
                    "within_sla_percentage_friendly": "N/A",
                    "sla_breach": 0,
                    "sla_breach_percentage_friendly": "N/A",
                    "percentileRanks": [],
                    "percentileRanksRaw": []
                }
            },
            {
                "name": "[email protected]",
                "threads": {
                    "total": 0,
                    "internal": 0,
                    "inbound": 0,
                    "outbound": 0,
                    "sent_internally": 0,
                    "await_customer": 0,
                    "await_agent": 0,
                    "closed": 0,
                    "have_replies": 0,
                    "have_initial_replies": 0,
                    "handledRate": {
                        "rate": 0
                    },
                    "top_labels": [],
                    "messages_per_conversations_avg": "N/A",
                    "messages_received_per_conversations_avg": "N/A",
                    "messages_sent_per_conversations_avg": "N/A"
                },
                "messages": {
                    "count": 0,
                    "initial": 0,
                    "replies": 0,
                    "forward": 0,
                    "follow_up": 0,
                    "sent": {
                        "count": 0,
                        "initial": 0,
                        "replies": 0,
                        "forward": 0,
                        "follow_up": 0,
                        "initial_replies": 0,
                        "dailyStats": null
                    },
                    "received": {
                        "count": 0,
                        "initial": 0,
                        "replies": 0,
                        "forward": 0,
                        "follow_up": 0,
                        "initial_replies": 0,
                        "dailyStats": null,
                        "avg_wait": "N/A",
                        "avg_wait_raw": null,
                        "avg_first_wait": "N/A",
                        "avg_first_wait_raw": null
                    }
                },
                "overallTTR": {
                    "friendly": "N/A",
                    "raw": null,
                    "friendly_no_business": "N/A",
                    "raw_no_business": null,
                    "deviation_friendly": "N/A",
                    "deviation_raw": null,
                    "deviation_friendly_no_business": "N/A",
                    "deviation_raw_no_business": null,
                    "median_friendly": "N/A",
                    "median_raw": null,
                    "median_friendly_no_business": "N/A",
                    "median_raw_no_business": null,
                    "consistency_score": "N/A",
                    "consistency_score_no_business": "N/A",
                    "percentileRanks": [],
                    "percentileRanksRaw": [],
                    "within_sla": 0,
                    "within_sla_percentage_friendly": "N/A",
                    "sla_breach": 0,
                    "sla_breach_percentage_friendly": "N/A",
                    "excluded_from_sla": 0,
                    "excluded_from_sla_percentage_friendly": "N/A"
                },
                "overallTTF": {
                    "friendly": "N/A",
                    "raw": null,
                    "friendly_no_business": "N/A",
                    "raw_no_business": null
                },
                "initialTTR": {
                    "friendly": "N/A",
                    "raw": null,
                    "friendly_no_business": "N/A",
                    "raw_no_business": null,
                    "deviation_friendly": "N/A",
                    "deviation_raw": null,
                    "deviation_friendly_no_business": "N/A",
                    "deviation_raw_no_business": null,
                    "median_friendly": "N/A",
                    "median_raw": null,
                    "median_friendly_no_business": "N/A",
                    "median_raw_no_business": null,
                    "consistency_score": "N/A",
                    "consistency_score_no_business": "N/A",
                    "percentileRanks": [],
                    "percentileRanksRaw": [],
                    "within_sla": 0,
                    "within_sla_percentage_friendly": "N/A",
                    "sla_breach": 0,
                    "sla_breach_percentage_friendly": "N/A",
                    "excluded_from_sla": 0,
                    "excluded_from_sla_percentage_friendly": "N/A"
                },
                "overallTTC": {
                    "friendly": "N/A",
                    "raw": null,
                    "friendly_no_business": "N/A",
                    "raw_no_business": null,
                    "within_sla": 0,
                    "within_sla_percentage_friendly": "N/A",
                    "sla_breach": 0,
                    "sla_breach_percentage_friendly": "N/A"
                }
            }
        ],
        "messages.sent.replies": [
            {
                "name": "[email protected]",
                "threads": {
                    "total": 1,
                    "internal": 0,
                    "inbound": 0,
                    "outbound": 1,
                    "sent_internally": 0,
                    "await_customer": 0,
                    "await_agent": 0,
                    "closed": 0,
                    "have_replies": 0,
                    "have_initial_replies": 0,
                    "handledRate": {
                        "rate": 0
                    },
                    "top_labels": [],
                    "messages_per_conversations_avg": 1,
                    "messages_received_per_conversations_avg": 0,
                    "messages_sent_per_conversations_avg": 1
                },
                "messages": {
                    "count": 0,
                    "initial": 0,
                    "replies": 0,
                    "forward": 0,
                    "follow_up": 0,
                    "sent": {
                        "count": 1,
                        "initial": 1,
                        "replies": 0,
                        "forward": 0,
                        "follow_up": 0,
                        "initial_replies": 0,
                        "dailyStats": []
                    },
                    "received": {
                        "count": 0,
                        "initial": 0,
                        "replies": 0,
                        "forward": 0,
                        "follow_up": 0,
                        "initial_replies": 0,
                        "dailyStats": null,
                        "avg_wait": "N/A",
                        "avg_wait_raw": null,
                        "avg_first_wait": "N/A",
                        "avg_first_wait_raw": null
                    }
                },
                "overallTTR": {
                    "friendly": "N/A",
                    "raw": null,
                    "friendly_no_business": "N/A",
                    "raw_no_business": null,
                    "deviation_friendly": "N/A",
                    "deviation_raw": null,
                    "deviation_friendly_no_business": "N/A",
                    "deviation_raw_no_business": null,
                    "median_friendly": "N/A",
                    "median_raw": null,
                    "median_friendly_no_business": "N/A",
                    "median_raw_no_business": null,
                    "consistency_score": "N/A",
                    "consistency_score_no_business": "N/A",
                    "percentileRanks": [
                        {
                            "key": "2h:0m",
                            "value": 0,
                            "count": 0
                        },
                        {
                            "key": "4h:0m",
                            "value": 0,
                            "count": 0
                        },
                        {
                            "key": "8h:0m",
                            "value": 0,
                            "count": 0
                        },
                        {
                            "key": "16h:0m",
                            "value": 0,
                            "count": 0
                        }
                    ],
                    "percentileRanksRaw": [],
                    "within_sla": null,
                    "within_sla_percentage_friendly": "N/A",
                    "sla_breach": null,
                    "sla_breach_percentage_friendly": "N/A",
                    "excluded_from_sla": 0,
                    "excluded_from_sla_percentage_friendly": "N/A"
                },
                "overallTTF": {
                    "friendly": "N/A",
                    "raw": null,
                    "friendly_no_business": "N/A",
                    "raw_no_business": null
                },
                "initialTTR": {
                    "friendly": "N/A",
                    "raw": null,
                    "friendly_no_business": "N/A",
                    "raw_no_business": null,
                    "deviation_friendly": "N/A",
                    "deviation_raw": null,
                    "deviation_friendly_no_business": "N/A",
                    "deviation_raw_no_business": null,
                    "median_friendly": "N/A",
                    "median_raw": null,
                    "median_friendly_no_business": "N/A",
                    "median_raw_no_business": null,
                    "consistency_score": "N/A",
                    "consistency_score_no_business": "N/A",
                    "percentileRanks": [],
                    "percentileRanksRaw": [],
                    "within_sla": 0,
                    "within_sla_percentage_friendly": "N/A",
                    "sla_breach": 0,
                    "sla_breach_percentage_friendly": "N/A",
                    "excluded_from_sla": 0,
                    "excluded_from_sla_percentage_friendly": "N/A"
                },
                "overallTTC": {
                    "friendly": "N/A",
                    "raw": null,
                    "friendly_no_business": "N/A",
                    "raw_no_business": null,
                    "within_sla": 0,
                    "within_sla_percentage_friendly": "N/A",
                    "sla_breach": 0,
                    "sla_breach_percentage_friendly": "N/A",
                    "percentileRanks": [],
                    "percentileRanksRaw": []
                }
            },
            {
                "name": "[email protected]",
                "threads": {
                    "total": 0,
                    "internal": 0,
                    "inbound": 0,
                    "outbound": 0,
                    "sent_internally": 0,
                    "await_customer": 0,
                    "await_agent": 0,
                    "closed": 0,
                    "have_replies": 0,
                    "have_initial_replies": 0,
                    "handledRate": {
                        "rate": 0
                    },
                    "top_labels": [],
                    "messages_per_conversations_avg": "N/A",
                    "messages_received_per_conversations_avg": "N/A",
                    "messages_sent_per_conversations_avg": "N/A"
                },
                "messages": {
                    "count": 0,
                    "initial": 0,
                    "replies": 0,
                    "forward": 0,
                    "follow_up": 0,
                    "sent": {
                        "count": 0,
                        "initial": 0,
                        "replies": 0,
                        "forward": 0,
                        "follow_up": 0,
                        "initial_replies": 0,
                        "dailyStats": null
                    },
                    "received": {
                        "count": 0,
                        "initial": 0,
                        "replies": 0,
                        "forward": 0,
                        "follow_up": 0,
                        "initial_replies": 0,
                        "dailyStats": null,
                        "avg_wait": "N/A",
                        "avg_wait_raw": null,
                        "avg_first_wait": "N/A",
                        "avg_first_wait_raw": null
                    }
                },
                "overallTTR": {
                    "friendly": "N/A",
                    "raw": null,
                    "friendly_no_business": "N/A",
                    "raw_no_business": null,
                    "deviation_friendly": "N/A",
                    "deviation_raw": null,
                    "deviation_friendly_no_business": "N/A",
                    "deviation_raw_no_business": null,
                    "median_friendly": "N/A",
                    "median_raw": null,
                    "median_friendly_no_business": "N/A",
                    "median_raw_no_business": null,
                    "consistency_score": "N/A",
                    "consistency_score_no_business": "N/A",
                    "percentileRanks": [],
                    "percentileRanksRaw": [],
                    "within_sla": 0,
                    "within_sla_percentage_friendly": "N/A",
                    "sla_breach": 0,
                    "sla_breach_percentage_friendly": "N/A",
                    "excluded_from_sla": 0,
                    "excluded_from_sla_percentage_friendly": "N/A"
                },
                "overallTTF": {
                    "friendly": "N/A",
                    "raw": null,
                    "friendly_no_business": "N/A",
                    "raw_no_business": null
                },
                "initialTTR": {
                    "friendly": "N/A",
                    "raw": null,
                    "friendly_no_business": "N/A",
                    "raw_no_business": null,
                    "deviation_friendly": "N/A",
                    "deviation_raw": null,
                    "deviation_friendly_no_business": "N/A",
                    "deviation_raw_no_business": null,
                    "median_friendly": "N/A",
                    "median_raw": null,
                    "median_friendly_no_business": "N/A",
                    "median_raw_no_business": null,
                    "consistency_score": "N/A",
                    "consistency_score_no_business": "N/A",
                    "percentileRanks": [],
                    "percentileRanksRaw": [],
                    "within_sla": 0,
                    "within_sla_percentage_friendly": "N/A",
                    "sla_breach": 0,
                    "sla_breach_percentage_friendly": "N/A",
                    "excluded_from_sla": 0,
                    "excluded_from_sla_percentage_friendly": "N/A"
                },
                "overallTTC": {
                    "friendly": "N/A",
                    "raw": null,
                    "friendly_no_business": "N/A",
                    "raw_no_business": null,
                    "within_sla": 0,
                    "within_sla_percentage_friendly": "N/A",
                    "sla_breach": 0,
                    "sla_breach_percentage_friendly": "N/A"
                }
            }
        ],
        "messages.sent.count": [
            {
                "name": "[email protected]",
                "threads": {
                    "total": 1,
                    "internal": 0,
                    "inbound": 0,
                    "outbound": 1,
                    "sent_internally": 0,
                    "await_customer": 0,
                    "await_agent": 0,
                    "closed": 0,
                    "have_replies": 0,
                    "have_initial_replies": 0,
                    "handledRate": {
                        "rate": 0
                    },
                    "top_labels": [],
                    "messages_per_conversations_avg": 1,
                    "messages_received_per_conversations_avg": 0,
                    "messages_sent_per_conversations_avg": 1
                },
                "messages": {
                    "count": 0,
                    "initial": 0,
                    "replies": 0,
                    "forward": 0,
                    "follow_up": 0,
                    "sent": {
                        "count": 1,
                        "initial": 1,
                        "replies": 0,
                        "forward": 0,
                        "follow_up": 0,
                        "initial_replies": 0,
                        "dailyStats": []
                    },
                    "received": {
                        "count": 0,
                        "initial": 0,
                        "replies": 0,
                        "forward": 0,
                        "follow_up": 0,
                        "initial_replies": 0,
                        "dailyStats": null,
                        "avg_wait": "N/A",
                        "avg_wait_raw": null,
                        "avg_first_wait": "N/A",
                        "avg_first_wait_raw": null
                    }
                },
                "overallTTR": {
                    "friendly": "N/A",
                    "raw": null,
                    "friendly_no_business": "N/A",
                    "raw_no_business": null,
                    "deviation_friendly": "N/A",
                    "deviation_raw": null,
                    "deviation_friendly_no_business": "N/A",
                    "deviation_raw_no_business": null,
                    "median_friendly": "N/A",
                    "median_raw": null,
                    "median_friendly_no_business": "N/A",
                    "median_raw_no_business": null,
                    "consistency_score": "N/A",
                    "consistency_score_no_business": "N/A",
                    "percentileRanks": [
                        {
                            "key": "2h:0m",
                            "value": 0,
                            "count": 0
                        },
                        {
                            "key": "4h:0m",
                            "value": 0,
                            "count": 0
                        },
                        {
                            "key": "8h:0m",
                            "value": 0,
                            "count": 0
                        },
                        {
                            "key": "16h:0m",
                            "value": 0,
                            "count": 0
                        }
                    ],
                    "percentileRanksRaw": [],
                    "within_sla": null,
                    "within_sla_percentage_friendly": "N/A",
                    "sla_breach": null,
                    "sla_breach_percentage_friendly": "N/A",
                    "excluded_from_sla": 0,
                    "excluded_from_sla_percentage_friendly": "N/A"
                },
                "overallTTF": {
                    "friendly": "N/A",
                    "raw": null,
                    "friendly_no_business": "N/A",
                    "raw_no_business": null
                },
                "initialTTR": {
                    "friendly": "N/A",
                    "raw": null,
                    "friendly_no_business": "N/A",
                    "raw_no_business": null,
                    "deviation_friendly": "N/A",
                    "deviation_raw": null,
                    "deviation_friendly_no_business": "N/A",
                    "deviation_raw_no_business": null,
                    "median_friendly": "N/A",
                    "median_raw": null,
                    "median_friendly_no_business": "N/A",
                    "median_raw_no_business": null,
                    "consistency_score": "N/A",
                    "consistency_score_no_business": "N/A",
                    "percentileRanks": [],
                    "percentileRanksRaw": [],
                    "within_sla": 0,
                    "within_sla_percentage_friendly": "N/A",
                    "sla_breach": 0,
                    "sla_breach_percentage_friendly": "N/A",
                    "excluded_from_sla": 0,
                    "excluded_from_sla_percentage_friendly": "N/A"
                },
                "overallTTC": {
                    "friendly": "N/A",
                    "raw": null,
                    "friendly_no_business": "N/A",
                    "raw_no_business": null,
                    "within_sla": 0,
                    "within_sla_percentage_friendly": "N/A",
                    "sla_breach": 0,
                    "sla_breach_percentage_friendly": "N/A",
                    "percentileRanks": [],
                    "percentileRanksRaw": []
                }
            },
            {
                "name": "[email protected]",
                "threads": {
                    "total": 0,
                    "internal": 0,
                    "inbound": 0,
                    "outbound": 0,
                    "sent_internally": 0,
                    "await_customer": 0,
                    "await_agent": 0,
                    "closed": 0,
                    "have_replies": 0,
                    "have_initial_replies": 0,
                    "handledRate": {
                        "rate": 0
                    },
                    "top_labels": [],
                    "messages_per_conversations_avg": "N/A",
                    "messages_received_per_conversations_avg": "N/A",
                    "messages_sent_per_conversations_avg": "N/A"
                },
                "messages": {
                    "count": 0,
                    "initial": 0,
                    "replies": 0,
                    "forward": 0,
                    "follow_up": 0,
                    "sent": {
                        "count": 0,
                        "initial": 0,
                        "replies": 0,
                        "forward": 0,
                        "follow_up": 0,
                        "initial_replies": 0,
                        "dailyStats": null
                    },
                    "received": {
                        "count": 0,
                        "initial": 0,
                        "replies": 0,
                        "forward": 0,
                        "follow_up": 0,
                        "initial_replies": 0,
                        "dailyStats": null,
                        "avg_wait": "N/A",
                        "avg_wait_raw": null,
                        "avg_first_wait": "N/A",
                        "avg_first_wait_raw": null
                    }
                },
                "overallTTR": {
                    "friendly": "N/A",
                    "raw": null,
                    "friendly_no_business": "N/A",
                    "raw_no_business": null,
                    "deviation_friendly": "N/A",
                    "deviation_raw": null,
                    "deviation_friendly_no_business": "N/A",
                    "deviation_raw_no_business": null,
                    "median_friendly": "N/A",
                    "median_raw": null,
                    "median_friendly_no_business": "N/A",
                    "median_raw_no_business": null,
                    "consistency_score": "N/A",
                    "consistency_score_no_business": "N/A",
                    "percentileRanks": [],
                    "percentileRanksRaw": [],
                    "within_sla": 0,
                    "within_sla_percentage_friendly": "N/A",
                    "sla_breach": 0,
                    "sla_breach_percentage_friendly": "N/A",
                    "excluded_from_sla": 0,
                    "excluded_from_sla_percentage_friendly": "N/A"
                },
                "overallTTF": {
                    "friendly": "N/A",
                    "raw": null,
                    "friendly_no_business": "N/A",
                    "raw_no_business": null
                },
                "initialTTR": {
                    "friendly": "N/A",
                    "raw": null,
                    "friendly_no_business": "N/A",
                    "raw_no_business": null,
                    "deviation_friendly": "N/A",
                    "deviation_raw": null,
                    "deviation_friendly_no_business": "N/A",
                    "deviation_raw_no_business": null,
                    "median_friendly": "N/A",
                    "median_raw": null,
                    "median_friendly_no_business": "N/A",
                    "median_raw_no_business": null,
                    "consistency_score": "N/A",
                    "consistency_score_no_business": "N/A",
                    "percentileRanks": [],
                    "percentileRanksRaw": [],
                    "within_sla": 0,
                    "within_sla_percentage_friendly": "N/A",
                    "sla_breach": 0,
                    "sla_breach_percentage_friendly": "N/A",
                    "excluded_from_sla": 0,
                    "excluded_from_sla_percentage_friendly": "N/A"
                },
                "overallTTC": {
                    "friendly": "N/A",
                    "raw": null,
                    "friendly_no_business": "N/A",
                    "raw_no_business": null,
                    "within_sla": 0,
                    "within_sla_percentage_friendly": "N/A",
                    "sla_breach": 0,
                    "sla_breach_percentage_friendly": "N/A"
                }
            }
        ],
        "messages.sent.forward": [
            {
                "name": "[email protected]",
                "threads": {
                    "total": 1,
                    "internal": 0,
                    "inbound": 0,
                    "outbound": 1,
                    "sent_internally": 0,
                    "await_customer": 0,
                    "await_agent": 0,
                    "closed": 0,
                    "have_replies": 0,
                    "have_initial_replies": 0,
                    "handledRate": {
                        "rate": 0
                    },
                    "top_labels": [],
                    "messages_per_conversations_avg": 1,
                    "messages_received_per_conversations_avg": 0,
                    "messages_sent_per_conversations_avg": 1
                },
                "messages": {
                    "count": 0,
                    "initial": 0,
                    "replies": 0,
                    "forward": 0,
                    "follow_up": 0,
                    "sent": {
                        "count": 1,
                        "initial": 1,
                        "replies": 0,
                        "forward": 0,
                        "follow_up": 0,
                        "initial_replies": 0,
                        "dailyStats": []
                    },
                    "received": {
                        "count": 0,
                        "initial": 0,
                        "replies": 0,
                        "forward": 0,
                        "follow_up": 0,
                        "initial_replies": 0,
                        "dailyStats": null,
                        "avg_wait": "N/A",
                        "avg_wait_raw": null,
                        "avg_first_wait": "N/A",
                        "avg_first_wait_raw": null
                    }
                },
                "overallTTR": {
                    "friendly": "N/A",
                    "raw": null,
                    "friendly_no_business": "N/A",
                    "raw_no_business": null,
                    "deviation_friendly": "N/A",
                    "deviation_raw": null,
                    "deviation_friendly_no_business": "N/A",
                    "deviation_raw_no_business": null,
                    "median_friendly": "N/A",
                    "median_raw": null,
                    "median_friendly_no_business": "N/A",
                    "median_raw_no_business": null,
                    "consistency_score": "N/A",
                    "consistency_score_no_business": "N/A",
                    "percentileRanks": [
                        {
                            "key": "2h:0m",
                            "value": 0,
                            "count": 0
                        },
                        {
                            "key": "4h:0m",
                            "value": 0,
                            "count": 0
                        },
                        {
                            "key": "8h:0m",
                            "value": 0,
                            "count": 0
                        },
                        {
                            "key": "16h:0m",
                            "value": 0,
                            "count": 0
                        }
                    ],
                    "percentileRanksRaw": [],
                    "within_sla": null,
                    "within_sla_percentage_friendly": "N/A",
                    "sla_breach": null,
                    "sla_breach_percentage_friendly": "N/A",
                    "excluded_from_sla": 0,
                    "excluded_from_sla_percentage_friendly": "N/A"
                },
                "overallTTF": {
                    "friendly": "N/A",
                    "raw": null,
                    "friendly_no_business": "N/A",
                    "raw_no_business": null
                },
                "initialTTR": {
                    "friendly": "N/A",
                    "raw": null,
                    "friendly_no_business": "N/A",
                    "raw_no_business": null,
                    "deviation_friendly": "N/A",
                    "deviation_raw": null,
                    "deviation_friendly_no_business": "N/A",
                    "deviation_raw_no_business": null,
                    "median_friendly": "N/A",
                    "median_raw": null,
                    "median_friendly_no_business": "N/A",
                    "median_raw_no_business": null,
                    "consistency_score": "N/A",
                    "consistency_score_no_business": "N/A",
                    "percentileRanks": [],
                    "percentileRanksRaw": [],
                    "within_sla": 0,
                    "within_sla_percentage_friendly": "N/A",
                    "sla_breach": 0,
                    "sla_breach_percentage_friendly": "N/A",
                    "excluded_from_sla": 0,
                    "excluded_from_sla_percentage_friendly": "N/A"
                },
                "overallTTC": {
                    "friendly": "N/A",
                    "raw": null,
                    "friendly_no_business": "N/A",
                    "raw_no_business": null,
                    "within_sla": 0,
                    "within_sla_percentage_friendly": "N/A",
                    "sla_breach": 0,
                    "sla_breach_percentage_friendly": "N/A",
                    "percentileRanks": [],
                    "percentileRanksRaw": []
                }
            },
            {
                "name": "[email protected]",
                "threads": {
                    "total": 0,
                    "internal": 0,
                    "inbound": 0,
                    "outbound": 0,
                    "sent_internally": 0,
                    "await_customer": 0,
                    "await_agent": 0,
                    "closed": 0,
                    "have_replies": 0,
                    "have_initial_replies": 0,
                    "handledRate": {
                        "rate": 0
                    },
                    "top_labels": [],
                    "messages_per_conversations_avg": "N/A",
                    "messages_received_per_conversations_avg": "N/A",
                    "messages_sent_per_conversations_avg": "N/A"
                },
                "messages": {
                    "count": 0,
                    "initial": 0,
                    "replies": 0,
                    "forward": 0,
                    "follow_up": 0,
                    "sent": {
                        "count": 0,
                        "initial": 0,
                        "replies": 0,
                        "forward": 0,
                        "follow_up": 0,
                        "initial_replies": 0,
                        "dailyStats": null
                    },
                    "received": {
                        "count": 0,
                        "initial": 0,
                        "replies": 0,
                        "forward": 0,
                        "follow_up": 0,
                        "initial_replies": 0,
                        "dailyStats": null,
                        "avg_wait": "N/A",
                        "avg_wait_raw": null,
                        "avg_first_wait": "N/A",
                        "avg_first_wait_raw": null
                    }
                },
                "overallTTR": {
                    "friendly": "N/A",
                    "raw": null,
                    "friendly_no_business": "N/A",
                    "raw_no_business": null,
                    "deviation_friendly": "N/A",
                    "deviation_raw": null,
                    "deviation_friendly_no_business": "N/A",
                    "deviation_raw_no_business": null,
                    "median_friendly": "N/A",
                    "median_raw": null,
                    "median_friendly_no_business": "N/A",
                    "median_raw_no_business": null,
                    "consistency_score": "N/A",
                    "consistency_score_no_business": "N/A",
                    "percentileRanks": [],
                    "percentileRanksRaw": [],
                    "within_sla": 0,
                    "within_sla_percentage_friendly": "N/A",
                    "sla_breach": 0,
                    "sla_breach_percentage_friendly": "N/A",
                    "excluded_from_sla": 0,
                    "excluded_from_sla_percentage_friendly": "N/A"
                },
                "overallTTF": {
                    "friendly": "N/A",
                    "raw": null,
                    "friendly_no_business": "N/A",
                    "raw_no_business": null
                },
                "initialTTR": {
                    "friendly": "N/A",
                    "raw": null,
                    "friendly_no_business": "N/A",
                    "raw_no_business": null,
                    "deviation_friendly": "N/A",
                    "deviation_raw": null,
                    "deviation_friendly_no_business": "N/A",
                    "deviation_raw_no_business": null,
                    "median_friendly": "N/A",
                    "median_raw": null,
                    "median_friendly_no_business": "N/A",
                    "median_raw_no_business": null,
                    "consistency_score": "N/A",
                    "consistency_score_no_business": "N/A",
                    "percentileRanks": [],
                    "percentileRanksRaw": [],
                    "within_sla": 0,
                    "within_sla_percentage_friendly": "N/A",
                    "sla_breach": 0,
                    "sla_breach_percentage_friendly": "N/A",
                    "excluded_from_sla": 0,
                    "excluded_from_sla_percentage_friendly": "N/A"
                },
                "overallTTC": {
                    "friendly": "N/A",
                    "raw": null,
                    "friendly_no_business": "N/A",
                    "raw_no_business": null,
                    "within_sla": 0,
                    "within_sla_percentage_friendly": "N/A",
                    "sla_breach": 0,
                    "sla_breach_percentage_friendly": "N/A"
                }
            }
        ],
        "overallTTC.raw": [
            {
                "name": "[email protected]",
                "threads": {
                    "total": 1,
                    "internal": 0,
                    "inbound": 0,
                    "outbound": 1,
                    "sent_internally": 0,
                    "await_customer": 0,
                    "await_agent": 0,
                    "closed": 0,
                    "have_replies": 0,
                    "have_initial_replies": 0,
                    "handledRate": {
                        "rate": 0
                    },
                    "top_labels": [],
                    "messages_per_conversations_avg": 1,
                    "messages_received_per_conversations_avg": 0,
                    "messages_sent_per_conversations_avg": 1
                },
                "messages": {
                    "count": 0,
                    "initial": 0,
                    "replies": 0,
                    "forward": 0,
                    "follow_up": 0,
                    "sent": {
                        "count": 1,
                        "initial": 1,
                        "replies": 0,
                        "forward": 0,
                        "follow_up": 0,
                        "initial_replies": 0,
                        "dailyStats": []
                    },
                    "received": {
                        "count": 0,
                        "initial": 0,
                        "replies": 0,
                        "forward": 0,
                        "follow_up": 0,
                        "initial_replies": 0,
                        "dailyStats": null,
                        "avg_wait": "N/A",
                        "avg_wait_raw": null,
                        "avg_first_wait": "N/A",
                        "avg_first_wait_raw": null
                    }
                },
                "overallTTR": {
                    "friendly": "N/A",
                    "raw": null,
                    "friendly_no_business": "N/A",
                    "raw_no_business": null,
                    "deviation_friendly": "N/A",
                    "deviation_raw": null,
                    "deviation_friendly_no_business": "N/A",
                    "deviation_raw_no_business": null,
                    "median_friendly": "N/A",
                    "median_raw": null,
                    "median_friendly_no_business": "N/A",
                    "median_raw_no_business": null,
                    "consistency_score": "N/A",
                    "consistency_score_no_business": "N/A",
                    "percentileRanks": [
                        {
                            "key": "2h:0m",
                            "value": 0,
                            "count": 0
                        },
                        {
                            "key": "4h:0m",
                            "value": 0,
                            "count": 0
                        },
                        {
                            "key": "8h:0m",
                            "value": 0,
                            "count": 0
                        },
                        {
                            "key": "16h:0m",
                            "value": 0,
                            "count": 0
                        }
                    ],
                    "percentileRanksRaw": [],
                    "within_sla": null,
                    "within_sla_percentage_friendly": "N/A",
                    "sla_breach": null,
                    "sla_breach_percentage_friendly": "N/A",
                    "excluded_from_sla": 0,
                    "excluded_from_sla_percentage_friendly": "N/A"
                },
                "overallTTF": {
                    "friendly": "N/A",
                    "raw": null,
                    "friendly_no_business": "N/A",
                    "raw_no_business": null
                },
                "initialTTR": {
                    "friendly": "N/A",
                    "raw": null,
                    "friendly_no_business": "N/A",
                    "raw_no_business": null,
                    "deviation_friendly": "N/A",
                    "deviation_raw": null,
                    "deviation_friendly_no_business": "N/A",
                    "deviation_raw_no_business": null,
                    "median_friendly": "N/A",
                    "median_raw": null,
                    "median_friendly_no_business": "N/A",
                    "median_raw_no_business": null,
                    "consistency_score": "N/A",
                    "consistency_score_no_business": "N/A",
                    "percentileRanks": [],
                    "percentileRanksRaw": [],
                    "within_sla": 0,
                    "within_sla_percentage_friendly": "N/A",
                    "sla_breach": 0,
                    "sla_breach_percentage_friendly": "N/A",
                    "excluded_from_sla": 0,
                    "excluded_from_sla_percentage_friendly": "N/A"
                },
                "overallTTC": {
                    "friendly": "N/A",
                    "raw": null,
                    "friendly_no_business": "N/A",
                    "raw_no_business": null,
                    "within_sla": 0,
                    "within_sla_percentage_friendly": "N/A",
                    "sla_breach": 0,
                    "sla_breach_percentage_friendly": "N/A",
                    "percentileRanks": [],
                    "percentileRanksRaw": []
                }
            },
            {
                "name": "[email protected]",
                "threads": {
                    "total": 0,
                    "internal": 0,
                    "inbound": 0,
                    "outbound": 0,
                    "sent_internally": 0,
                    "await_customer": 0,
                    "await_agent": 0,
                    "closed": 0,
                    "have_replies": 0,
                    "have_initial_replies": 0,
                    "handledRate": {
                        "rate": 0
                    },
                    "top_labels": [],
                    "messages_per_conversations_avg": "N/A",
                    "messages_received_per_conversations_avg": "N/A",
                    "messages_sent_per_conversations_avg": "N/A"
                },
                "messages": {
                    "count": 0,
                    "initial": 0,
                    "replies": 0,
                    "forward": 0,
                    "follow_up": 0,
                    "sent": {
                        "count": 0,
                        "initial": 0,
                        "replies": 0,
                        "forward": 0,
                        "follow_up": 0,
                        "initial_replies": 0,
                        "dailyStats": null
                    },
                    "received": {
                        "count": 0,
                        "initial": 0,
                        "replies": 0,
                        "forward": 0,
                        "follow_up": 0,
                        "initial_replies": 0,
                        "dailyStats": null,
                        "avg_wait": "N/A",
                        "avg_wait_raw": null,
                        "avg_first_wait": "N/A",
                        "avg_first_wait_raw": null
                    }
                },
                "overallTTR": {
                    "friendly": "N/A",
                    "raw": null,
                    "friendly_no_business": "N/A",
                    "raw_no_business": null,
                    "deviation_friendly": "N/A",
                    "deviation_raw": null,
                    "deviation_friendly_no_business": "N/A",
                    "deviation_raw_no_business": null,
                    "median_friendly": "N/A",
                    "median_raw": null,
                    "median_friendly_no_business": "N/A",
                    "median_raw_no_business": null,
                    "consistency_score": "N/A",
                    "consistency_score_no_business": "N/A",
                    "percentileRanks": [],
                    "percentileRanksRaw": [],
                    "within_sla": 0,
                    "within_sla_percentage_friendly": "N/A",
                    "sla_breach": 0,
                    "sla_breach_percentage_friendly": "N/A",
                    "excluded_from_sla": 0,
                    "excluded_from_sla_percentage_friendly": "N/A"
                },
                "overallTTF": {
                    "friendly": "N/A",
                    "raw": null,
                    "friendly_no_business": "N/A",
                    "raw_no_business": null
                },
                "initialTTR": {
                    "friendly": "N/A",
                    "raw": null,
                    "friendly_no_business": "N/A",
                    "raw_no_business": null,
                    "deviation_friendly": "N/A",
                    "deviation_raw": null,
                    "deviation_friendly_no_business": "N/A",
                    "deviation_raw_no_business": null,
                    "median_friendly": "N/A",
                    "median_raw": null,
                    "median_friendly_no_business": "N/A",
                    "median_raw_no_business": null,
                    "consistency_score": "N/A",
                    "consistency_score_no_business": "N/A",
                    "percentileRanks": [],
                    "percentileRanksRaw": [],
                    "within_sla": 0,
                    "within_sla_percentage_friendly": "N/A",
                    "sla_breach": 0,
                    "sla_breach_percentage_friendly": "N/A",
                    "excluded_from_sla": 0,
                    "excluded_from_sla_percentage_friendly": "N/A"
                },
                "overallTTC": {
                    "friendly": "N/A",
                    "raw": null,
                    "friendly_no_business": "N/A",
                    "raw_no_business": null,
                    "within_sla": 0,
                    "within_sla_percentage_friendly": "N/A",
                    "sla_breach": 0,
                    "sla_breach_percentage_friendly": "N/A"
                }
            }
        ],
        "overallTTF.raw": [
            {
                "name": "[email protected]",
                "threads": {
                    "total": 1,
                    "internal": 0,
                    "inbound": 0,
                    "outbound": 1,
                    "sent_internally": 0,
                    "await_customer": 0,
                    "await_agent": 0,
                    "closed": 0,
                    "have_replies": 0,
                    "have_initial_replies": 0,
                    "handledRate": {
                        "rate": 0
                    },
                    "top_labels": [],
                    "messages_per_conversations_avg": 1,
                    "messages_received_per_conversations_avg": 0,
                    "messages_sent_per_conversations_avg": 1
                },
                "messages": {
                    "count": 0,
                    "initial": 0,
                    "replies": 0,
                    "forward": 0,
                    "follow_up": 0,
                    "sent": {
                        "count": 1,
                        "initial": 1,
                        "replies": 0,
                        "forward": 0,
                        "follow_up": 0,
                        "initial_replies": 0,
                        "dailyStats": []
                    },
                    "received": {
                        "count": 0,
                        "initial": 0,
                        "replies": 0,
                        "forward": 0,
                        "follow_up": 0,
                        "initial_replies": 0,
                        "dailyStats": null,
                        "avg_wait": "N/A",
                        "avg_wait_raw": null,
                        "avg_first_wait": "N/A",
                        "avg_first_wait_raw": null
                    }
                },
                "overallTTR": {
                    "friendly": "N/A",
                    "raw": null,
                    "friendly_no_business": "N/A",
                    "raw_no_business": null,
                    "deviation_friendly": "N/A",
                    "deviation_raw": null,
                    "deviation_friendly_no_business": "N/A",
                    "deviation_raw_no_business": null,
                    "median_friendly": "N/A",
                    "median_raw": null,
                    "median_friendly_no_business": "N/A",
                    "median_raw_no_business": null,
                    "consistency_score": "N/A",
                    "consistency_score_no_business": "N/A",
                    "percentileRanks": [
                        {
                            "key": "2h:0m",
                            "value": 0,
                            "count": 0
                        },
                        {
                            "key": "4h:0m",
                            "value": 0,
                            "count": 0
                        },
                        {
                            "key": "8h:0m",
                            "value": 0,
                            "count": 0
                        },
                        {
                            "key": "16h:0m",
                            "value": 0,
                            "count": 0
                        }
                    ],
                    "percentileRanksRaw": [],
                    "within_sla": null,
                    "within_sla_percentage_friendly": "N/A",
                    "sla_breach": null,
                    "sla_breach_percentage_friendly": "N/A",
                    "excluded_from_sla": 0,
                    "excluded_from_sla_percentage_friendly": "N/A"
                },
                "overallTTF": {
                    "friendly": "N/A",
                    "raw": null,
                    "friendly_no_business": "N/A",
                    "raw_no_business": null
                },
                "initialTTR": {
                    "friendly": "N/A",
                    "raw": null,
                    "friendly_no_business": "N/A",
                    "raw_no_business": null,
                    "deviation_friendly": "N/A",
                    "deviation_raw": null,
                    "deviation_friendly_no_business": "N/A",
                    "deviation_raw_no_business": null,
                    "median_friendly": "N/A",
                    "median_raw": null,
                    "median_friendly_no_business": "N/A",
                    "median_raw_no_business": null,
                    "consistency_score": "N/A",
                    "consistency_score_no_business": "N/A",
                    "percentileRanks": [],
                    "percentileRanksRaw": [],
                    "within_sla": 0,
                    "within_sla_percentage_friendly": "N/A",
                    "sla_breach": 0,
                    "sla_breach_percentage_friendly": "N/A",
                    "excluded_from_sla": 0,
                    "excluded_from_sla_percentage_friendly": "N/A"
                },
                "overallTTC": {
                    "friendly": "N/A",
                    "raw": null,
                    "friendly_no_business": "N/A",
                    "raw_no_business": null,
                    "within_sla": 0,
                    "within_sla_percentage_friendly": "N/A",
                    "sla_breach": 0,
                    "sla_breach_percentage_friendly": "N/A",
                    "percentileRanks": [],
                    "percentileRanksRaw": []
                }
            },
            {
                "name": "[email protected]",
                "threads": {
                    "total": 0,
                    "internal": 0,
                    "inbound": 0,
                    "outbound": 0,
                    "sent_internally": 0,
                    "await_customer": 0,
                    "await_agent": 0,
                    "closed": 0,
                    "have_replies": 0,
                    "have_initial_replies": 0,
                    "handledRate": {
                        "rate": 0
                    },
                    "top_labels": [],
                    "messages_per_conversations_avg": "N/A",
                    "messages_received_per_conversations_avg": "N/A",
                    "messages_sent_per_conversations_avg": "N/A"
                },
                "messages": {
                    "count": 0,
                    "initial": 0,
                    "replies": 0,
                    "forward": 0,
                    "follow_up": 0,
                    "sent": {
                        "count": 0,
                        "initial": 0,
                        "replies": 0,
                        "forward": 0,
                        "follow_up": 0,
                        "initial_replies": 0,
                        "dailyStats": null
                    },
                    "received": {
                        "count": 0,
                        "initial": 0,
                        "replies": 0,
                        "forward": 0,
                        "follow_up": 0,
                        "initial_replies": 0,
                        "dailyStats": null,
                        "avg_wait": "N/A",
                        "avg_wait_raw": null,
                        "avg_first_wait": "N/A",
                        "avg_first_wait_raw": null
                    }
                },
                "overallTTR": {
                    "friendly": "N/A",
                    "raw": null,
                    "friendly_no_business": "N/A",
                    "raw_no_business": null,
                    "deviation_friendly": "N/A",
                    "deviation_raw": null,
                    "deviation_friendly_no_business": "N/A",
                    "deviation_raw_no_business": null,
                    "median_friendly": "N/A",
                    "median_raw": null,
                    "median_friendly_no_business": "N/A",
                    "median_raw_no_business": null,
                    "consistency_score": "N/A",
                    "consistency_score_no_business": "N/A",
                    "percentileRanks": [],
                    "percentileRanksRaw": [],
                    "within_sla": 0,
                    "within_sla_percentage_friendly": "N/A",
                    "sla_breach": 0,
                    "sla_breach_percentage_friendly": "N/A",
                    "excluded_from_sla": 0,
                    "excluded_from_sla_percentage_friendly": "N/A"
                },
                "overallTTF": {
                    "friendly": "N/A",
                    "raw": null,
                    "friendly_no_business": "N/A",
                    "raw_no_business": null
                },
                "initialTTR": {
                    "friendly": "N/A",
                    "raw": null,
                    "friendly_no_business": "N/A",
                    "raw_no_business": null,
                    "deviation_friendly": "N/A",
                    "deviation_raw": null,
                    "deviation_friendly_no_business": "N/A",
                    "deviation_raw_no_business": null,
                    "median_friendly": "N/A",
                    "median_raw": null,
                    "median_friendly_no_business": "N/A",
                    "median_raw_no_business": null,
                    "consistency_score": "N/A",
                    "consistency_score_no_business": "N/A",
                    "percentileRanks": [],
                    "percentileRanksRaw": [],
                    "within_sla": 0,
                    "within_sla_percentage_friendly": "N/A",
                    "sla_breach": 0,
                    "sla_breach_percentage_friendly": "N/A",
                    "excluded_from_sla": 0,
                    "excluded_from_sla_percentage_friendly": "N/A"
                },
                "overallTTC": {
                    "friendly": "N/A",
                    "raw": null,
                    "friendly_no_business": "N/A",
                    "raw_no_business": null,
                    "within_sla": 0,
                    "within_sla_percentage_friendly": "N/A",
                    "sla_breach": 0,
                    "sla_breach_percentage_friendly": "N/A"
                }
            }
        ],
        "overallTTR.raw": [
            {
                "name": "[email protected]",
                "threads": {
                    "total": 1,
                    "internal": 0,
                    "inbound": 0,
                    "outbound": 1,
                    "sent_internally": 0,
                    "await_customer": 0,
                    "await_agent": 0,
                    "closed": 0,
                    "have_replies": 0,
                    "have_initial_replies": 0,
                    "handledRate": {
                        "rate": 0
                    },
                    "top_labels": [],
                    "messages_per_conversations_avg": 1,
                    "messages_received_per_conversations_avg": 0,
                    "messages_sent_per_conversations_avg": 1
                },
                "messages": {
                    "count": 0,
                    "initial": 0,
                    "replies": 0,
                    "forward": 0,
                    "follow_up": 0,
                    "sent": {
                        "count": 1,
                        "initial": 1,
                        "replies": 0,
                        "forward": 0,
                        "follow_up": 0,
                        "initial_replies": 0,
                        "dailyStats": []
                    },
                    "received": {
                        "count": 0,
                        "initial": 0,
                        "replies": 0,
                        "forward": 0,
                        "follow_up": 0,
                        "initial_replies": 0,
                        "dailyStats": null,
                        "avg_wait": "N/A",
                        "avg_wait_raw": null,
                        "avg_first_wait": "N/A",
                        "avg_first_wait_raw": null
                    }
                },
                "overallTTR": {
                    "friendly": "N/A",
                    "raw": null,
                    "friendly_no_business": "N/A",
                    "raw_no_business": null,
                    "deviation_friendly": "N/A",
                    "deviation_raw": null,
                    "deviation_friendly_no_business": "N/A",
                    "deviation_raw_no_business": null,
                    "median_friendly": "N/A",
                    "median_raw": null,
                    "median_friendly_no_business": "N/A",
                    "median_raw_no_business": null,
                    "consistency_score": "N/A",
                    "consistency_score_no_business": "N/A",
                    "percentileRanks": [
                        {
                            "key": "2h:0m",
                            "value": 0,
                            "count": 0
                        },
                        {
                            "key": "4h:0m",
                            "value": 0,
                            "count": 0
                        },
                        {
                            "key": "8h:0m",
                            "value": 0,
                            "count": 0
                        },
                        {
                            "key": "16h:0m",
                            "value": 0,
                            "count": 0
                        }
                    ],
                    "percentileRanksRaw": [],
                    "within_sla": null,
                    "within_sla_percentage_friendly": "N/A",
                    "sla_breach": null,
                    "sla_breach_percentage_friendly": "N/A",
                    "excluded_from_sla": 0,
                    "excluded_from_sla_percentage_friendly": "N/A"
                },
                "overallTTF": {
                    "friendly": "N/A",
                    "raw": null,
                    "friendly_no_business": "N/A",
                    "raw_no_business": null
                },
                "initialTTR": {
                    "friendly": "N/A",
                    "raw": null,
                    "friendly_no_business": "N/A",
                    "raw_no_business": null,
                    "deviation_friendly": "N/A",
                    "deviation_raw": null,
                    "deviation_friendly_no_business": "N/A",
                    "deviation_raw_no_business": null,
                    "median_friendly": "N/A",
                    "median_raw": null,
                    "median_friendly_no_business": "N/A",
                    "median_raw_no_business": null,
                    "consistency_score": "N/A",
                    "consistency_score_no_business": "N/A",
                    "percentileRanks": [],
                    "percentileRanksRaw": [],
                    "within_sla": 0,
                    "within_sla_percentage_friendly": "N/A",
                    "sla_breach": 0,
                    "sla_breach_percentage_friendly": "N/A",
                    "excluded_from_sla": 0,
                    "excluded_from_sla_percentage_friendly": "N/A"
                },
                "overallTTC": {
                    "friendly": "N/A",
                    "raw": null,
                    "friendly_no_business": "N/A",
                    "raw_no_business": null,
                    "within_sla": 0,
                    "within_sla_percentage_friendly": "N/A",
                    "sla_breach": 0,
                    "sla_breach_percentage_friendly": "N/A",
                    "percentileRanks": [],
                    "percentileRanksRaw": []
                }
            },
            {
                "name": "[email protected]",
                "threads": {
                    "total": 0,
                    "internal": 0,
                    "inbound": 0,
                    "outbound": 0,
                    "sent_internally": 0,
                    "await_customer": 0,
                    "await_agent": 0,
                    "closed": 0,
                    "have_replies": 0,
                    "have_initial_replies": 0,
                    "handledRate": {
                        "rate": 0
                    },
                    "top_labels": [],
                    "messages_per_conversations_avg": "N/A",
                    "messages_received_per_conversations_avg": "N/A",
                    "messages_sent_per_conversations_avg": "N/A"
                },
                "messages": {
                    "count": 0,
                    "initial": 0,
                    "replies": 0,
                    "forward": 0,
                    "follow_up": 0,
                    "sent": {
                        "count": 0,
                        "initial": 0,
                        "replies": 0,
                        "forward": 0,
                        "follow_up": 0,
                        "initial_replies": 0,
                        "dailyStats": null
                    },
                    "received": {
                        "count": 0,
                        "initial": 0,
                        "replies": 0,
                        "forward": 0,
                        "follow_up": 0,
                        "initial_replies": 0,
                        "dailyStats": null,
                        "avg_wait": "N/A",
                        "avg_wait_raw": null,
                        "avg_first_wait": "N/A",
                        "avg_first_wait_raw": null
                    }
                },
                "overallTTR": {
                    "friendly": "N/A",
                    "raw": null,
                    "friendly_no_business": "N/A",
                    "raw_no_business": null,
                    "deviation_friendly": "N/A",
                    "deviation_raw": null,
                    "deviation_friendly_no_business": "N/A",
                    "deviation_raw_no_business": null,
                    "median_friendly": "N/A",
                    "median_raw": null,
                    "median_friendly_no_business": "N/A",
                    "median_raw_no_business": null,
                    "consistency_score": "N/A",
                    "consistency_score_no_business": "N/A",
                    "percentileRanks": [],
                    "percentileRanksRaw": [],
                    "within_sla": 0,
                    "within_sla_percentage_friendly": "N/A",
                    "sla_breach": 0,
                    "sla_breach_percentage_friendly": "N/A",
                    "excluded_from_sla": 0,
                    "excluded_from_sla_percentage_friendly": "N/A"
                },
                "overallTTF": {
                    "friendly": "N/A",
                    "raw": null,
                    "friendly_no_business": "N/A",
                    "raw_no_business": null
                },
                "initialTTR": {
                    "friendly": "N/A",
                    "raw": null,
                    "friendly_no_business": "N/A",
                    "raw_no_business": null,
                    "deviation_friendly": "N/A",
                    "deviation_raw": null,
                    "deviation_friendly_no_business": "N/A",
                    "deviation_raw_no_business": null,
                    "median_friendly": "N/A",
                    "median_raw": null,
                    "median_friendly_no_business": "N/A",
                    "median_raw_no_business": null,
                    "consistency_score": "N/A",
                    "consistency_score_no_business": "N/A",
                    "percentileRanks": [],
                    "percentileRanksRaw": [],
                    "within_sla": 0,
                    "within_sla_percentage_friendly": "N/A",
                    "sla_breach": 0,
                    "sla_breach_percentage_friendly": "N/A",
                    "excluded_from_sla": 0,
                    "excluded_from_sla_percentage_friendly": "N/A"
                },
                "overallTTC": {
                    "friendly": "N/A",
                    "raw": null,
                    "friendly_no_business": "N/A",
                    "raw_no_business": null,
                    "within_sla": 0,
                    "within_sla_percentage_friendly": "N/A",
                    "sla_breach": 0,
                    "sla_breach_percentage_friendly": "N/A"
                }
            }
        ],
        "threads.total": [
            {
                "name": "[email protected]",
                "threads": {
                    "total": 1,
                    "internal": 0,
                    "inbound": 0,
                    "outbound": 1,
                    "sent_internally": 0,
                    "await_customer": 0,
                    "await_agent": 0,
                    "closed": 0,
                    "have_replies": 0,
                    "have_initial_replies": 0,
                    "handledRate": {
                        "rate": 0
                    },
                    "top_labels": [],
                    "messages_per_conversations_avg": 1,
                    "messages_received_per_conversations_avg": 0,
                    "messages_sent_per_conversations_avg": 1
                },
                "messages": {
                    "count": 0,
                    "initial": 0,
                    "replies": 0,
                    "forward": 0,
                    "follow_up": 0,
                    "sent": {
                        "count": 1,
                        "initial": 1,
                        "replies": 0,
                        "forward": 0,
                        "follow_up": 0,
                        "initial_replies": 0,
                        "dailyStats": []
                    },
                    "received": {
                        "count": 0,
                        "initial": 0,
                        "replies": 0,
                        "forward": 0,
                        "follow_up": 0,
                        "initial_replies": 0,
                        "dailyStats": null,
                        "avg_wait": "N/A",
                        "avg_wait_raw": null,
                        "avg_first_wait": "N/A",
                        "avg_first_wait_raw": null
                    }
                },
                "overallTTR": {
                    "friendly": "N/A",
                    "raw": null,
                    "friendly_no_business": "N/A",
                    "raw_no_business": null,
                    "deviation_friendly": "N/A",
                    "deviation_raw": null,
                    "deviation_friendly_no_business": "N/A",
                    "deviation_raw_no_business": null,
                    "median_friendly": "N/A",
                    "median_raw": null,
                    "median_friendly_no_business": "N/A",
                    "median_raw_no_business": null,
                    "consistency_score": "N/A",
                    "consistency_score_no_business": "N/A",
                    "percentileRanks": [
                        {
                            "key": "2h:0m",
                            "value": 0,
                            "count": 0
                        },
                        {
                            "key": "4h:0m",
                            "value": 0,
                            "count": 0
                        },
                        {
                            "key": "8h:0m",
                            "value": 0,
                            "count": 0
                        },
                        {
                            "key": "16h:0m",
                            "value": 0,
                            "count": 0
                        }
                    ],
                    "percentileRanksRaw": [],
                    "within_sla": null,
                    "within_sla_percentage_friendly": "N/A",
                    "sla_breach": null,
                    "sla_breach_percentage_friendly": "N/A",
                    "excluded_from_sla": 0,
                    "excluded_from_sla_percentage_friendly": "N/A"
                },
                "overallTTF": {
                    "friendly": "N/A",
                    "raw": null,
                    "friendly_no_business": "N/A",
                    "raw_no_business": null
                },
                "initialTTR": {
                    "friendly": "N/A",
                    "raw": null,
                    "friendly_no_business": "N/A",
                    "raw_no_business": null,
                    "deviation_friendly": "N/A",
                    "deviation_raw": null,
                    "deviation_friendly_no_business": "N/A",
                    "deviation_raw_no_business": null,
                    "median_friendly": "N/A",
                    "median_raw": null,
                    "median_friendly_no_business": "N/A",
                    "median_raw_no_business": null,
                    "consistency_score": "N/A",
                    "consistency_score_no_business": "N/A",
                    "percentileRanks": [],
                    "percentileRanksRaw": [],
                    "within_sla": 0,
                    "within_sla_percentage_friendly": "N/A",
                    "sla_breach": 0,
                    "sla_breach_percentage_friendly": "N/A",
                    "excluded_from_sla": 0,
                    "excluded_from_sla_percentage_friendly": "N/A"
                },
                "overallTTC": {
                    "friendly": "N/A",
                    "raw": null,
                    "friendly_no_business": "N/A",
                    "raw_no_business": null,
                    "within_sla": 0,
                    "within_sla_percentage_friendly": "N/A",
                    "sla_breach": 0,
                    "sla_breach_percentage_friendly": "N/A",
                    "percentileRanks": [],
                    "percentileRanksRaw": []
                }
            },
            {
                "name": "[email protected]",
                "threads": {
                    "total": 0,
                    "internal": 0,
                    "inbound": 0,
                    "outbound": 0,
                    "sent_internally": 0,
                    "await_customer": 0,
                    "await_agent": 0,
                    "closed": 0,
                    "have_replies": 0,
                    "have_initial_replies": 0,
                    "handledRate": {
                        "rate": 0
                    },
                    "top_labels": [],
                    "messages_per_conversations_avg": "N/A",
                    "messages_received_per_conversations_avg": "N/A",
                    "messages_sent_per_conversations_avg": "N/A"
                },
                "messages": {
                    "count": 0,
                    "initial": 0,
                    "replies": 0,
                    "forward": 0,
                    "follow_up": 0,
                    "sent": {
                        "count": 0,
                        "initial": 0,
                        "replies": 0,
                        "forward": 0,
                        "follow_up": 0,
                        "initial_replies": 0,
                        "dailyStats": null
                    },
                    "received": {
                        "count": 0,
                        "initial": 0,
                        "replies": 0,
                        "forward": 0,
                        "follow_up": 0,
                        "initial_replies": 0,
                        "dailyStats": null,
                        "avg_wait": "N/A",
                        "avg_wait_raw": null,
                        "avg_first_wait": "N/A",
                        "avg_first_wait_raw": null
                    }
                },
                "overallTTR": {
                    "friendly": "N/A",
                    "raw": null,
                    "friendly_no_business": "N/A",
                    "raw_no_business": null,
                    "deviation_friendly": "N/A",
                    "deviation_raw": null,
                    "deviation_friendly_no_business": "N/A",
                    "deviation_raw_no_business": null,
                    "median_friendly": "N/A",
                    "median_raw": null,
                    "median_friendly_no_business": "N/A",
                    "median_raw_no_business": null,
                    "consistency_score": "N/A",
                    "consistency_score_no_business": "N/A",
                    "percentileRanks": [],
                    "percentileRanksRaw": [],
                    "within_sla": 0,
                    "within_sla_percentage_friendly": "N/A",
                    "sla_breach": 0,
                    "sla_breach_percentage_friendly": "N/A",
                    "excluded_from_sla": 0,
                    "excluded_from_sla_percentage_friendly": "N/A"
                },
                "overallTTF": {
                    "friendly": "N/A",
                    "raw": null,
                    "friendly_no_business": "N/A",
                    "raw_no_business": null
                },
                "initialTTR": {
                    "friendly": "N/A",
                    "raw": null,
                    "friendly_no_business": "N/A",
                    "raw_no_business": null,
                    "deviation_friendly": "N/A",
                    "deviation_raw": null,
                    "deviation_friendly_no_business": "N/A",
                    "deviation_raw_no_business": null,
                    "median_friendly": "N/A",
                    "median_raw": null,
                    "median_friendly_no_business": "N/A",
                    "median_raw_no_business": null,
                    "consistency_score": "N/A",
                    "consistency_score_no_business": "N/A",
                    "percentileRanks": [],
                    "percentileRanksRaw": [],
                    "within_sla": 0,
                    "within_sla_percentage_friendly": "N/A",
                    "sla_breach": 0,
                    "sla_breach_percentage_friendly": "N/A",
                    "excluded_from_sla": 0,
                    "excluded_from_sla_percentage_friendly": "N/A"
                },
                "overallTTC": {
                    "friendly": "N/A",
                    "raw": null,
                    "friendly_no_business": "N/A",
                    "raw_no_business": null,
                    "within_sla": 0,
                    "within_sla_percentage_friendly": "N/A",
                    "sla_breach": 0,
                    "sla_breach_percentage_friendly": "N/A"
                }
            }
        ]
    },
    "pagination": {
        "total": 5,
        "page": 1
    },
    "args": {
        "model": {
            "icon": "building",
            "id": null,
            "model_type": "Internal",
            "name": "My Company",
            "value": "My Company"
        },
        "modelCom": {
            "id": 1,
            "name": "Top Revenue Customers",
            "email_usernames": [
                "[email protected]",
                "[email protected]"
            ],
            "customer_domains": [
                "cormier.com",
                "hills.com"
            ],
            "model_type": "Contact Group",
            "icon": "user-friends"
        }
    }
}
 

Request   

GET api/reports/comparative

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

from   string  optional  

The start date of your request in the format "YYYY-MM-DD". Must be less than or equal to "to". Example: 2020-01-01

to   string  optional  

The end date of your request in the format "YYYY-MM-DD". Must be greater than or equal to "from". Example: 2020-01-08

model   string  optional  

The ID, Name, email address or domain you want statistics for. Use the models endpoint to get a list. Example: My Company

model_type   string  optional  

Model Type of the model being queried. Use "Contact" for email address and domain. Example: Internal

exclude_cc   boolean  optional  

Should we exclude CC messages from the statistics. Example: false

model_com   string  optional  

Model Communicating With, same as Model, except now for who/what the Model is communicating with. Example: 1

model_type_com   string  optional  

Model Type of the model you are communicating with. Use "Contact" for email address and domain. Example: Contact Group

exclude_cc_com   boolean  optional  

Should we exclude CC messages from the statistics for the communicating with model. Example: false

exclusive   boolean  optional  

Should we only focus on statistics where exclusively Model and ModelCom were involved?. Example: false

search   string  optional  

Search a specific email subject line (warning this is very slow!).

label   string[]  optional  

Label, if your mail provider supports labels/categories, you can filter your results using them.

thread_type   string  optional  

A comma separated list (no spaces) of any combination of the following: inbound,outbound,internal. Example: inbound,outbound,internal

thread_status   string  optional  

A comma separated list (no spaces) of any combination of the following: internal,await-customer,closed,await-agent. Example: internal,await-customer,closed,await-agent

has_replies   string  optional  

A comma separated list (no spaces) of any combination of the following: hasReplies,hasForwards,hasNoRepliesOrForwards. Example: hasReplies,hasForwards,hasNoRepliesOrForwards

classification   string  optional  

A comma separated list (no spaces) of any combination of the following: calculating,first,reply,reply-all,forward,follow-up. Example: calculating,first,reply,reply-all,forward

messageType   string  optional  

A comma separated list (no spaces) of any combination of the following: inbound,outbound,internal. Example: inbound,outbound,internal

replies_over   integer  optional  

Limit results to conversations with first reply times over X minutes. Should not be used at same time as message_replies_over. Example: 15

message_replies_over   integer  optional  

Limit results to messages where the reply time was over X minutes. Should not be used at same time as replies_over. Example: 15

no_reply_for   integer  optional  

Limit results to messages that have not had a reply for at least X minutes. Example: 15

per_page   integer  optional  

For paginated results, how many results per page. Max 200. Example: 2

direction   string  optional  

Direction in which to sort paginated results. Must be either asc or desc. Example: desc

page   integer  optional  

For paginated results, which page to get. Example: 1

Interactions

Interactions - Report

requires authentication

Interactions Report Data

Example request:
const url = new URL(
    "https://portal.timetoreply.com/api/reports/interactions"
);

const params = {
    "from": "2020-01-01",
    "to": "2020-01-08",
    "model": "1",
    "model_type": "Mailbox",
    "exclude_cc": "0",
    "model_com": "1",
    "model_type_com": "Contact Group",
    "exclude_cc_com": "0",
    "exclusive": "0",
    "label[0]": "INBOX",
    "thread_type": "inbound,outbound,internal",
    "thread_status": "internal,await-customer,closed,await-agent",
    "has_replies": "hasReplies,hasForwards,hasNoRepliesOrForwards",
    "classification": "calculating,first,reply,reply-all,forward",
    "messageType": "inbound,outbound,internal",
    "replies_over": "15",
    "message_replies_over": "15",
    "no_reply_for": "15",
    "per_page": "2",
    "direction": "desc",
    "page": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/reports/interactions';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'from' => '2020-01-01',
            'to' => '2020-01-08',
            'model' => '1',
            'model_type' => 'Mailbox',
            'exclude_cc' => '0',
            'model_com' => '1',
            'model_type_com' => 'Contact Group',
            'exclude_cc_com' => '0',
            'exclusive' => '0',
            'label[0]' => 'INBOX',
            'thread_type' => 'inbound,outbound,internal',
            'thread_status' => 'internal,await-customer,closed,await-agent',
            'has_replies' => 'hasReplies,hasForwards,hasNoRepliesOrForwards',
            'classification' => 'calculating,first,reply,reply-all,forward',
            'messageType' => 'inbound,outbound,internal',
            'replies_over' => '15',
            'message_replies_over' => '15',
            'no_reply_for' => '15',
            'per_page' => '2',
            'direction' => 'desc',
            'page' => '1',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://portal.timetoreply.com/api/reports/interactions?from=2020-01-01&to=2020-01-08&model=1&model_type=Mailbox&exclude_cc=&model_com=1&model_type_com=Contact+Group&exclude_cc_com=&exclusive=&label[]=INBOX&thread_type=inbound%2Coutbound%2Cinternal&thread_status=internal%2Cawait-customer%2Cclosed%2Cawait-agent&has_replies=hasReplies%2ChasForwards%2ChasNoRepliesOrForwards&classification=calculating%2Cfirst%2Creply%2Creply-all%2Cforward&messageType=inbound%2Coutbound%2Cinternal&replies_over=15&message_replies_over=15&no_reply_for=15&per_page=2&direction=desc&page=1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
tracking-events: []
 

{
    "[email protected]": {
        "interactions": {
            "[email protected]": {
                "to": 1,
                "email": "[email protected]",
                "from": 0,
                "cc": 0
            },
            "[email protected]": {
                "to": 1,
                "email": "[email protected]",
                "from": 0,
                "cc": 0
            },
            "[email protected]": {
                "to": 1,
                "email": "[email protected]",
                "from": 0,
                "cc": 0
            },
            "[email protected]": {
                "to": 1,
                "email": "[email protected]",
                "from": 0,
                "cc": 0
            }
        },
        "agent": {
            "key": 0,
            "email_username": "[email protected]"
        }
    }
}
 

Request   

GET api/reports/interactions

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

from   string  optional  

The start date of your request in the format "YYYY-MM-DD". Must be less than or equal to "to". Example: 2020-01-01

to   string  optional  

The end date of your request in the format "YYYY-MM-DD". Must be greater than or equal to "from". Example: 2020-01-08

model   string  optional  

The ID or Name of the mailbox you want results for. Example: 1

model_type   string  optional  

Model Type of the mailbox being queried. For this report, it must be "Mailbox". Example: Mailbox

exclude_cc   boolean  optional  

Should we exclude CC messages from the statistics. Example: false

model_com   string  optional  

Model Communicating With, same as Model, except now for who/what the Model is communicating with. Example: 1

model_type_com   string  optional  

Model Type of the model you are communicating with. Use "Contact" for email address and domain. Example: Contact Group

exclude_cc_com   boolean  optional  

Should we exclude CC messages from the statistics for the communicating with model. Example: false

exclusive   boolean  optional  

Should we only focus on statistics where exclusively Model and ModelCom were involved?. Example: false

search   string  optional  

Search a specific email subject line (warning this is very slow!).

label   string[]  optional  

Label, if your mail provider supports labels/categories, you can filter your results using them.

thread_type   string  optional  

A comma separated list (no spaces) of any combination of the following: inbound,outbound,internal. Example: inbound,outbound,internal

thread_status   string  optional  

A comma separated list (no spaces) of any combination of the following: internal,await-customer,closed,await-agent. Example: internal,await-customer,closed,await-agent

has_replies   string  optional  

A comma separated list (no spaces) of any combination of the following: hasReplies,hasForwards,hasNoRepliesOrForwards. Example: hasReplies,hasForwards,hasNoRepliesOrForwards

classification   string  optional  

A comma separated list (no spaces) of any combination of the following: calculating,first,reply,reply-all,forward,follow-up. Example: calculating,first,reply,reply-all,forward

messageType   string  optional  

A comma separated list (no spaces) of any combination of the following: inbound,outbound,internal. Example: inbound,outbound,internal

replies_over   integer  optional  

Limit results to conversations with first reply times over X minutes. Should not be used at same time as message_replies_over. Example: 15

message_replies_over   integer  optional  

Limit results to messages where the reply time was over X minutes. Should not be used at same time as replies_over. Example: 15

no_reply_for   integer  optional  

Limit results to messages that have not had a reply for at least X minutes. Example: 15

per_page   integer  optional  

For paginated results, how many results per page. Max 200. Example: 2

direction   string  optional  

Direction in which to sort paginated results. Must be either asc or desc. Example: desc

page   integer  optional  

For paginated results, which page to get. Example: 1

SLA

SLA - Report

requires authentication

SLA Report Data

Example request:
const url = new URL(
    "https://portal.timetoreply.com/api/reports/sla"
);

const params = {
    "from": "2020-01-01",
    "to": "2020-01-08",
    "model": "My Company",
    "model_type": "Internal",
    "exclude_cc": "0",
    "model_com": "1",
    "model_type_com": "Contact Group",
    "exclude_cc_com": "0",
    "exclusive": "0",
    "label[0]": "INBOX",
    "thread_type": "inbound,outbound,internal",
    "thread_status": "internal,await-customer,closed,await-agent",
    "has_replies": "hasReplies,hasForwards,hasNoRepliesOrForwards",
    "classification": "calculating,first,reply,reply-all,forward",
    "messageType": "inbound,outbound,internal",
    "replies_over": "15",
    "message_replies_over": "15",
    "no_reply_for": "15",
    "per_page": "2",
    "sort_by": "threads.total",
    "direction": "desc",
    "page": "1",
    "init_ttr_goal": "02:00:00",
    "overall_ttr_goal": "02:00:00",
    "overall_ttc_goal": "02:00:00",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/reports/sla';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'from' => '2020-01-01',
            'to' => '2020-01-08',
            'model' => 'My Company',
            'model_type' => 'Internal',
            'exclude_cc' => '0',
            'model_com' => '1',
            'model_type_com' => 'Contact Group',
            'exclude_cc_com' => '0',
            'exclusive' => '0',
            'label[0]' => 'INBOX',
            'thread_type' => 'inbound,outbound,internal',
            'thread_status' => 'internal,await-customer,closed,await-agent',
            'has_replies' => 'hasReplies,hasForwards,hasNoRepliesOrForwards',
            'classification' => 'calculating,first,reply,reply-all,forward',
            'messageType' => 'inbound,outbound,internal',
            'replies_over' => '15',
            'message_replies_over' => '15',
            'no_reply_for' => '15',
            'per_page' => '2',
            'sort_by' => 'threads.total',
            'direction' => 'desc',
            'page' => '1',
            'init_ttr_goal' => '02:00:00',
            'overall_ttr_goal' => '02:00:00',
            'overall_ttc_goal' => '02:00:00',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://portal.timetoreply.com/api/reports/sla?from=2020-01-01&to=2020-01-08&model=My+Company&model_type=Internal&exclude_cc=&model_com=1&model_type_com=Contact+Group&exclude_cc_com=&exclusive=&label[]=INBOX&thread_type=inbound%2Coutbound%2Cinternal&thread_status=internal%2Cawait-customer%2Cclosed%2Cawait-agent&has_replies=hasReplies%2ChasForwards%2ChasNoRepliesOrForwards&classification=calculating%2Cfirst%2Creply%2Creply-all%2Cforward&messageType=inbound%2Coutbound%2Cinternal&replies_over=15&message_replies_over=15&no_reply_for=15&per_page=2&sort_by=threads.total&direction=desc&page=1&init_ttr_goal=02%3A00%3A00&overall_ttr_goal=02%3A00%3A00&overall_ttc_goal=02%3A00%3A00" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
tracking-events: []
 

{
    "stats": {
        "threads": {
            "total": 1,
            "internal": 0,
            "inbound": 0,
            "outbound": 1,
            "sent_internally": 0,
            "await_customer": 0,
            "await_agent": 1,
            "closed": 0,
            "have_replies": 0,
            "have_replies_from_agents": 0,
            "have_no_replies_from_agents": 1,
            "completionRatio": {
                "ratio": 0,
                "numerator": 0,
                "denominator": 0
            },
            "handledRate": {
                "rate": 0,
                "numerator": 0,
                "denominator": 1
            },
            "labels": {
                "total": 7,
                "list": [
                    {
                        "key": "CATEGORY_PERSONAL",
                        "doc_count": 1
                    },
                    {
                        "key": "CATEGORY_PROMOTIONS",
                        "doc_count": 1
                    },
                    {
                        "key": "IMPORTANT",
                        "doc_count": 1
                    },
                    {
                        "key": "INBOX",
                        "doc_count": 1
                    },
                    {
                        "key": "SENT",
                        "doc_count": 1
                    },
                    {
                        "key": "STARRED",
                        "doc_count": 1
                    },
                    {
                        "key": "UNREAD",
                        "doc_count": 1
                    }
                ]
            },
            "messages_per_conversations_avg": 1,
            "messages_sent_per_conversations_avg": 1,
            "messages_received_per_conversations_avg": 0,
            "top_labels": ""
        },
        "messages": {
            "count": 1,
            "initial": 1,
            "replies": 0,
            "forward": 0,
            "follow_up": 0,
            "received": {
                "count": 0,
                "initial": 0,
                "replies": 0,
                "forward": 0,
                "follow_up": 0,
                "initial_replies": 0,
                "dayOfWeek": {
                    "Monday": 0,
                    "Tuesday": 0,
                    "Wednesday": 0,
                    "Thursday": 0,
                    "Friday": 0,
                    "Saturday": 0,
                    "Sunday": 0
                },
                "hourOfDay": {
                    "00:00": 0,
                    "01:00": 0,
                    "02:00": 0,
                    "03:00": 0,
                    "04:00": 0,
                    "05:00": 0,
                    "06:00": 0,
                    "07:00": 0,
                    "08:00": 0,
                    "09:00": 0,
                    "10:00": 0,
                    "11:00": 0,
                    "12:00": 0,
                    "13:00": 0,
                    "14:00": 0,
                    "15:00": 0,
                    "16:00": 0,
                    "17:00": 0,
                    "18:00": 0,
                    "19:00": 0,
                    "20:00": 0,
                    "21:00": 0,
                    "22:00": 0,
                    "23:00": 0
                },
                "avg_wait": "N/A",
                "avg_wait_raw": null,
                "avg_first_wait": "N/A",
                "avg_first_wait_raw": null
            },
            "sent": {
                "count": 1,
                "initial": 1,
                "replies": 0,
                "forward": 0,
                "follow_up": 0,
                "initial_replies": 0,
                "dayOfWeek": {
                    "Monday": 0,
                    "Tuesday": 0,
                    "Wednesday": 0,
                    "Thursday": 0,
                    "Friday": 0,
                    "Saturday": 0,
                    "Sunday": 0
                },
                "hourOfDay": {
                    "00:00": 0,
                    "01:00": 0,
                    "02:00": 0,
                    "03:00": 0,
                    "04:00": 0,
                    "05:00": 0,
                    "06:00": 0,
                    "07:00": 0,
                    "08:00": 0,
                    "09:00": 0,
                    "10:00": 0,
                    "11:00": 0,
                    "12:00": 0,
                    "13:00": 0,
                    "14:00": 0,
                    "15:00": 0,
                    "16:00": 0,
                    "17:00": 0,
                    "18:00": 0,
                    "19:00": 0,
                    "20:00": 0,
                    "21:00": 0,
                    "22:00": 0,
                    "23:00": 0
                }
            }
        },
        "overallTTR": {
            "friendly": "N/A",
            "raw": null,
            "friendly_no_business": "N/A",
            "raw_no_business": null,
            "deviation_friendly": "N/A",
            "deviation_raw": null,
            "deviation_friendly_no_business": "N/A",
            "deviation_raw_no_business": null,
            "median_friendly": "N/A",
            "median_raw": null,
            "median_friendly_no_business": "N/A",
            "median_raw_no_business": null,
            "consistency_score": "N/A",
            "consistency_score_no_business": "N/A",
            "percentileRanks": [
                {
                    "key": "2h:0m",
                    "value": 0,
                    "count": 0
                },
                {
                    "key": "4h:0m",
                    "value": 0,
                    "count": 0
                },
                {
                    "key": "8h:0m",
                    "value": 0,
                    "count": 0
                },
                {
                    "key": "16h:0m",
                    "value": 0,
                    "count": 0
                }
            ],
            "percentileRanksRaw": [
                {
                    "key": "2h:0m",
                    "value": 0,
                    "count": 0
                },
                {
                    "key": "4h:0m",
                    "value": 0,
                    "count": 0
                },
                {
                    "key": "8h:0m",
                    "value": 0,
                    "count": 0
                },
                {
                    "key": "16h:0m",
                    "value": 0,
                    "count": 0
                }
            ],
            "within_sla": 0,
            "within_sla_percentage_friendly": "N/A",
            "sla_breach": 0,
            "sla_breach_percentage_friendly": "N/A",
            "excluded_from_sla": 0,
            "excluded_from_sla_percentage_friendly": "N/A"
        },
        "initialTTR": {
            "friendly": "N/A",
            "raw": null,
            "friendly_no_business": "N/A",
            "raw_no_business": null,
            "deviation_friendly": "N/A",
            "deviation_raw": null,
            "deviation_friendly_no_business": "N/A",
            "deviation_raw_no_business": null,
            "median_friendly": "N/A",
            "median_raw": null,
            "median_friendly_no_business": "N/A",
            "median_raw_no_business": null,
            "consistency_score": "N/A",
            "consistency_score_no_business": "N/A",
            "percentileRanks": [
                {
                    "key": "1h:0m",
                    "value": 0,
                    "count": 0
                },
                {
                    "key": "2h:0m",
                    "value": 0,
                    "count": 0
                },
                {
                    "key": "4h:0m",
                    "value": 0,
                    "count": 0
                },
                {
                    "key": "8h:0m",
                    "value": 0,
                    "count": 0
                }
            ],
            "percentileRanksRaw": [
                {
                    "key": "1h:0m",
                    "value": 0,
                    "count": 0
                },
                {
                    "key": "2h:0m",
                    "value": 0,
                    "count": 0
                },
                {
                    "key": "4h:0m",
                    "value": 0,
                    "count": 0
                },
                {
                    "key": "8h:0m",
                    "value": 0,
                    "count": 0
                }
            ],
            "within_sla": 0,
            "within_sla_percentage_friendly": "N/A",
            "sla_breach": 0,
            "sla_breach_percentage_friendly": "N/A",
            "excluded_from_sla": 0,
            "excluded_from_sla_percentage_friendly": "N/A"
        },
        "overallTTF": {
            "friendly": "N/A",
            "raw": null,
            "friendly_no_business": "N/A",
            "raw_no_business": null
        },
        "overallTTC": {
            "friendly": "N/A",
            "raw": null,
            "friendly_no_business": "N/A",
            "raw_no_business": null,
            "percentileRanks": [
                {
                    "key": "12h:0m",
                    "value": 0,
                    "count": 0
                },
                {
                    "key": "24h:0m",
                    "value": 0,
                    "count": 0
                },
                {
                    "key": "48h:0m",
                    "value": 0,
                    "count": 0
                },
                {
                    "key": "96h:0m",
                    "value": 0,
                    "count": 0
                }
            ],
            "percentileRanksRaw": [
                {
                    "key": "12h:0m",
                    "value": 0,
                    "count": 0
                },
                {
                    "key": "24h:0m",
                    "value": 0,
                    "count": 0
                },
                {
                    "key": "48h:0m",
                    "value": 0,
                    "count": 0
                },
                {
                    "key": "96h:0m",
                    "value": 0,
                    "count": 0
                }
            ],
            "within_sla": 0,
            "within_sla_percentage_friendly": "N/A",
            "sla_breach": 0,
            "sla_breach_percentage_friendly": "N/A"
        },
        "dailyStats": []
    },
    "previous_period": {
        "threads": {
            "total": 1,
            "internal": 0,
            "inbound": 1,
            "outbound": 0,
            "sent_internally": 0,
            "await_customer": 0,
            "await_agent": 1,
            "closed": 0,
            "have_replies": 1,
            "have_replies_from_agents": 1,
            "have_no_replies_from_agents": 0,
            "completionRatio": {
                "ratio": 100,
                "numerator": 1,
                "denominator": 1
            },
            "handledRate": {
                "rate": 0,
                "numerator": 0,
                "denominator": 1
            },
            "labels": {
                "total": 1,
                "list": [
                    {
                        "key": "UNREAD",
                        "doc_count": 1
                    }
                ]
            },
            "messages_per_conversations_avg": 3,
            "messages_sent_per_conversations_avg": 1,
            "messages_received_per_conversations_avg": 2,
            "top_labels": ""
        },
        "messages": {
            "count": 3,
            "initial": 1,
            "replies": 2,
            "forward": 0,
            "follow_up": 0,
            "received": {
                "count": 2,
                "initial": 1,
                "replies": 1,
                "forward": 0,
                "follow_up": 0,
                "initial_replies": 0,
                "dayOfWeek": {
                    "Monday": 0,
                    "Tuesday": 0,
                    "Wednesday": 0,
                    "Thursday": 0,
                    "Friday": 0,
                    "Saturday": 0,
                    "Sunday": 0
                },
                "hourOfDay": {
                    "00:00": 0,
                    "01:00": 0,
                    "02:00": 0,
                    "03:00": 0,
                    "04:00": 0,
                    "05:00": 0,
                    "06:00": 0,
                    "07:00": 0,
                    "08:00": 0,
                    "09:00": 0,
                    "10:00": 0,
                    "11:00": 0,
                    "12:00": 0,
                    "13:00": 0,
                    "14:00": 0,
                    "15:00": 0,
                    "16:00": 0,
                    "17:00": 0,
                    "18:00": 0,
                    "19:00": 0,
                    "20:00": 0,
                    "21:00": 0,
                    "22:00": 0,
                    "23:00": 0
                },
                "avg_wait": "239h:59m",
                "avg_wait_raw": 863966,
                "avg_first_wait": "N/A",
                "avg_first_wait_raw": null
            },
            "sent": {
                "count": 1,
                "initial": 0,
                "replies": 1,
                "forward": 0,
                "follow_up": 0,
                "initial_replies": 1,
                "dayOfWeek": {
                    "Monday": 0,
                    "Tuesday": 0,
                    "Wednesday": 0,
                    "Thursday": 0,
                    "Friday": 0,
                    "Saturday": 0,
                    "Sunday": 0
                },
                "hourOfDay": {
                    "00:00": 0,
                    "01:00": 0,
                    "02:00": 0,
                    "03:00": 0,
                    "04:00": 0,
                    "05:00": 0,
                    "06:00": 0,
                    "07:00": 0,
                    "08:00": 0,
                    "09:00": 0,
                    "10:00": 0,
                    "11:00": 0,
                    "12:00": 0,
                    "13:00": 0,
                    "14:00": 0,
                    "15:00": 0,
                    "16:00": 0,
                    "17:00": 0,
                    "18:00": 0,
                    "19:00": 0,
                    "20:00": 0,
                    "21:00": 0,
                    "22:00": 0,
                    "23:00": 0
                }
            }
        },
        "overallTTR": {
            "friendly": "24m:33s",
            "raw": 1473,
            "friendly_no_business": "24m:33s",
            "raw_no_business": 1473,
            "deviation_friendly": "0s",
            "deviation_raw": 0,
            "deviation_friendly_no_business": "0s",
            "deviation_raw_no_business": 0,
            "median_friendly": "24m:33s",
            "median_raw": 1473,
            "median_friendly_no_business": "24m:33s",
            "median_raw_no_business": 1473,
            "consistency_score": "100%",
            "consistency_score_no_business": "100%",
            "percentileRanks": [
                {
                    "key": "2h:0m",
                    "value": 100,
                    "count": 0
                },
                {
                    "key": "4h:0m",
                    "value": 100,
                    "count": 0
                },
                {
                    "key": "8h:0m",
                    "value": 100,
                    "count": 0
                },
                {
                    "key": "16h:0m",
                    "value": 100,
                    "count": 0
                }
            ],
            "percentileRanksRaw": [
                {
                    "key": "2h:0m",
                    "value": 100,
                    "count": 0
                },
                {
                    "key": "4h:0m",
                    "value": 100,
                    "count": 0
                },
                {
                    "key": "8h:0m",
                    "value": 100,
                    "count": 0
                },
                {
                    "key": "16h:0m",
                    "value": 100,
                    "count": 0
                }
            ],
            "within_sla": 1,
            "within_sla_percentage_friendly": 100,
            "sla_breach": 0,
            "sla_breach_percentage_friendly": 0,
            "excluded_from_sla": 0,
            "excluded_from_sla_percentage_friendly": 0
        },
        "initialTTR": {
            "friendly": "24m:33s",
            "raw": 1473,
            "friendly_no_business": "24m:33s",
            "raw_no_business": 1473,
            "deviation_friendly": "0s",
            "deviation_raw": 0,
            "deviation_friendly_no_business": "0s",
            "deviation_raw_no_business": 0,
            "median_friendly": "24m:33s",
            "median_raw": 1473,
            "median_friendly_no_business": "24m:33s",
            "median_raw_no_business": 1473,
            "consistency_score": "100%",
            "consistency_score_no_business": "100%",
            "percentileRanks": [
                {
                    "key": "1h:0m",
                    "value": 100,
                    "count": 0
                },
                {
                    "key": "2h:0m",
                    "value": 100,
                    "count": 0
                },
                {
                    "key": "4h:0m",
                    "value": 100,
                    "count": 0
                },
                {
                    "key": "8h:0m",
                    "value": 100,
                    "count": 0
                }
            ],
            "percentileRanksRaw": [
                {
                    "key": "1h:0m",
                    "value": 100,
                    "count": 0
                },
                {
                    "key": "2h:0m",
                    "value": 100,
                    "count": 0
                },
                {
                    "key": "4h:0m",
                    "value": 100,
                    "count": 0
                },
                {
                    "key": "8h:0m",
                    "value": 100,
                    "count": 0
                }
            ],
            "within_sla": 1,
            "within_sla_percentage_friendly": 100,
            "sla_breach": 0,
            "sla_breach_percentage_friendly": 0,
            "excluded_from_sla": 0,
            "excluded_from_sla_percentage_friendly": 0
        },
        "overallTTF": {
            "friendly": "N/A",
            "raw": null,
            "friendly_no_business": "N/A",
            "raw_no_business": null
        },
        "overallTTC": {
            "friendly": "N/A",
            "raw": null,
            "friendly_no_business": "N/A",
            "raw_no_business": null,
            "percentileRanks": [
                {
                    "key": "12h:0m",
                    "value": 0,
                    "count": 0
                },
                {
                    "key": "24h:0m",
                    "value": 0,
                    "count": 0
                },
                {
                    "key": "48h:0m",
                    "value": 0,
                    "count": 0
                },
                {
                    "key": "96h:0m",
                    "value": 0,
                    "count": 0
                }
            ],
            "percentileRanksRaw": [
                {
                    "key": "12h:0m",
                    "value": 0,
                    "count": 0
                },
                {
                    "key": "24h:0m",
                    "value": 0,
                    "count": 0
                },
                {
                    "key": "48h:0m",
                    "value": 0,
                    "count": 0
                },
                {
                    "key": "96h:0m",
                    "value": 0,
                    "count": 0
                }
            ],
            "within_sla": 0,
            "within_sla_percentage_friendly": "N/A",
            "sla_breach": 0,
            "sla_breach_percentage_friendly": "N/A"
        },
        "dailyStats": []
    },
    "all_agent_stats": {
        "maxima": {
            "name": "Total",
            "threads.total": 1,
            "threads.internal": 0,
            "threads.inbound": 0,
            "threads.outbound": 1,
            "threads.sent_internally": 0,
            "threads.await_customer": 0,
            "threads.await_agent": 1,
            "threads.closed": 0,
            "threads.have_replies": 0,
            "threads.handledRate.rate": 0,
            "threads.messages_per_conversations_avg": 1,
            "threads.messages_sent_per_conversations_avg": 1,
            "threads.messages_received_per_conversations_avg": 0,
            "threads.top_labels": "",
            "messages.received.count": 0,
            "messages.received.initial": 0,
            "messages.received.replies": 0,
            "messages.received.forward": 0,
            "messages.received.follow_up": 0,
            "messages.received.avg_first_wait": "N/A",
            "messages.received.avg_wait": "N/A",
            "messages.sent.count": 1,
            "messages.sent.initial": 1,
            "messages.sent.replies": 0,
            "messages.sent.forward": 0,
            "messages.sent.follow_up": 0,
            "overallTTR.friendly": "N/A",
            "overallTTR.friendly_no_business": "N/A",
            "overallTTR.deviation_friendly": "N/A",
            "overallTTR.deviation_friendly_no_business": "N/A",
            "overallTTR.median_friendly": "N/A",
            "overallTTR.median_friendly_no_business": "N/A",
            "overallTTR.consistency_score": "N/A",
            "overallTTR.consistency_score_no_business": "N/A",
            "initialTTR.friendly": "N/A",
            "initialTTR.friendly_no_business": "N/A",
            "initialTTR.deviation_friendly": "N/A",
            "initialTTR.deviation_friendly_no_business": "N/A",
            "initialTTR.median_friendly": "N/A",
            "initialTTR.median_friendly_no_business": "N/A",
            "initialTTR.consistency_score": "N/A",
            "initialTTR.consistency_score_no_business": "N/A",
            "overallTTC.friendly": "N/A",
            "overallTTC.friendly_no_business": "N/A",
            "overallTTF.friendly": "N/A",
            "overallTTF.friendly_no_business": "N/A"
        },
        "data": {
            "current_page": 1,
            "data": [
                {
                    "name": "[email protected]",
                    "threads": {
                        "total": 1,
                        "internal": 0,
                        "inbound": 0,
                        "outbound": 1,
                        "sent_internally": 0,
                        "await_customer": 0,
                        "await_agent": 1,
                        "closed": 0,
                        "have_replies": 0,
                        "have_initial_replies": 0,
                        "handledRate": {
                            "rate": 0
                        },
                        "top_labels": [
                            "CATEGORY_PERSONAL",
                            "CATEGORY_PROMOTIONS",
                            "IMPORTANT",
                            "INBOX",
                            "SENT"
                        ],
                        "messages_per_conversations_avg": 1,
                        "messages_received_per_conversations_avg": 0,
                        "messages_sent_per_conversations_avg": 1
                    },
                    "messages": {
                        "count": 0,
                        "initial": 0,
                        "replies": 0,
                        "forward": 0,
                        "follow_up": 0,
                        "sent": {
                            "count": 1,
                            "initial": 1,
                            "replies": 0,
                            "forward": 0,
                            "follow_up": 0,
                            "initial_replies": 0,
                            "dailyStats": []
                        },
                        "received": {
                            "count": 0,
                            "initial": 0,
                            "replies": 0,
                            "forward": 0,
                            "follow_up": 0,
                            "initial_replies": 0,
                            "dailyStats": null,
                            "avg_wait": "N/A",
                            "avg_wait_raw": null,
                            "avg_first_wait": "N/A",
                            "avg_first_wait_raw": null
                        }
                    },
                    "overallTTR": {
                        "friendly": "N/A",
                        "raw": null,
                        "friendly_no_business": "N/A",
                        "raw_no_business": null,
                        "deviation_friendly": "N/A",
                        "deviation_raw": null,
                        "deviation_friendly_no_business": "N/A",
                        "deviation_raw_no_business": null,
                        "median_friendly": "N/A",
                        "median_raw": null,
                        "median_friendly_no_business": "N/A",
                        "median_raw_no_business": null,
                        "consistency_score": "N/A",
                        "consistency_score_no_business": "N/A",
                        "percentileRanks": [
                            {
                                "key": "2h:0m",
                                "value": 0,
                                "count": 0
                            },
                            {
                                "key": "4h:0m",
                                "value": 0,
                                "count": 0
                            },
                            {
                                "key": "8h:0m",
                                "value": 0,
                                "count": 0
                            },
                            {
                                "key": "16h:0m",
                                "value": 0,
                                "count": 0
                            }
                        ],
                        "percentileRanksRaw": [
                            {
                                "key": "2h:0m",
                                "value": 0,
                                "count": 0
                            },
                            {
                                "key": "4h:0m",
                                "value": 0,
                                "count": 0
                            },
                            {
                                "key": "8h:0m",
                                "value": 0,
                                "count": 0
                            },
                            {
                                "key": "16h:0m",
                                "value": 0,
                                "count": 0
                            }
                        ],
                        "within_sla": 0,
                        "within_sla_percentage_friendly": "N/A",
                        "sla_breach": 0,
                        "sla_breach_percentage_friendly": "N/A",
                        "excluded_from_sla": 0,
                        "excluded_from_sla_percentage_friendly": "N/A"
                    },
                    "overallTTF": {
                        "friendly": "N/A",
                        "raw": null,
                        "friendly_no_business": "N/A",
                        "raw_no_business": null
                    },
                    "initialTTR": {
                        "friendly": "N/A",
                        "raw": null,
                        "friendly_no_business": "N/A",
                        "raw_no_business": null,
                        "deviation_friendly": "N/A",
                        "deviation_raw": null,
                        "deviation_friendly_no_business": "N/A",
                        "deviation_raw_no_business": null,
                        "median_friendly": "N/A",
                        "median_raw": null,
                        "median_friendly_no_business": "N/A",
                        "median_raw_no_business": null,
                        "consistency_score": "N/A",
                        "consistency_score_no_business": "N/A",
                        "percentileRanks": [
                            {
                                "key": "1h:0m",
                                "value": 0,
                                "count": 0
                            },
                            {
                                "key": "2h:0m",
                                "value": 0,
                                "count": 0
                            },
                            {
                                "key": "4h:0m",
                                "value": 0,
                                "count": 0
                            },
                            {
                                "key": "8h:0m",
                                "value": 0,
                                "count": 0
                            }
                        ],
                        "percentileRanksRaw": [
                            {
                                "key": "1h:0m",
                                "value": 0,
                                "count": 0
                            },
                            {
                                "key": "2h:0m",
                                "value": 0,
                                "count": 0
                            },
                            {
                                "key": "4h:0m",
                                "value": 0,
                                "count": 0
                            },
                            {
                                "key": "8h:0m",
                                "value": 0,
                                "count": 0
                            }
                        ],
                        "within_sla": 0,
                        "within_sla_percentage_friendly": "N/A",
                        "sla_breach": 0,
                        "sla_breach_percentage_friendly": "N/A",
                        "excluded_from_sla": 0,
                        "excluded_from_sla_percentage_friendly": "N/A"
                    },
                    "overallTTC": {
                        "friendly": "N/A",
                        "raw": null,
                        "friendly_no_business": "N/A",
                        "raw_no_business": null,
                        "within_sla": 0,
                        "within_sla_percentage_friendly": "N/A",
                        "sla_breach": 0,
                        "sla_breach_percentage_friendly": "N/A",
                        "percentileRanks": [
                            {
                                "key": "12h:0m",
                                "value": 0,
                                "count": 0
                            },
                            {
                                "key": "24h:0m",
                                "value": 0,
                                "count": 0
                            },
                            {
                                "key": "48h:0m",
                                "value": 0,
                                "count": 0
                            },
                            {
                                "key": "96h:0m",
                                "value": 0,
                                "count": 0
                            }
                        ],
                        "percentileRanksRaw": [
                            {
                                "key": "12h:0m",
                                "value": 0,
                                "count": 0
                            },
                            {
                                "key": "24h:0m",
                                "value": 0,
                                "count": 0
                            },
                            {
                                "key": "48h:0m",
                                "value": 0,
                                "count": 0
                            },
                            {
                                "key": "96h:0m",
                                "value": 0,
                                "count": 0
                            }
                        ]
                    },
                    "previous": {
                        "name": "[email protected]",
                        "threads": {
                            "total": 1,
                            "internal": 0,
                            "inbound": 1,
                            "outbound": 0,
                            "sent_internally": 0,
                            "await_customer": 0,
                            "await_agent": 1,
                            "closed": 0,
                            "have_replies": 1,
                            "have_initial_replies": 1,
                            "handledRate": {
                                "rate": 0
                            },
                            "top_labels": [
                                "UNREAD"
                            ],
                            "messages_per_conversations_avg": 2,
                            "messages_received_per_conversations_avg": 1,
                            "messages_sent_per_conversations_avg": 1
                        },
                        "messages": {
                            "count": 0,
                            "initial": 0,
                            "replies": 0,
                            "forward": 0,
                            "follow_up": 0,
                            "sent": {
                                "count": 1,
                                "initial": 0,
                                "replies": 1,
                                "forward": 0,
                                "follow_up": 0,
                                "initial_replies": 1,
                                "dailyStats": []
                            },
                            "received": {
                                "count": 1,
                                "initial": 0,
                                "replies": 1,
                                "forward": 0,
                                "follow_up": 0,
                                "initial_replies": 0,
                                "dailyStats": [],
                                "avg_wait": "239h:59m",
                                "avg_wait_raw": 863966,
                                "avg_first_wait": "N/A",
                                "avg_first_wait_raw": null
                            }
                        },
                        "overallTTR": {
                            "friendly": "24m:33s",
                            "raw": 1473,
                            "friendly_no_business": "24m:33s",
                            "raw_no_business": 1473,
                            "deviation_friendly": "0s",
                            "deviation_raw": 0,
                            "deviation_friendly_no_business": "0s",
                            "deviation_raw_no_business": 0,
                            "median_friendly": "24m:33s",
                            "median_raw": 1473,
                            "median_friendly_no_business": "24m:33s",
                            "median_raw_no_business": 1473,
                            "consistency_score": "100%",
                            "consistency_score_no_business": "100%",
                            "percentileRanks": [
                                {
                                    "key": "2h:0m",
                                    "value": 100,
                                    "count": 0
                                },
                                {
                                    "key": "4h:0m",
                                    "value": 100,
                                    "count": 0
                                },
                                {
                                    "key": "8h:0m",
                                    "value": 100,
                                    "count": 0
                                },
                                {
                                    "key": "16h:0m",
                                    "value": 100,
                                    "count": 0
                                }
                            ],
                            "percentileRanksRaw": [
                                {
                                    "key": "2h:0m",
                                    "value": 100,
                                    "count": 0
                                },
                                {
                                    "key": "4h:0m",
                                    "value": 100,
                                    "count": 0
                                },
                                {
                                    "key": "8h:0m",
                                    "value": 100,
                                    "count": 0
                                },
                                {
                                    "key": "16h:0m",
                                    "value": 100,
                                    "count": 0
                                }
                            ],
                            "within_sla": 1,
                            "within_sla_percentage_friendly": 100,
                            "sla_breach": 0,
                            "sla_breach_percentage_friendly": 0,
                            "excluded_from_sla": 0,
                            "excluded_from_sla_percentage_friendly": 0
                        },
                        "overallTTF": {
                            "friendly": "N/A",
                            "raw": null,
                            "friendly_no_business": "N/A",
                            "raw_no_business": null
                        },
                        "initialTTR": {
                            "friendly": "24m:33s",
                            "raw": 1473,
                            "friendly_no_business": "24m:33s",
                            "raw_no_business": 1473,
                            "deviation_friendly": "0s",
                            "deviation_raw": 0,
                            "deviation_friendly_no_business": "0s",
                            "deviation_raw_no_business": 0,
                            "median_friendly": "24m:33s",
                            "median_raw": 1473,
                            "median_friendly_no_business": "24m:33s",
                            "median_raw_no_business": 1473,
                            "consistency_score": "100%",
                            "consistency_score_no_business": "100%",
                            "percentileRanks": [
                                {
                                    "key": "1h:0m",
                                    "value": 100,
                                    "count": 0
                                },
                                {
                                    "key": "2h:0m",
                                    "value": 100,
                                    "count": 0
                                },
                                {
                                    "key": "4h:0m",
                                    "value": 100,
                                    "count": 0
                                },
                                {
                                    "key": "8h:0m",
                                    "value": 100,
                                    "count": 0
                                }
                            ],
                            "percentileRanksRaw": [
                                {
                                    "key": "1h:0m",
                                    "value": 100,
                                    "count": 0
                                },
                                {
                                    "key": "2h:0m",
                                    "value": 100,
                                    "count": 0
                                },
                                {
                                    "key": "4h:0m",
                                    "value": 100,
                                    "count": 0
                                },
                                {
                                    "key": "8h:0m",
                                    "value": 100,
                                    "count": 0
                                }
                            ],
                            "within_sla": 1,
                            "within_sla_percentage_friendly": 100,
                            "sla_breach": 0,
                            "sla_breach_percentage_friendly": 0,
                            "excluded_from_sla": 0,
                            "excluded_from_sla_percentage_friendly": 0
                        },
                        "overallTTC": {
                            "friendly": "N/A",
                            "raw": null,
                            "friendly_no_business": "N/A",
                            "raw_no_business": null,
                            "within_sla": 0,
                            "within_sla_percentage_friendly": "N/A",
                            "sla_breach": 0,
                            "sla_breach_percentage_friendly": "N/A",
                            "percentileRanks": [
                                {
                                    "key": "12h:0m",
                                    "value": 0,
                                    "count": 0
                                },
                                {
                                    "key": "24h:0m",
                                    "value": 0,
                                    "count": 0
                                },
                                {
                                    "key": "48h:0m",
                                    "value": 0,
                                    "count": 0
                                },
                                {
                                    "key": "96h:0m",
                                    "value": 0,
                                    "count": 0
                                }
                            ],
                            "percentileRanksRaw": [
                                {
                                    "key": "12h:0m",
                                    "value": 0,
                                    "count": 0
                                },
                                {
                                    "key": "24h:0m",
                                    "value": 0,
                                    "count": 0
                                },
                                {
                                    "key": "48h:0m",
                                    "value": 0,
                                    "count": 0
                                },
                                {
                                    "key": "96h:0m",
                                    "value": 0,
                                    "count": 0
                                }
                            ]
                        }
                    }
                },
                {
                    "name": "[email protected]",
                    "threads": {
                        "total": 0,
                        "internal": 0,
                        "inbound": 0,
                        "outbound": 0,
                        "sent_internally": 0,
                        "await_customer": 0,
                        "await_agent": 0,
                        "closed": 0,
                        "have_replies": 0,
                        "have_initial_replies": 0,
                        "handledRate": {
                            "rate": 0
                        },
                        "top_labels": [],
                        "messages_per_conversations_avg": "N/A",
                        "messages_received_per_conversations_avg": "N/A",
                        "messages_sent_per_conversations_avg": "N/A"
                    },
                    "messages": {
                        "count": 0,
                        "initial": 0,
                        "replies": 0,
                        "forward": 0,
                        "follow_up": 0,
                        "sent": {
                            "count": 0,
                            "initial": 0,
                            "replies": 0,
                            "forward": 0,
                            "follow_up": 0,
                            "initial_replies": 0,
                            "dailyStats": null
                        },
                        "received": {
                            "count": 0,
                            "initial": 0,
                            "replies": 0,
                            "forward": 0,
                            "follow_up": 0,
                            "initial_replies": 0,
                            "dailyStats": null,
                            "avg_wait": "N/A",
                            "avg_wait_raw": null,
                            "avg_first_wait": "N/A",
                            "avg_first_wait_raw": null
                        }
                    },
                    "overallTTR": {
                        "friendly": "N/A",
                        "raw": null,
                        "friendly_no_business": "N/A",
                        "raw_no_business": null,
                        "deviation_friendly": "N/A",
                        "deviation_raw": null,
                        "deviation_friendly_no_business": "N/A",
                        "deviation_raw_no_business": null,
                        "median_friendly": "N/A",
                        "median_raw": null,
                        "median_friendly_no_business": "N/A",
                        "median_raw_no_business": null,
                        "consistency_score": "N/A",
                        "consistency_score_no_business": "N/A",
                        "percentileRanks": [],
                        "percentileRanksRaw": [],
                        "within_sla": 0,
                        "within_sla_percentage_friendly": "N/A",
                        "sla_breach": 0,
                        "sla_breach_percentage_friendly": "N/A",
                        "excluded_from_sla": 0,
                        "excluded_from_sla_percentage_friendly": "N/A"
                    },
                    "overallTTF": {
                        "friendly": "N/A",
                        "raw": null,
                        "friendly_no_business": "N/A",
                        "raw_no_business": null
                    },
                    "initialTTR": {
                        "friendly": "N/A",
                        "raw": null,
                        "friendly_no_business": "N/A",
                        "raw_no_business": null,
                        "deviation_friendly": "N/A",
                        "deviation_raw": null,
                        "deviation_friendly_no_business": "N/A",
                        "deviation_raw_no_business": null,
                        "median_friendly": "N/A",
                        "median_raw": null,
                        "median_friendly_no_business": "N/A",
                        "median_raw_no_business": null,
                        "consistency_score": "N/A",
                        "consistency_score_no_business": "N/A",
                        "percentileRanks": [],
                        "percentileRanksRaw": [],
                        "within_sla": 0,
                        "within_sla_percentage_friendly": "N/A",
                        "sla_breach": 0,
                        "sla_breach_percentage_friendly": "N/A",
                        "excluded_from_sla": 0,
                        "excluded_from_sla_percentage_friendly": "N/A"
                    },
                    "overallTTC": {
                        "friendly": "N/A",
                        "raw": null,
                        "friendly_no_business": "N/A",
                        "raw_no_business": null,
                        "within_sla": 0,
                        "within_sla_percentage_friendly": "N/A",
                        "sla_breach": 0,
                        "sla_breach_percentage_friendly": "N/A"
                    },
                    "previous": {
                        "name": "[email protected]",
                        "threads": {
                            "total": 0,
                            "internal": 0,
                            "inbound": 0,
                            "outbound": 0,
                            "sent_internally": 0,
                            "await_customer": 0,
                            "await_agent": 0,
                            "closed": 0,
                            "have_replies": 0,
                            "have_initial_replies": 0,
                            "handledRate": {
                                "rate": 0
                            },
                            "top_labels": [],
                            "messages_per_conversations_avg": "N/A",
                            "messages_received_per_conversations_avg": "N/A",
                            "messages_sent_per_conversations_avg": "N/A"
                        },
                        "messages": {
                            "count": 0,
                            "initial": 0,
                            "replies": 0,
                            "forward": 0,
                            "follow_up": 0,
                            "sent": {
                                "count": 0,
                                "initial": 0,
                                "replies": 0,
                                "forward": 0,
                                "follow_up": 0,
                                "initial_replies": 0,
                                "dailyStats": null
                            },
                            "received": {
                                "count": 0,
                                "initial": 0,
                                "replies": 0,
                                "forward": 0,
                                "follow_up": 0,
                                "initial_replies": 0,
                                "dailyStats": null,
                                "avg_wait": "N/A",
                                "avg_wait_raw": null,
                                "avg_first_wait": "N/A",
                                "avg_first_wait_raw": null
                            }
                        },
                        "overallTTR": {
                            "friendly": "N/A",
                            "raw": null,
                            "friendly_no_business": "N/A",
                            "raw_no_business": null,
                            "deviation_friendly": "N/A",
                            "deviation_raw": null,
                            "deviation_friendly_no_business": "N/A",
                            "deviation_raw_no_business": null,
                            "median_friendly": "N/A",
                            "median_raw": null,
                            "median_friendly_no_business": "N/A",
                            "median_raw_no_business": null,
                            "consistency_score": "N/A",
                            "consistency_score_no_business": "N/A",
                            "percentileRanks": [],
                            "percentileRanksRaw": [],
                            "within_sla": 0,
                            "within_sla_percentage_friendly": "N/A",
                            "sla_breach": 0,
                            "sla_breach_percentage_friendly": "N/A",
                            "excluded_from_sla": 0,
                            "excluded_from_sla_percentage_friendly": "N/A"
                        },
                        "overallTTF": {
                            "friendly": "N/A",
                            "raw": null,
                            "friendly_no_business": "N/A",
                            "raw_no_business": null
                        },
                        "initialTTR": {
                            "friendly": "N/A",
                            "raw": null,
                            "friendly_no_business": "N/A",
                            "raw_no_business": null,
                            "deviation_friendly": "N/A",
                            "deviation_raw": null,
                            "deviation_friendly_no_business": "N/A",
                            "deviation_raw_no_business": null,
                            "median_friendly": "N/A",
                            "median_raw": null,
                            "median_friendly_no_business": "N/A",
                            "median_raw_no_business": null,
                            "consistency_score": "N/A",
                            "consistency_score_no_business": "N/A",
                            "percentileRanks": [],
                            "percentileRanksRaw": [],
                            "within_sla": 0,
                            "within_sla_percentage_friendly": "N/A",
                            "sla_breach": 0,
                            "sla_breach_percentage_friendly": "N/A",
                            "excluded_from_sla": 0,
                            "excluded_from_sla_percentage_friendly": "N/A"
                        },
                        "overallTTC": {
                            "friendly": "N/A",
                            "raw": null,
                            "friendly_no_business": "N/A",
                            "raw_no_business": null,
                            "within_sla": 0,
                            "within_sla_percentage_friendly": "N/A",
                            "sla_breach": 0,
                            "sla_breach_percentage_friendly": "N/A"
                        }
                    }
                },
                {
                    "name": "[email protected]",
                    "threads": {
                        "total": 0,
                        "internal": 0,
                        "inbound": 0,
                        "outbound": 0,
                        "sent_internally": 0,
                        "await_customer": 0,
                        "await_agent": 0,
                        "closed": 0,
                        "have_replies": 0,
                        "have_initial_replies": 0,
                        "handledRate": {
                            "rate": 0
                        },
                        "top_labels": [],
                        "messages_per_conversations_avg": "N/A",
                        "messages_received_per_conversations_avg": "N/A",
                        "messages_sent_per_conversations_avg": "N/A"
                    },
                    "messages": {
                        "count": 0,
                        "initial": 0,
                        "replies": 0,
                        "forward": 0,
                        "follow_up": 0,
                        "sent": {
                            "count": 0,
                            "initial": 0,
                            "replies": 0,
                            "forward": 0,
                            "follow_up": 0,
                            "initial_replies": 0,
                            "dailyStats": null
                        },
                        "received": {
                            "count": 0,
                            "initial": 0,
                            "replies": 0,
                            "forward": 0,
                            "follow_up": 0,
                            "initial_replies": 0,
                            "dailyStats": null,
                            "avg_wait": "N/A",
                            "avg_wait_raw": null,
                            "avg_first_wait": "N/A",
                            "avg_first_wait_raw": null
                        }
                    },
                    "overallTTR": {
                        "friendly": "N/A",
                        "raw": null,
                        "friendly_no_business": "N/A",
                        "raw_no_business": null,
                        "deviation_friendly": "N/A",
                        "deviation_raw": null,
                        "deviation_friendly_no_business": "N/A",
                        "deviation_raw_no_business": null,
                        "median_friendly": "N/A",
                        "median_raw": null,
                        "median_friendly_no_business": "N/A",
                        "median_raw_no_business": null,
                        "consistency_score": "N/A",
                        "consistency_score_no_business": "N/A",
                        "percentileRanks": [],
                        "percentileRanksRaw": [],
                        "within_sla": 0,
                        "within_sla_percentage_friendly": "N/A",
                        "sla_breach": 0,
                        "sla_breach_percentage_friendly": "N/A",
                        "excluded_from_sla": 0,
                        "excluded_from_sla_percentage_friendly": "N/A"
                    },
                    "overallTTF": {
                        "friendly": "N/A",
                        "raw": null,
                        "friendly_no_business": "N/A",
                        "raw_no_business": null
                    },
                    "initialTTR": {
                        "friendly": "N/A",
                        "raw": null,
                        "friendly_no_business": "N/A",
                        "raw_no_business": null,
                        "deviation_friendly": "N/A",
                        "deviation_raw": null,
                        "deviation_friendly_no_business": "N/A",
                        "deviation_raw_no_business": null,
                        "median_friendly": "N/A",
                        "median_raw": null,
                        "median_friendly_no_business": "N/A",
                        "median_raw_no_business": null,
                        "consistency_score": "N/A",
                        "consistency_score_no_business": "N/A",
                        "percentileRanks": [],
                        "percentileRanksRaw": [],
                        "within_sla": 0,
                        "within_sla_percentage_friendly": "N/A",
                        "sla_breach": 0,
                        "sla_breach_percentage_friendly": "N/A",
                        "excluded_from_sla": 0,
                        "excluded_from_sla_percentage_friendly": "N/A"
                    },
                    "overallTTC": {
                        "friendly": "N/A",
                        "raw": null,
                        "friendly_no_business": "N/A",
                        "raw_no_business": null,
                        "within_sla": 0,
                        "within_sla_percentage_friendly": "N/A",
                        "sla_breach": 0,
                        "sla_breach_percentage_friendly": "N/A"
                    },
                    "previous": {
                        "name": "[email protected]",
                        "threads": {
                            "total": 0,
                            "internal": 0,
                            "inbound": 0,
                            "outbound": 0,
                            "sent_internally": 0,
                            "await_customer": 0,
                            "await_agent": 0,
                            "closed": 0,
                            "have_replies": 0,
                            "have_initial_replies": 0,
                            "handledRate": {
                                "rate": 0
                            },
                            "top_labels": [],
                            "messages_per_conversations_avg": "N/A",
                            "messages_received_per_conversations_avg": "N/A",
                            "messages_sent_per_conversations_avg": "N/A"
                        },
                        "messages": {
                            "count": 0,
                            "initial": 0,
                            "replies": 0,
                            "forward": 0,
                            "follow_up": 0,
                            "sent": {
                                "count": 0,
                                "initial": 0,
                                "replies": 0,
                                "forward": 0,
                                "follow_up": 0,
                                "initial_replies": 0,
                                "dailyStats": null
                            },
                            "received": {
                                "count": 0,
                                "initial": 0,
                                "replies": 0,
                                "forward": 0,
                                "follow_up": 0,
                                "initial_replies": 0,
                                "dailyStats": null,
                                "avg_wait": "N/A",
                                "avg_wait_raw": null,
                                "avg_first_wait": "N/A",
                                "avg_first_wait_raw": null
                            }
                        },
                        "overallTTR": {
                            "friendly": "N/A",
                            "raw": null,
                            "friendly_no_business": "N/A",
                            "raw_no_business": null,
                            "deviation_friendly": "N/A",
                            "deviation_raw": null,
                            "deviation_friendly_no_business": "N/A",
                            "deviation_raw_no_business": null,
                            "median_friendly": "N/A",
                            "median_raw": null,
                            "median_friendly_no_business": "N/A",
                            "median_raw_no_business": null,
                            "consistency_score": "N/A",
                            "consistency_score_no_business": "N/A",
                            "percentileRanks": [],
                            "percentileRanksRaw": [],
                            "within_sla": 0,
                            "within_sla_percentage_friendly": "N/A",
                            "sla_breach": 0,
                            "sla_breach_percentage_friendly": "N/A",
                            "excluded_from_sla": 0,
                            "excluded_from_sla_percentage_friendly": "N/A"
                        },
                        "overallTTF": {
                            "friendly": "N/A",
                            "raw": null,
                            "friendly_no_business": "N/A",
                            "raw_no_business": null
                        },
                        "initialTTR": {
                            "friendly": "N/A",
                            "raw": null,
                            "friendly_no_business": "N/A",
                            "raw_no_business": null,
                            "deviation_friendly": "N/A",
                            "deviation_raw": null,
                            "deviation_friendly_no_business": "N/A",
                            "deviation_raw_no_business": null,
                            "median_friendly": "N/A",
                            "median_raw": null,
                            "median_friendly_no_business": "N/A",
                            "median_raw_no_business": null,
                            "consistency_score": "N/A",
                            "consistency_score_no_business": "N/A",
                            "percentileRanks": [],
                            "percentileRanksRaw": [],
                            "within_sla": 0,
                            "within_sla_percentage_friendly": "N/A",
                            "sla_breach": 0,
                            "sla_breach_percentage_friendly": "N/A",
                            "excluded_from_sla": 0,
                            "excluded_from_sla_percentage_friendly": "N/A"
                        },
                        "overallTTC": {
                            "friendly": "N/A",
                            "raw": null,
                            "friendly_no_business": "N/A",
                            "raw_no_business": null,
                            "within_sla": 0,
                            "within_sla_percentage_friendly": "N/A",
                            "sla_breach": 0,
                            "sla_breach_percentage_friendly": "N/A"
                        }
                    }
                },
                {
                    "name": "[email protected]",
                    "threads": {
                        "total": 0,
                        "internal": 0,
                        "inbound": 0,
                        "outbound": 0,
                        "sent_internally": 0,
                        "await_customer": 0,
                        "await_agent": 0,
                        "closed": 0,
                        "have_replies": 0,
                        "have_initial_replies": 0,
                        "handledRate": {
                            "rate": 0
                        },
                        "top_labels": [],
                        "messages_per_conversations_avg": "N/A",
                        "messages_received_per_conversations_avg": "N/A",
                        "messages_sent_per_conversations_avg": "N/A"
                    },
                    "messages": {
                        "count": 0,
                        "initial": 0,
                        "replies": 0,
                        "forward": 0,
                        "follow_up": 0,
                        "sent": {
                            "count": 0,
                            "initial": 0,
                            "replies": 0,
                            "forward": 0,
                            "follow_up": 0,
                            "initial_replies": 0,
                            "dailyStats": null
                        },
                        "received": {
                            "count": 0,
                            "initial": 0,
                            "replies": 0,
                            "forward": 0,
                            "follow_up": 0,
                            "initial_replies": 0,
                            "dailyStats": null,
                            "avg_wait": "N/A",
                            "avg_wait_raw": null,
                            "avg_first_wait": "N/A",
                            "avg_first_wait_raw": null
                        }
                    },
                    "overallTTR": {
                        "friendly": "N/A",
                        "raw": null,
                        "friendly_no_business": "N/A",
                        "raw_no_business": null,
                        "deviation_friendly": "N/A",
                        "deviation_raw": null,
                        "deviation_friendly_no_business": "N/A",
                        "deviation_raw_no_business": null,
                        "median_friendly": "N/A",
                        "median_raw": null,
                        "median_friendly_no_business": "N/A",
                        "median_raw_no_business": null,
                        "consistency_score": "N/A",
                        "consistency_score_no_business": "N/A",
                        "percentileRanks": [],
                        "percentileRanksRaw": [],
                        "within_sla": 0,
                        "within_sla_percentage_friendly": "N/A",
                        "sla_breach": 0,
                        "sla_breach_percentage_friendly": "N/A",
                        "excluded_from_sla": 0,
                        "excluded_from_sla_percentage_friendly": "N/A"
                    },
                    "overallTTF": {
                        "friendly": "N/A",
                        "raw": null,
                        "friendly_no_business": "N/A",
                        "raw_no_business": null
                    },
                    "initialTTR": {
                        "friendly": "N/A",
                        "raw": null,
                        "friendly_no_business": "N/A",
                        "raw_no_business": null,
                        "deviation_friendly": "N/A",
                        "deviation_raw": null,
                        "deviation_friendly_no_business": "N/A",
                        "deviation_raw_no_business": null,
                        "median_friendly": "N/A",
                        "median_raw": null,
                        "median_friendly_no_business": "N/A",
                        "median_raw_no_business": null,
                        "consistency_score": "N/A",
                        "consistency_score_no_business": "N/A",
                        "percentileRanks": [],
                        "percentileRanksRaw": [],
                        "within_sla": 0,
                        "within_sla_percentage_friendly": "N/A",
                        "sla_breach": 0,
                        "sla_breach_percentage_friendly": "N/A",
                        "excluded_from_sla": 0,
                        "excluded_from_sla_percentage_friendly": "N/A"
                    },
                    "overallTTC": {
                        "friendly": "N/A",
                        "raw": null,
                        "friendly_no_business": "N/A",
                        "raw_no_business": null,
                        "within_sla": 0,
                        "within_sla_percentage_friendly": "N/A",
                        "sla_breach": 0,
                        "sla_breach_percentage_friendly": "N/A"
                    },
                    "previous": {
                        "name": "[email protected]",
                        "threads": {
                            "total": 0,
                            "internal": 0,
                            "inbound": 0,
                            "outbound": 0,
                            "sent_internally": 0,
                            "await_customer": 0,
                            "await_agent": 0,
                            "closed": 0,
                            "have_replies": 0,
                            "have_initial_replies": 0,
                            "handledRate": {
                                "rate": 0
                            },
                            "top_labels": [],
                            "messages_per_conversations_avg": "N/A",
                            "messages_received_per_conversations_avg": "N/A",
                            "messages_sent_per_conversations_avg": "N/A"
                        },
                        "messages": {
                            "count": 0,
                            "initial": 0,
                            "replies": 0,
                            "forward": 0,
                            "follow_up": 0,
                            "sent": {
                                "count": 0,
                                "initial": 0,
                                "replies": 0,
                                "forward": 0,
                                "follow_up": 0,
                                "initial_replies": 0,
                                "dailyStats": null
                            },
                            "received": {
                                "count": 0,
                                "initial": 0,
                                "replies": 0,
                                "forward": 0,
                                "follow_up": 0,
                                "initial_replies": 0,
                                "dailyStats": null,
                                "avg_wait": "N/A",
                                "avg_wait_raw": null,
                                "avg_first_wait": "N/A",
                                "avg_first_wait_raw": null
                            }
                        },
                        "overallTTR": {
                            "friendly": "N/A",
                            "raw": null,
                            "friendly_no_business": "N/A",
                            "raw_no_business": null,
                            "deviation_friendly": "N/A",
                            "deviation_raw": null,
                            "deviation_friendly_no_business": "N/A",
                            "deviation_raw_no_business": null,
                            "median_friendly": "N/A",
                            "median_raw": null,
                            "median_friendly_no_business": "N/A",
                            "median_raw_no_business": null,
                            "consistency_score": "N/A",
                            "consistency_score_no_business": "N/A",
                            "percentileRanks": [],
                            "percentileRanksRaw": [],
                            "within_sla": 0,
                            "within_sla_percentage_friendly": "N/A",
                            "sla_breach": 0,
                            "sla_breach_percentage_friendly": "N/A",
                            "excluded_from_sla": 0,
                            "excluded_from_sla_percentage_friendly": "N/A"
                        },
                        "overallTTF": {
                            "friendly": "N/A",
                            "raw": null,
                            "friendly_no_business": "N/A",
                            "raw_no_business": null
                        },
                        "initialTTR": {
                            "friendly": "N/A",
                            "raw": null,
                            "friendly_no_business": "N/A",
                            "raw_no_business": null,
                            "deviation_friendly": "N/A",
                            "deviation_raw": null,
                            "deviation_friendly_no_business": "N/A",
                            "deviation_raw_no_business": null,
                            "median_friendly": "N/A",
                            "median_raw": null,
                            "median_friendly_no_business": "N/A",
                            "median_raw_no_business": null,
                            "consistency_score": "N/A",
                            "consistency_score_no_business": "N/A",
                            "percentileRanks": [],
                            "percentileRanksRaw": [],
                            "within_sla": 0,
                            "within_sla_percentage_friendly": "N/A",
                            "sla_breach": 0,
                            "sla_breach_percentage_friendly": "N/A",
                            "excluded_from_sla": 0,
                            "excluded_from_sla_percentage_friendly": "N/A"
                        },
                        "overallTTC": {
                            "friendly": "N/A",
                            "raw": null,
                            "friendly_no_business": "N/A",
                            "raw_no_business": null,
                            "within_sla": 0,
                            "within_sla_percentage_friendly": "N/A",
                            "sla_breach": 0,
                            "sla_breach_percentage_friendly": "N/A"
                        }
                    }
                },
                {
                    "name": "[email protected]",
                    "threads": {
                        "total": 0,
                        "internal": 0,
                        "inbound": 0,
                        "outbound": 0,
                        "sent_internally": 0,
                        "await_customer": 0,
                        "await_agent": 0,
                        "closed": 0,
                        "have_replies": 0,
                        "have_initial_replies": 0,
                        "handledRate": {
                            "rate": 0
                        },
                        "top_labels": [],
                        "messages_per_conversations_avg": "N/A",
                        "messages_received_per_conversations_avg": "N/A",
                        "messages_sent_per_conversations_avg": "N/A"
                    },
                    "messages": {
                        "count": 0,
                        "initial": 0,
                        "replies": 0,
                        "forward": 0,
                        "follow_up": 0,
                        "sent": {
                            "count": 0,
                            "initial": 0,
                            "replies": 0,
                            "forward": 0,
                            "follow_up": 0,
                            "initial_replies": 0,
                            "dailyStats": null
                        },
                        "received": {
                            "count": 0,
                            "initial": 0,
                            "replies": 0,
                            "forward": 0,
                            "follow_up": 0,
                            "initial_replies": 0,
                            "dailyStats": null,
                            "avg_wait": "N/A",
                            "avg_wait_raw": null,
                            "avg_first_wait": "N/A",
                            "avg_first_wait_raw": null
                        }
                    },
                    "overallTTR": {
                        "friendly": "N/A",
                        "raw": null,
                        "friendly_no_business": "N/A",
                        "raw_no_business": null,
                        "deviation_friendly": "N/A",
                        "deviation_raw": null,
                        "deviation_friendly_no_business": "N/A",
                        "deviation_raw_no_business": null,
                        "median_friendly": "N/A",
                        "median_raw": null,
                        "median_friendly_no_business": "N/A",
                        "median_raw_no_business": null,
                        "consistency_score": "N/A",
                        "consistency_score_no_business": "N/A",
                        "percentileRanks": [],
                        "percentileRanksRaw": [],
                        "within_sla": 0,
                        "within_sla_percentage_friendly": "N/A",
                        "sla_breach": 0,
                        "sla_breach_percentage_friendly": "N/A",
                        "excluded_from_sla": 0,
                        "excluded_from_sla_percentage_friendly": "N/A"
                    },
                    "overallTTF": {
                        "friendly": "N/A",
                        "raw": null,
                        "friendly_no_business": "N/A",
                        "raw_no_business": null
                    },
                    "initialTTR": {
                        "friendly": "N/A",
                        "raw": null,
                        "friendly_no_business": "N/A",
                        "raw_no_business": null,
                        "deviation_friendly": "N/A",
                        "deviation_raw": null,
                        "deviation_friendly_no_business": "N/A",
                        "deviation_raw_no_business": null,
                        "median_friendly": "N/A",
                        "median_raw": null,
                        "median_friendly_no_business": "N/A",
                        "median_raw_no_business": null,
                        "consistency_score": "N/A",
                        "consistency_score_no_business": "N/A",
                        "percentileRanks": [],
                        "percentileRanksRaw": [],
                        "within_sla": 0,
                        "within_sla_percentage_friendly": "N/A",
                        "sla_breach": 0,
                        "sla_breach_percentage_friendly": "N/A",
                        "excluded_from_sla": 0,
                        "excluded_from_sla_percentage_friendly": "N/A"
                    },
                    "overallTTC": {
                        "friendly": "N/A",
                        "raw": null,
                        "friendly_no_business": "N/A",
                        "raw_no_business": null,
                        "within_sla": 0,
                        "within_sla_percentage_friendly": "N/A",
                        "sla_breach": 0,
                        "sla_breach_percentage_friendly": "N/A"
                    },
                    "previous": {
                        "name": "[email protected]",
                        "threads": {
                            "total": 1,
                            "internal": 0,
                            "inbound": 1,
                            "outbound": 0,
                            "sent_internally": 0,
                            "await_customer": 0,
                            "await_agent": 1,
                            "closed": 0,
                            "have_replies": 0,
                            "have_initial_replies": 0,
                            "handledRate": {
                                "rate": 0
                            },
                            "top_labels": [
                                "UNREAD"
                            ],
                            "messages_per_conversations_avg": 1,
                            "messages_received_per_conversations_avg": 1,
                            "messages_sent_per_conversations_avg": 0
                        },
                        "messages": {
                            "count": 0,
                            "initial": 0,
                            "replies": 0,
                            "forward": 0,
                            "follow_up": 0,
                            "sent": {
                                "count": 0,
                                "initial": 0,
                                "replies": 0,
                                "forward": 0,
                                "follow_up": 0,
                                "initial_replies": 0,
                                "dailyStats": null
                            },
                            "received": {
                                "count": 1,
                                "initial": 1,
                                "replies": 0,
                                "forward": 0,
                                "follow_up": 0,
                                "initial_replies": 0,
                                "dailyStats": [],
                                "avg_wait": "N/A",
                                "avg_wait_raw": null,
                                "avg_first_wait": "N/A",
                                "avg_first_wait_raw": null
                            }
                        },
                        "overallTTR": {
                            "friendly": "N/A",
                            "raw": null,
                            "friendly_no_business": "N/A",
                            "raw_no_business": null,
                            "deviation_friendly": "N/A",
                            "deviation_raw": null,
                            "deviation_friendly_no_business": "N/A",
                            "deviation_raw_no_business": null,
                            "median_friendly": "N/A",
                            "median_raw": null,
                            "median_friendly_no_business": "N/A",
                            "median_raw_no_business": null,
                            "consistency_score": "N/A",
                            "consistency_score_no_business": "N/A",
                            "percentileRanks": [],
                            "percentileRanksRaw": [],
                            "within_sla": 0,
                            "within_sla_percentage_friendly": "N/A",
                            "sla_breach": 0,
                            "sla_breach_percentage_friendly": "N/A",
                            "excluded_from_sla": 0,
                            "excluded_from_sla_percentage_friendly": "N/A"
                        },
                        "overallTTF": {
                            "friendly": "N/A",
                            "raw": null,
                            "friendly_no_business": "N/A",
                            "raw_no_business": null
                        },
                        "initialTTR": {
                            "friendly": "N/A",
                            "raw": null,
                            "friendly_no_business": "N/A",
                            "raw_no_business": null,
                            "deviation_friendly": "N/A",
                            "deviation_raw": null,
                            "deviation_friendly_no_business": "N/A",
                            "deviation_raw_no_business": null,
                            "median_friendly": "N/A",
                            "median_raw": null,
                            "median_friendly_no_business": "N/A",
                            "median_raw_no_business": null,
                            "consistency_score": "N/A",
                            "consistency_score_no_business": "N/A",
                            "percentileRanks": [],
                            "percentileRanksRaw": [],
                            "within_sla": 0,
                            "within_sla_percentage_friendly": "N/A",
                            "sla_breach": 0,
                            "sla_breach_percentage_friendly": "N/A",
                            "excluded_from_sla": 0,
                            "excluded_from_sla_percentage_friendly": "N/A"
                        },
                        "overallTTC": {
                            "friendly": "N/A",
                            "raw": null,
                            "friendly_no_business": "N/A",
                            "raw_no_business": null,
                            "within_sla": 0,
                            "within_sla_percentage_friendly": "N/A",
                            "sla_breach": 0,
                            "sla_breach_percentage_friendly": "N/A",
                            "percentileRanks": [
                                {
                                    "key": "12h:0m",
                                    "value": 0,
                                    "count": 0
                                },
                                {
                                    "key": "24h:0m",
                                    "value": 0,
                                    "count": 0
                                },
                                {
                                    "key": "48h:0m",
                                    "value": 0,
                                    "count": 0
                                },
                                {
                                    "key": "96h:0m",
                                    "value": 0,
                                    "count": 0
                                }
                            ],
                            "percentileRanksRaw": [
                                {
                                    "key": "12h:0m",
                                    "value": 0,
                                    "count": 0
                                },
                                {
                                    "key": "24h:0m",
                                    "value": 0,
                                    "count": 0
                                },
                                {
                                    "key": "48h:0m",
                                    "value": 0,
                                    "count": 0
                                },
                                {
                                    "key": "96h:0m",
                                    "value": 0,
                                    "count": 0
                                }
                            ]
                        }
                    }
                }
            ],
            "first_page_url": "https://portal.timetoreply.com/api/reports/sla?model=My%20Company&model_type=Internal&model_com=1&model_type_com=Contact%20Group&per_page=2&direction=desc&init_ttr_goal=02%3A00%3A00&overall_ttr_goal=02%3A00%3A00&overall_ttc_goal=02%3A00%3A00&page=1",
            "from": 1,
            "last_page": 1,
            "last_page_url": "https://portal.timetoreply.com/api/reports/sla?model=My%20Company&model_type=Internal&model_com=1&model_type_com=Contact%20Group&per_page=2&direction=desc&init_ttr_goal=02%3A00%3A00&overall_ttr_goal=02%3A00%3A00&overall_ttc_goal=02%3A00%3A00&page=1",
            "links": [
                {
                    "url": null,
                    "label": "« Previous",
                    "active": false
                },
                {
                    "url": "https://portal.timetoreply.com/api/reports/sla?model=My%20Company&model_type=Internal&model_com=1&model_type_com=Contact%20Group&per_page=2&direction=desc&init_ttr_goal=02%3A00%3A00&overall_ttr_goal=02%3A00%3A00&overall_ttc_goal=02%3A00%3A00&page=1",
                    "label": "1",
                    "active": true
                },
                {
                    "url": null,
                    "label": "Next »",
                    "active": false
                }
            ],
            "next_page_url": null,
            "path": "https://portal.timetoreply.com/api/reports/sla",
            "per_page": 15,
            "prev_page_url": null,
            "to": 5,
            "total": 5
        }
    },
    "all_domain_stats": {
        "maxima": [],
        "data": {
            "current_page": 1,
            "data": [],
            "first_page_url": "https://portal.timetoreply.com/api/reports/sla?model=My%20Company&model_type=Internal&model_com=1&model_type_com=Contact%20Group&per_page=2&direction=desc&init_ttr_goal=02%3A00%3A00&overall_ttr_goal=02%3A00%3A00&overall_ttc_goal=02%3A00%3A00&page=1",
            "from": null,
            "last_page": 1,
            "last_page_url": "https://portal.timetoreply.com/api/reports/sla?model=My%20Company&model_type=Internal&model_com=1&model_type_com=Contact%20Group&per_page=2&direction=desc&init_ttr_goal=02%3A00%3A00&overall_ttr_goal=02%3A00%3A00&overall_ttc_goal=02%3A00%3A00&page=1",
            "links": [
                {
                    "url": null,
                    "label": "« Previous",
                    "active": false
                },
                {
                    "url": "https://portal.timetoreply.com/api/reports/sla?model=My%20Company&model_type=Internal&model_com=1&model_type_com=Contact%20Group&per_page=2&direction=desc&init_ttr_goal=02%3A00%3A00&overall_ttr_goal=02%3A00%3A00&overall_ttc_goal=02%3A00%3A00&page=1",
                    "label": "1",
                    "active": true
                },
                {
                    "url": null,
                    "label": "Next »",
                    "active": false
                }
            ],
            "next_page_url": null,
            "path": "https://portal.timetoreply.com/api/reports/sla",
            "per_page": 15,
            "prev_page_url": null,
            "to": null,
            "total": 0
        }
    },
    "all_customer_stats": {
        "maxima": [],
        "data": {
            "current_page": 1,
            "data": [
                {
                    "name": "[email protected]",
                    "threads": {
                        "total": 1,
                        "internal": 0,
                        "inbound": 0,
                        "outbound": 1,
                        "sent_internally": 0,
                        "await_customer": 0,
                        "await_agent": 1,
                        "closed": 0,
                        "have_replies": 0,
                        "have_initial_replies": 0,
                        "handledRate": {
                            "rate": 0
                        },
                        "top_labels": [],
                        "messages_per_conversations_avg": 1,
                        "messages_received_per_conversations_avg": 0,
                        "messages_sent_per_conversations_avg": 1
                    },
                    "messages": {
                        "count": 0,
                        "initial": 0,
                        "replies": 0,
                        "forward": 0,
                        "follow_up": 0,
                        "sent": {
                            "count": 1,
                            "initial": 1,
                            "replies": 0,
                            "forward": 0,
                            "follow_up": 0,
                            "initial_replies": 0,
                            "dailyStats": []
                        },
                        "received": {
                            "count": 0,
                            "initial": 0,
                            "replies": 0,
                            "forward": 0,
                            "follow_up": 0,
                            "initial_replies": 0,
                            "dailyStats": null,
                            "avg_wait": "N/A",
                            "avg_wait_raw": null,
                            "avg_first_wait": "N/A",
                            "avg_first_wait_raw": null
                        }
                    },
                    "overallTTR": {
                        "friendly": "N/A",
                        "raw": null,
                        "friendly_no_business": "N/A",
                        "raw_no_business": null,
                        "deviation_friendly": "N/A",
                        "deviation_raw": null,
                        "deviation_friendly_no_business": "N/A",
                        "deviation_raw_no_business": null,
                        "median_friendly": "N/A",
                        "median_raw": null,
                        "median_friendly_no_business": "N/A",
                        "median_raw_no_business": null,
                        "consistency_score": "N/A",
                        "consistency_score_no_business": "N/A",
                        "percentileRanks": [
                            {
                                "key": "2h:0m",
                                "value": 0,
                                "count": 0
                            },
                            {
                                "key": "4h:0m",
                                "value": 0,
                                "count": 0
                            },
                            {
                                "key": "8h:0m",
                                "value": 0,
                                "count": 0
                            },
                            {
                                "key": "16h:0m",
                                "value": 0,
                                "count": 0
                            }
                        ],
                        "percentileRanksRaw": [
                            {
                                "key": "2h:0m",
                                "value": 0,
                                "count": 0
                            },
                            {
                                "key": "4h:0m",
                                "value": 0,
                                "count": 0
                            },
                            {
                                "key": "8h:0m",
                                "value": 0,
                                "count": 0
                            },
                            {
                                "key": "16h:0m",
                                "value": 0,
                                "count": 0
                            }
                        ],
                        "within_sla": 0,
                        "within_sla_percentage_friendly": "N/A",
                        "sla_breach": 0,
                        "sla_breach_percentage_friendly": "N/A",
                        "excluded_from_sla": 0,
                        "excluded_from_sla_percentage_friendly": "N/A"
                    },
                    "overallTTF": {
                        "friendly": "N/A",
                        "raw": null,
                        "friendly_no_business": "N/A",
                        "raw_no_business": null
                    },
                    "initialTTR": {
                        "friendly": "N/A",
                        "raw": null,
                        "friendly_no_business": "N/A",
                        "raw_no_business": null,
                        "deviation_friendly": "N/A",
                        "deviation_raw": null,
                        "deviation_friendly_no_business": "N/A",
                        "deviation_raw_no_business": null,
                        "median_friendly": "N/A",
                        "median_raw": null,
                        "median_friendly_no_business": "N/A",
                        "median_raw_no_business": null,
                        "consistency_score": "N/A",
                        "consistency_score_no_business": "N/A",
                        "percentileRanks": [
                            {
                                "key": "1h:0m",
                                "value": 0,
                                "count": 0
                            },
                            {
                                "key": "2h:0m",
                                "value": 0,
                                "count": 0
                            },
                            {
                                "key": "4h:0m",
                                "value": 0,
                                "count": 0
                            },
                            {
                                "key": "8h:0m",
                                "value": 0,
                                "count": 0
                            }
                        ],
                        "percentileRanksRaw": [
                            {
                                "key": "1h:0m",
                                "value": 0,
                                "count": 0
                            },
                            {
                                "key": "2h:0m",
                                "value": 0,
                                "count": 0
                            },
                            {
                                "key": "4h:0m",
                                "value": 0,
                                "count": 0
                            },
                            {
                                "key": "8h:0m",
                                "value": 0,
                                "count": 0
                            }
                        ],
                        "within_sla": 0,
                        "within_sla_percentage_friendly": "N/A",
                        "sla_breach": 0,
                        "sla_breach_percentage_friendly": "N/A",
                        "excluded_from_sla": 0,
                        "excluded_from_sla_percentage_friendly": "N/A"
                    },
                    "overallTTC": {
                        "friendly": "N/A",
                        "raw": null,
                        "friendly_no_business": "N/A",
                        "raw_no_business": null,
                        "within_sla": 0,
                        "within_sla_percentage_friendly": "N/A",
                        "sla_breach": 0,
                        "sla_breach_percentage_friendly": "N/A",
                        "percentileRanks": [
                            {
                                "key": "12h:0m",
                                "value": 0,
                                "count": 0
                            },
                            {
                                "key": "24h:0m",
                                "value": 0,
                                "count": 0
                            },
                            {
                                "key": "48h:0m",
                                "value": 0,
                                "count": 0
                            },
                            {
                                "key": "96h:0m",
                                "value": 0,
                                "count": 0
                            }
                        ],
                        "percentileRanksRaw": [
                            {
                                "key": "12h:0m",
                                "value": 0,
                                "count": 0
                            },
                            {
                                "key": "24h:0m",
                                "value": 0,
                                "count": 0
                            },
                            {
                                "key": "48h:0m",
                                "value": 0,
                                "count": 0
                            },
                            {
                                "key": "96h:0m",
                                "value": 0,
                                "count": 0
                            }
                        ]
                    }
                },
                {
                    "name": "[email protected]",
                    "threads": {
                        "total": 0,
                        "internal": 0,
                        "inbound": 0,
                        "outbound": 0,
                        "sent_internally": 0,
                        "await_customer": 0,
                        "await_agent": 0,
                        "closed": 0,
                        "have_replies": 0,
                        "have_initial_replies": 0,
                        "handledRate": {
                            "rate": 0
                        },
                        "top_labels": [],
                        "messages_per_conversations_avg": "N/A",
                        "messages_received_per_conversations_avg": "N/A",
                        "messages_sent_per_conversations_avg": "N/A"
                    },
                    "messages": {
                        "count": 0,
                        "initial": 0,
                        "replies": 0,
                        "forward": 0,
                        "follow_up": 0,
                        "sent": {
                            "count": 0,
                            "initial": 0,
                            "replies": 0,
                            "forward": 0,
                            "follow_up": 0,
                            "initial_replies": 0,
                            "dailyStats": null
                        },
                        "received": {
                            "count": 0,
                            "initial": 0,
                            "replies": 0,
                            "forward": 0,
                            "follow_up": 0,
                            "initial_replies": 0,
                            "dailyStats": null,
                            "avg_wait": "N/A",
                            "avg_wait_raw": null,
                            "avg_first_wait": "N/A",
                            "avg_first_wait_raw": null
                        }
                    },
                    "overallTTR": {
                        "friendly": "N/A",
                        "raw": null,
                        "friendly_no_business": "N/A",
                        "raw_no_business": null,
                        "deviation_friendly": "N/A",
                        "deviation_raw": null,
                        "deviation_friendly_no_business": "N/A",
                        "deviation_raw_no_business": null,
                        "median_friendly": "N/A",
                        "median_raw": null,
                        "median_friendly_no_business": "N/A",
                        "median_raw_no_business": null,
                        "consistency_score": "N/A",
                        "consistency_score_no_business": "N/A",
                        "percentileRanks": [],
                        "percentileRanksRaw": [],
                        "within_sla": 0,
                        "within_sla_percentage_friendly": "N/A",
                        "sla_breach": 0,
                        "sla_breach_percentage_friendly": "N/A",
                        "excluded_from_sla": 0,
                        "excluded_from_sla_percentage_friendly": "N/A"
                    },
                    "overallTTF": {
                        "friendly": "N/A",
                        "raw": null,
                        "friendly_no_business": "N/A",
                        "raw_no_business": null
                    },
                    "initialTTR": {
                        "friendly": "N/A",
                        "raw": null,
                        "friendly_no_business": "N/A",
                        "raw_no_business": null,
                        "deviation_friendly": "N/A",
                        "deviation_raw": null,
                        "deviation_friendly_no_business": "N/A",
                        "deviation_raw_no_business": null,
                        "median_friendly": "N/A",
                        "median_raw": null,
                        "median_friendly_no_business": "N/A",
                        "median_raw_no_business": null,
                        "consistency_score": "N/A",
                        "consistency_score_no_business": "N/A",
                        "percentileRanks": [],
                        "percentileRanksRaw": [],
                        "within_sla": 0,
                        "within_sla_percentage_friendly": "N/A",
                        "sla_breach": 0,
                        "sla_breach_percentage_friendly": "N/A",
                        "excluded_from_sla": 0,
                        "excluded_from_sla_percentage_friendly": "N/A"
                    },
                    "overallTTC": {
                        "friendly": "N/A",
                        "raw": null,
                        "friendly_no_business": "N/A",
                        "raw_no_business": null,
                        "within_sla": 0,
                        "within_sla_percentage_friendly": "N/A",
                        "sla_breach": 0,
                        "sla_breach_percentage_friendly": "N/A"
                    }
                },
                {
                    "name": "[email protected]",
                    "threads": {
                        "total": 0,
                        "internal": 0,
                        "inbound": 0,
                        "outbound": 0,
                        "sent_internally": 0,
                        "await_customer": 0,
                        "await_agent": 0,
                        "closed": 0,
                        "have_replies": 0,
                        "have_initial_replies": 0,
                        "handledRate": {
                            "rate": 0
                        },
                        "top_labels": [],
                        "messages_per_conversations_avg": "N/A",
                        "messages_received_per_conversations_avg": "N/A",
                        "messages_sent_per_conversations_avg": "N/A"
                    },
                    "messages": {
                        "count": 0,
                        "initial": 0,
                        "replies": 0,
                        "forward": 0,
                        "follow_up": 0,
                        "sent": {
                            "count": 0,
                            "initial": 0,
                            "replies": 0,
                            "forward": 0,
                            "follow_up": 0,
                            "initial_replies": 0,
                            "dailyStats": null
                        },
                        "received": {
                            "count": 0,
                            "initial": 0,
                            "replies": 0,
                            "forward": 0,
                            "follow_up": 0,
                            "initial_replies": 0,
                            "dailyStats": null,
                            "avg_wait": "N/A",
                            "avg_wait_raw": null,
                            "avg_first_wait": "N/A",
                            "avg_first_wait_raw": null
                        }
                    },
                    "overallTTR": {
                        "friendly": "N/A",
                        "raw": null,
                        "friendly_no_business": "N/A",
                        "raw_no_business": null,
                        "deviation_friendly": "N/A",
                        "deviation_raw": null,
                        "deviation_friendly_no_business": "N/A",
                        "deviation_raw_no_business": null,
                        "median_friendly": "N/A",
                        "median_raw": null,
                        "median_friendly_no_business": "N/A",
                        "median_raw_no_business": null,
                        "consistency_score": "N/A",
                        "consistency_score_no_business": "N/A",
                        "percentileRanks": [],
                        "percentileRanksRaw": [],
                        "within_sla": 0,
                        "within_sla_percentage_friendly": "N/A",
                        "sla_breach": 0,
                        "sla_breach_percentage_friendly": "N/A",
                        "excluded_from_sla": 0,
                        "excluded_from_sla_percentage_friendly": "N/A"
                    },
                    "overallTTF": {
                        "friendly": "N/A",
                        "raw": null,
                        "friendly_no_business": "N/A",
                        "raw_no_business": null
                    },
                    "initialTTR": {
                        "friendly": "N/A",
                        "raw": null,
                        "friendly_no_business": "N/A",
                        "raw_no_business": null,
                        "deviation_friendly": "N/A",
                        "deviation_raw": null,
                        "deviation_friendly_no_business": "N/A",
                        "deviation_raw_no_business": null,
                        "median_friendly": "N/A",
                        "median_raw": null,
                        "median_friendly_no_business": "N/A",
                        "median_raw_no_business": null,
                        "consistency_score": "N/A",
                        "consistency_score_no_business": "N/A",
                        "percentileRanks": [],
                        "percentileRanksRaw": [],
                        "within_sla": 0,
                        "within_sla_percentage_friendly": "N/A",
                        "sla_breach": 0,
                        "sla_breach_percentage_friendly": "N/A",
                        "excluded_from_sla": 0,
                        "excluded_from_sla_percentage_friendly": "N/A"
                    },
                    "overallTTC": {
                        "friendly": "N/A",
                        "raw": null,
                        "friendly_no_business": "N/A",
                        "raw_no_business": null,
                        "within_sla": 0,
                        "within_sla_percentage_friendly": "N/A",
                        "sla_breach": 0,
                        "sla_breach_percentage_friendly": "N/A"
                    }
                },
                {
                    "name": "[email protected]",
                    "threads": {
                        "total": 0,
                        "internal": 0,
                        "inbound": 0,
                        "outbound": 0,
                        "sent_internally": 0,
                        "await_customer": 0,
                        "await_agent": 0,
                        "closed": 0,
                        "have_replies": 0,
                        "have_initial_replies": 0,
                        "handledRate": {
                            "rate": 0
                        },
                        "top_labels": [],
                        "messages_per_conversations_avg": "N/A",
                        "messages_received_per_conversations_avg": "N/A",
                        "messages_sent_per_conversations_avg": "N/A"
                    },
                    "messages": {
                        "count": 0,
                        "initial": 0,
                        "replies": 0,
                        "forward": 0,
                        "follow_up": 0,
                        "sent": {
                            "count": 0,
                            "initial": 0,
                            "replies": 0,
                            "forward": 0,
                            "follow_up": 0,
                            "initial_replies": 0,
                            "dailyStats": null
                        },
                        "received": {
                            "count": 0,
                            "initial": 0,
                            "replies": 0,
                            "forward": 0,
                            "follow_up": 0,
                            "initial_replies": 0,
                            "dailyStats": null,
                            "avg_wait": "N/A",
                            "avg_wait_raw": null,
                            "avg_first_wait": "N/A",
                            "avg_first_wait_raw": null
                        }
                    },
                    "overallTTR": {
                        "friendly": "N/A",
                        "raw": null,
                        "friendly_no_business": "N/A",
                        "raw_no_business": null,
                        "deviation_friendly": "N/A",
                        "deviation_raw": null,
                        "deviation_friendly_no_business": "N/A",
                        "deviation_raw_no_business": null,
                        "median_friendly": "N/A",
                        "median_raw": null,
                        "median_friendly_no_business": "N/A",
                        "median_raw_no_business": null,
                        "consistency_score": "N/A",
                        "consistency_score_no_business": "N/A",
                        "percentileRanks": [],
                        "percentileRanksRaw": [],
                        "within_sla": 0,
                        "within_sla_percentage_friendly": "N/A",
                        "sla_breach": 0,
                        "sla_breach_percentage_friendly": "N/A",
                        "excluded_from_sla": 0,
                        "excluded_from_sla_percentage_friendly": "N/A"
                    },
                    "overallTTF": {
                        "friendly": "N/A",
                        "raw": null,
                        "friendly_no_business": "N/A",
                        "raw_no_business": null
                    },
                    "initialTTR": {
                        "friendly": "N/A",
                        "raw": null,
                        "friendly_no_business": "N/A",
                        "raw_no_business": null,
                        "deviation_friendly": "N/A",
                        "deviation_raw": null,
                        "deviation_friendly_no_business": "N/A",
                        "deviation_raw_no_business": null,
                        "median_friendly": "N/A",
                        "median_raw": null,
                        "median_friendly_no_business": "N/A",
                        "median_raw_no_business": null,
                        "consistency_score": "N/A",
                        "consistency_score_no_business": "N/A",
                        "percentileRanks": [],
                        "percentileRanksRaw": [],
                        "within_sla": 0,
                        "within_sla_percentage_friendly": "N/A",
                        "sla_breach": 0,
                        "sla_breach_percentage_friendly": "N/A",
                        "excluded_from_sla": 0,
                        "excluded_from_sla_percentage_friendly": "N/A"
                    },
                    "overallTTC": {
                        "friendly": "N/A",
                        "raw": null,
                        "friendly_no_business": "N/A",
                        "raw_no_business": null,
                        "within_sla": 0,
                        "within_sla_percentage_friendly": "N/A",
                        "sla_breach": 0,
                        "sla_breach_percentage_friendly": "N/A"
                    }
                },
                {
                    "name": "[email protected]",
                    "threads": {
                        "total": 0,
                        "internal": 0,
                        "inbound": 0,
                        "outbound": 0,
                        "sent_internally": 0,
                        "await_customer": 0,
                        "await_agent": 0,
                        "closed": 0,
                        "have_replies": 0,
                        "have_initial_replies": 0,
                        "handledRate": {
                            "rate": 0
                        },
                        "top_labels": [],
                        "messages_per_conversations_avg": "N/A",
                        "messages_received_per_conversations_avg": "N/A",
                        "messages_sent_per_conversations_avg": "N/A"
                    },
                    "messages": {
                        "count": 0,
                        "initial": 0,
                        "replies": 0,
                        "forward": 0,
                        "follow_up": 0,
                        "sent": {
                            "count": 0,
                            "initial": 0,
                            "replies": 0,
                            "forward": 0,
                            "follow_up": 0,
                            "initial_replies": 0,
                            "dailyStats": null
                        },
                        "received": {
                            "count": 0,
                            "initial": 0,
                            "replies": 0,
                            "forward": 0,
                            "follow_up": 0,
                            "initial_replies": 0,
                            "dailyStats": null,
                            "avg_wait": "N/A",
                            "avg_wait_raw": null,
                            "avg_first_wait": "N/A",
                            "avg_first_wait_raw": null
                        }
                    },
                    "overallTTR": {
                        "friendly": "N/A",
                        "raw": null,
                        "friendly_no_business": "N/A",
                        "raw_no_business": null,
                        "deviation_friendly": "N/A",
                        "deviation_raw": null,
                        "deviation_friendly_no_business": "N/A",
                        "deviation_raw_no_business": null,
                        "median_friendly": "N/A",
                        "median_raw": null,
                        "median_friendly_no_business": "N/A",
                        "median_raw_no_business": null,
                        "consistency_score": "N/A",
                        "consistency_score_no_business": "N/A",
                        "percentileRanks": [],
                        "percentileRanksRaw": [],
                        "within_sla": 0,
                        "within_sla_percentage_friendly": "N/A",
                        "sla_breach": 0,
                        "sla_breach_percentage_friendly": "N/A",
                        "excluded_from_sla": 0,
                        "excluded_from_sla_percentage_friendly": "N/A"
                    },
                    "overallTTF": {
                        "friendly": "N/A",
                        "raw": null,
                        "friendly_no_business": "N/A",
                        "raw_no_business": null
                    },
                    "initialTTR": {
                        "friendly": "N/A",
                        "raw": null,
                        "friendly_no_business": "N/A",
                        "raw_no_business": null,
                        "deviation_friendly": "N/A",
                        "deviation_raw": null,
                        "deviation_friendly_no_business": "N/A",
                        "deviation_raw_no_business": null,
                        "median_friendly": "N/A",
                        "median_raw": null,
                        "median_friendly_no_business": "N/A",
                        "median_raw_no_business": null,
                        "consistency_score": "N/A",
                        "consistency_score_no_business": "N/A",
                        "percentileRanks": [],
                        "percentileRanksRaw": [],
                        "within_sla": 0,
                        "within_sla_percentage_friendly": "N/A",
                        "sla_breach": 0,
                        "sla_breach_percentage_friendly": "N/A",
                        "excluded_from_sla": 0,
                        "excluded_from_sla_percentage_friendly": "N/A"
                    },
                    "overallTTC": {
                        "friendly": "N/A",
                        "raw": null,
                        "friendly_no_business": "N/A",
                        "raw_no_business": null,
                        "within_sla": 0,
                        "within_sla_percentage_friendly": "N/A",
                        "sla_breach": 0,
                        "sla_breach_percentage_friendly": "N/A"
                    }
                }
            ],
            "first_page_url": "https://portal.timetoreply.com/api/reports/sla?model=My%20Company&model_type=Internal&model_com=1&model_type_com=Contact%20Group&per_page=2&direction=desc&init_ttr_goal=02%3A00%3A00&overall_ttr_goal=02%3A00%3A00&overall_ttc_goal=02%3A00%3A00&page=1",
            "from": 1,
            "last_page": 1,
            "last_page_url": "https://portal.timetoreply.com/api/reports/sla?model=My%20Company&model_type=Internal&model_com=1&model_type_com=Contact%20Group&per_page=2&direction=desc&init_ttr_goal=02%3A00%3A00&overall_ttr_goal=02%3A00%3A00&overall_ttc_goal=02%3A00%3A00&page=1",
            "links": [
                {
                    "url": null,
                    "label": "« Previous",
                    "active": false
                },
                {
                    "url": "https://portal.timetoreply.com/api/reports/sla?model=My%20Company&model_type=Internal&model_com=1&model_type_com=Contact%20Group&per_page=2&direction=desc&init_ttr_goal=02%3A00%3A00&overall_ttr_goal=02%3A00%3A00&overall_ttc_goal=02%3A00%3A00&page=1",
                    "label": "1",
                    "active": true
                },
                {
                    "url": null,
                    "label": "Next »",
                    "active": false
                }
            ],
            "next_page_url": null,
            "path": "https://portal.timetoreply.com/api/reports/sla",
            "per_page": 15,
            "prev_page_url": null,
            "to": 5,
            "total": 5
        }
    },
    "args": {
        "model": {
            "icon": "building",
            "id": null,
            "model_type": "Internal",
            "name": "My Company",
            "value": "My Company"
        },
        "modelCom": {
            "id": 1,
            "name": "Top Revenue Customers",
            "email_usernames": [
                "[email protected]",
                "[email protected]"
            ],
            "customer_domains": [
                "cormier.com",
                "hills.com"
            ],
            "model_type": "Contact Group",
            "icon": "user-friends"
        },
        "init_ttr_goal": 7200,
        "overall_ttr_goal": 14400,
        "overall_ttc_goal": 86400
    },
    "mailbox_names": {
        "data": {
            "[email protected]": "Kareem Bogisich",
            "[email protected]": "Fred Heidenreich",
            "[email protected]": "Ally Price",
            "[email protected]": "EU Support",
            "[email protected]": "US Support",
            "[email protected]": "Top Revenue Customers",
            "[email protected]": "Top Revenue Customers",
            "[email protected]": "Top Revenue Customers",
            "[email protected]": "Top Revenue Customers",
            "[email protected]": "Top Revenue Customers"
        },
        "enabled": false
    },
    "show_comparisons_in_leaderboard": true
}
 

Request   

GET api/reports/sla

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

from   string  optional  

The start date of your request in the format "YYYY-MM-DD". Must be less than or equal to "to". Example: 2020-01-01

to   string  optional  

The end date of your request in the format "YYYY-MM-DD". Must be greater than or equal to "from". Example: 2020-01-08

model   string  optional  

The ID, Name, email address or domain you want statistics for. Use the models endpoint to get a list. Example: My Company

model_type   string  optional  

Model Type of the model being queried. Use "Contact" for email address and domain. Example: Internal

exclude_cc   boolean  optional  

Should we exclude CC messages from the statistics. Example: false

model_com   string  optional  

Model Communicating With, same as Model, except now for who/what the Model is communicating with. Example: 1

model_type_com   string  optional  

Model Type of the model you are communicating with. Use "Contact" for email address and domain. Example: Contact Group

exclude_cc_com   boolean  optional  

Should we exclude CC messages from the statistics for the communicating with model. Example: false

exclusive   boolean  optional  

Should we only focus on statistics where exclusively Model and ModelCom were involved?. Example: false

search   string  optional  

Search a specific email subject line (warning this is very slow!).

label   string[]  optional  

Label, if your mail provider supports labels/categories, you can filter your results using them.

thread_type   string  optional  

A comma separated list (no spaces) of any combination of the following: inbound,outbound,internal. Example: inbound,outbound,internal

thread_status   string  optional  

A comma separated list (no spaces) of any combination of the following: internal,await-customer,closed,await-agent. Example: internal,await-customer,closed,await-agent

has_replies   string  optional  

A comma separated list (no spaces) of any combination of the following: hasReplies,hasForwards,hasNoRepliesOrForwards. Example: hasReplies,hasForwards,hasNoRepliesOrForwards

classification   string  optional  

A comma separated list (no spaces) of any combination of the following: calculating,first,reply,reply-all,forward,follow-up. Example: calculating,first,reply,reply-all,forward

messageType   string  optional  

A comma separated list (no spaces) of any combination of the following: inbound,outbound,internal. Example: inbound,outbound,internal

replies_over   integer  optional  

Limit results to conversations with first reply times over X minutes. Should not be used at same time as message_replies_over. Example: 15

message_replies_over   integer  optional  

Limit results to messages where the reply time was over X minutes. Should not be used at same time as replies_over. Example: 15

no_reply_for   integer  optional  

Limit results to messages that have not had a reply for at least X minutes. Example: 15

per_page   integer  optional  

For paginated results, how many results per page. Max 200. Example: 2

sort_by   string  optional  

Field Name to sort by. Defaults to threads.total. Example: threads.total

direction   string  optional  

Direction in which to sort paginated results. Must be either asc or desc. Example: desc

page   integer  optional  

For paginated results, which page to get. Example: 1

init_ttr_goal   string  optional  

Time string in the format "HH:MM:SS" of your initial reply time goal. Example: 02:00:00

overall_ttr_goal   string  optional  

Time string in the format "HH:MM:SS" of your overall reply time goal. Example: 02:00:00

overall_ttc_goal   string  optional  

Time string in the format "HH:MM:SS" of your overall time to close goal. Example: 02:00:00

Trend

Trend - Report

requires authentication

Trend Report Data

Example request:
const url = new URL(
    "https://portal.timetoreply.com/api/reports/trend"
);

const params = {
    "model": "My Company",
    "model_type": "Internal",
    "exclude_cc": "0",
    "model_com": "1",
    "model_type_com": "Contact Group",
    "exclude_cc_com": "0",
    "exclusive": "0",
    "label[0]": "INBOX",
    "thread_type": "inbound,outbound,internal",
    "thread_status": "internal,await-customer,closed,await-agent",
    "has_replies": "hasReplies,hasForwards,hasNoRepliesOrForwards",
    "classification": "calculating,first,reply,reply-all,forward",
    "messageType": "inbound,outbound,internal",
    "replies_over": "15",
    "message_replies_over": "15",
    "no_reply_for": "15",
    "date": "2020-01-01",
    "periods": "12",
    "period_type": "Months",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/reports/trend';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'model' => 'My Company',
            'model_type' => 'Internal',
            'exclude_cc' => '0',
            'model_com' => '1',
            'model_type_com' => 'Contact Group',
            'exclude_cc_com' => '0',
            'exclusive' => '0',
            'label[0]' => 'INBOX',
            'thread_type' => 'inbound,outbound,internal',
            'thread_status' => 'internal,await-customer,closed,await-agent',
            'has_replies' => 'hasReplies,hasForwards,hasNoRepliesOrForwards',
            'classification' => 'calculating,first,reply,reply-all,forward',
            'messageType' => 'inbound,outbound,internal',
            'replies_over' => '15',
            'message_replies_over' => '15',
            'no_reply_for' => '15',
            'date' => '2020-01-01',
            'periods' => '12',
            'period_type' => 'Months',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://portal.timetoreply.com/api/reports/trend?model=My+Company&model_type=Internal&exclude_cc=&model_com=1&model_type_com=Contact+Group&exclude_cc_com=&exclusive=&label[]=INBOX&thread_type=inbound%2Coutbound%2Cinternal&thread_status=internal%2Cawait-customer%2Cclosed%2Cawait-agent&has_replies=hasReplies%2ChasForwards%2ChasNoRepliesOrForwards&classification=calculating%2Cfirst%2Creply%2Creply-all%2Cforward&messageType=inbound%2Coutbound%2Cinternal&replies_over=15&message_replies_over=15&no_reply_for=15&date=2020-01-01&periods=12&period_type=Months" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
tracking-events: []
 

{
    "stats": {
        "messages.received.count": {
            "title": "Emails Received",
            "type": "number",
            "data": [
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0
            ],
            "agentData": {
                "[email protected]": {
                    "data": [
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0
                    ],
                    "colour": "#31b98e"
                },
                "[email protected]": {
                    "data": [
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0
                    ],
                    "colour": "#f2ffc2"
                }
            },
            "colour": 0
        },
        "messages.sent.count": {
            "title": "Emails Sent",
            "type": "number",
            "data": [
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0
            ],
            "agentData": {
                "[email protected]": {
                    "data": [
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0
                    ],
                    "colour": "#31b98e"
                },
                "[email protected]": {
                    "data": [
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0
                    ],
                    "colour": "#f2ffc2"
                }
            },
            "colour": 1
        },
        "messages.sent.initial": {
            "title": "New Emails Sent",
            "type": "number",
            "data": [
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0
            ],
            "agentData": {
                "[email protected]": {
                    "data": [
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0
                    ],
                    "colour": "#31b98e"
                },
                "[email protected]": {
                    "data": [
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0
                    ],
                    "colour": "#f2ffc2"
                }
            },
            "colour": 2
        },
        "messages.sent.replies": {
            "title": "Replies Sent",
            "type": "number",
            "data": [
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0
            ],
            "agentData": {
                "[email protected]": {
                    "data": [
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0
                    ],
                    "colour": "#31b98e"
                },
                "[email protected]": {
                    "data": [
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0
                    ],
                    "colour": "#f2ffc2"
                }
            },
            "colour": 3
        },
        "messages.sent.forward": {
            "title": "Forwards Sent",
            "type": "number",
            "data": [
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0
            ],
            "agentData": {
                "[email protected]": {
                    "data": [
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0
                    ],
                    "colour": "#31b98e"
                },
                "[email protected]": {
                    "data": [
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0
                    ],
                    "colour": "#f2ffc2"
                }
            },
            "colour": 4
        },
        "initialTTR.raw": {
            "title": "Avg. First Reply Time",
            "type": "replyTime",
            "data": [
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0
            ],
            "agentData": {
                "[email protected]": {
                    "data": [
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null
                    ],
                    "colour": "#31b98e"
                },
                "[email protected]": {
                    "data": [
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null
                    ],
                    "colour": "#f2ffc2"
                }
            },
            "colour": 5
        },
        "overallTTR.raw": {
            "title": "Avg. Overall Reply Time",
            "type": "replyTime",
            "data": [
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0
            ],
            "agentData": {
                "[email protected]": {
                    "data": [
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null
                    ],
                    "colour": "#31b98e"
                },
                "[email protected]": {
                    "data": [
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null
                    ],
                    "colour": "#f2ffc2"
                }
            },
            "colour": 6
        },
        "overallTTC.raw": {
            "title": "Avg. Time To Close",
            "type": "replyTime",
            "data": [
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0
            ],
            "agentData": {
                "[email protected]": {
                    "data": [
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null
                    ],
                    "colour": "#31b98e"
                },
                "[email protected]": {
                    "data": [
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null
                    ],
                    "colour": "#f2ffc2"
                }
            },
            "colour": 7
        },
        "initialTTR.deviation_raw": {
            "title": "Deviation First Reply Time",
            "type": "replyTime",
            "data": [
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0
            ],
            "agentData": {
                "[email protected]": {
                    "data": [
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null
                    ],
                    "colour": "#31b98e"
                },
                "[email protected]": {
                    "data": [
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null
                    ],
                    "colour": "#f2ffc2"
                }
            },
            "colour": 8
        },
        "overallTTR.deviation_raw": {
            "title": "Deviation Overall Reply Time",
            "type": "replyTime",
            "data": [
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0
            ],
            "agentData": {
                "[email protected]": {
                    "data": [
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null
                    ],
                    "colour": "#31b98e"
                },
                "[email protected]": {
                    "data": [
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null
                    ],
                    "colour": "#f2ffc2"
                }
            },
            "colour": 0
        },
        "initialTTR.median_raw": {
            "title": "Median First Reply Time",
            "type": "replyTime",
            "data": [
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0
            ],
            "agentData": {
                "[email protected]": {
                    "data": [
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null
                    ],
                    "colour": "#31b98e"
                },
                "[email protected]": {
                    "data": [
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null
                    ],
                    "colour": "#f2ffc2"
                }
            },
            "colour": 1
        },
        "overallTTR.median_raw": {
            "title": "Median Overall Reply Time",
            "type": "replyTime",
            "data": [
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0
            ],
            "agentData": {
                "[email protected]": {
                    "data": [
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null
                    ],
                    "colour": "#31b98e"
                },
                "[email protected]": {
                    "data": [
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null,
                        null
                    ],
                    "colour": "#f2ffc2"
                }
            },
            "colour": 2
        },
        "threads.have_initial_reply_rate": {
            "title": "First Reply Ratio",
            "type": "percentage",
            "data": [
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0
            ],
            "agentData": [],
            "colour": 3
        },
        "threads.total": {
            "title": "Conversations",
            "type": "number",
            "data": [
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0
            ],
            "agentData": {
                "[email protected]": {
                    "data": [
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0
                    ],
                    "colour": "#31b98e"
                },
                "[email protected]": {
                    "data": [
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0
                    ],
                    "colour": "#f2ffc2"
                }
            },
            "colour": 4
        },
        "threads.success_rate": {
            "title": "Contact Success Rate",
            "type": "percentage",
            "data": [
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0
            ],
            "agentData": [],
            "colour": 6
        },
        "threads.success_time": {
            "title": "Avg. Time to Contact Success",
            "type": "replyTime",
            "data": [
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0
            ],
            "agentData": [],
            "colour": 7
        },
        "threads.labels": {
            "title": "Labels",
            "type": "labels",
            "data": [],
            "agentData": [],
            "colour": 8
        }
    },
    "dates": [
        "Feb 2019",
        "Mar to date",
        "Apr 2019",
        "May 2019",
        "Jun 2019",
        "Jul 2019",
        "Aug 2019",
        "Sep 2019",
        "Oct 2019",
        "Nov 2019",
        "Dec 2019",
        "Jan to date"
    ],
    "total": 5,
    "page": 1
}
 

Request   

GET api/reports/trend

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

model   string  optional  

The ID, Name, email address or domain you want statistics for. Use the models endpoint to get a list. Example: My Company

model_type   string  optional  

Model Type of the model being queried. Use "Contact" for email address and domain. Example: Internal

exclude_cc   boolean  optional  

Should we exclude CC messages from the statistics. Example: false

model_com   string  optional  

Model Communicating With, same as Model, except now for who/what the Model is communicating with. Example: 1

model_type_com   string  optional  

Model Type of the model you are communicating with. Use "Contact" for email address and domain. Example: Contact Group

exclude_cc_com   boolean  optional  

Should we exclude CC messages from the statistics for the communicating with model. Example: false

exclusive   boolean  optional  

Should we only focus on statistics where exclusively Model and ModelCom were involved?. Example: false

search   string  optional  

Search a specific email subject line (warning this is very slow!).

label   string[]  optional  

Label, if your mail provider supports labels/categories, you can filter your results using them.

thread_type   string  optional  

A comma separated list (no spaces) of any combination of the following: inbound,outbound,internal. Example: inbound,outbound,internal

thread_status   string  optional  

A comma separated list (no spaces) of any combination of the following: internal,await-customer,closed,await-agent. Example: internal,await-customer,closed,await-agent

has_replies   string  optional  

A comma separated list (no spaces) of any combination of the following: hasReplies,hasForwards,hasNoRepliesOrForwards. Example: hasReplies,hasForwards,hasNoRepliesOrForwards

classification   string  optional  

A comma separated list (no spaces) of any combination of the following: calculating,first,reply,reply-all,forward,follow-up. Example: calculating,first,reply,reply-all,forward

messageType   string  optional  

A comma separated list (no spaces) of any combination of the following: inbound,outbound,internal. Example: inbound,outbound,internal

replies_over   integer  optional  

Limit results to conversations with first reply times over X minutes. Should not be used at same time as message_replies_over. Example: 15

message_replies_over   integer  optional  

Limit results to messages where the reply time was over X minutes. Should not be used at same time as replies_over. Example: 15

no_reply_for   integer  optional  

Limit results to messages that have not had a reply for at least X minutes. Example: 15

date   string  optional  

The date you want the report to go up to in the format "YYYY-MM-DD". Example: 2020-01-01

periods   integer  optional  

The number of date periods to show in the trend report. Must be less than 53 if choosing "Weeks" and less than 13 if choosing "Months". Example: 12

period_type   string  optional  

The type of date period to break the report down into. Can be either "Weeks" or "Months". Example: Months

Contacts

Contacts - Report

requires authentication

Contacts Report Data

Example request:
const url = new URL(
    "https://portal.timetoreply.com/api/reports/contact"
);

const params = {
    "from": "2020-01-01",
    "to": "2020-01-08",
    "model": "My Company",
    "model_type": "Internal",
    "exclude_cc": "0",
    "model_com": "1",
    "model_type_com": "Contact Group",
    "exclude_cc_com": "0",
    "exclusive": "0",
    "label[0]": "INBOX",
    "thread_type": "inbound,outbound,internal",
    "thread_status": "internal,await-customer,closed,await-agent",
    "has_replies": "hasReplies,hasForwards,hasNoRepliesOrForwards",
    "classification": "calculating,first,reply,reply-all,forward",
    "messageType": "inbound,outbound,internal",
    "replies_over": "15",
    "message_replies_over": "15",
    "no_reply_for": "15",
    "page_emails": "1",
    "per_page_emails": "2",
    "direction_emails": "desc",
    "sort_by_emails": "threads.total",
    "page_domains": "1",
    "per_page_domains": "2",
    "direction_domains": "desc",
    "sort_by_domains": "threads.total",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/reports/contact';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'from' => '2020-01-01',
            'to' => '2020-01-08',
            'model' => 'My Company',
            'model_type' => 'Internal',
            'exclude_cc' => '0',
            'model_com' => '1',
            'model_type_com' => 'Contact Group',
            'exclude_cc_com' => '0',
            'exclusive' => '0',
            'label[0]' => 'INBOX',
            'thread_type' => 'inbound,outbound,internal',
            'thread_status' => 'internal,await-customer,closed,await-agent',
            'has_replies' => 'hasReplies,hasForwards,hasNoRepliesOrForwards',
            'classification' => 'calculating,first,reply,reply-all,forward',
            'messageType' => 'inbound,outbound,internal',
            'replies_over' => '15',
            'message_replies_over' => '15',
            'no_reply_for' => '15',
            'page_emails' => '1',
            'per_page_emails' => '2',
            'direction_emails' => 'desc',
            'sort_by_emails' => 'threads.total',
            'page_domains' => '1',
            'per_page_domains' => '2',
            'direction_domains' => 'desc',
            'sort_by_domains' => 'threads.total',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://portal.timetoreply.com/api/reports/contact?from=2020-01-01&to=2020-01-08&model=My+Company&model_type=Internal&exclude_cc=&model_com=1&model_type_com=Contact+Group&exclude_cc_com=&exclusive=&label[]=INBOX&thread_type=inbound%2Coutbound%2Cinternal&thread_status=internal%2Cawait-customer%2Cclosed%2Cawait-agent&has_replies=hasReplies%2ChasForwards%2ChasNoRepliesOrForwards&classification=calculating%2Cfirst%2Creply%2Creply-all%2Cforward&messageType=inbound%2Coutbound%2Cinternal&replies_over=15&message_replies_over=15&no_reply_for=15&page_emails=1&per_page_emails=2&direction_emails=desc&sort_by_emails=threads.total&page_domains=1&per_page_domains=2&direction_domains=desc&sort_by_domains=threads.total" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
tracking-events: []
 

{
    "domains": {
        "data": {
            "current_page": 1,
            "data": [
                {
                    "name": "hills.com",
                    "threads": {
                        "total": 2,
                        "internal": 0,
                        "inbound": 0,
                        "outbound": 0,
                        "sent_internally": 0,
                        "await_customer": 0,
                        "await_agent": 2,
                        "closed": 0,
                        "have_replies": 0,
                        "have_initial_replies": 0,
                        "handledRate": {
                            "rate": 0
                        },
                        "top_labels": [],
                        "messages_per_conversations_avg": 2,
                        "messages_received_per_conversations_avg": 1,
                        "messages_sent_per_conversations_avg": 1
                    },
                    "messages": {
                        "count": 0,
                        "initial": 0,
                        "replies": 0,
                        "forward": 0,
                        "follow_up": 0,
                        "sent": {
                            "count": 2,
                            "initial": 0,
                            "replies": 1,
                            "forward": 0,
                            "follow_up": 0,
                            "initial_replies": 1,
                            "dailyStats": []
                        },
                        "received": {
                            "count": 2,
                            "initial": 0,
                            "replies": 1,
                            "forward": 0,
                            "follow_up": 0,
                            "initial_replies": 0,
                            "dailyStats": [],
                            "avg_wait": "N/A",
                            "avg_wait_raw": null,
                            "avg_first_wait": "N/A",
                            "avg_first_wait_raw": null
                        }
                    },
                    "overallTTR": {
                        "friendly": "24m:33s",
                        "raw": 1473,
                        "friendly_no_business": "24m:33s",
                        "raw_no_business": 1473,
                        "deviation_friendly": "0s",
                        "deviation_raw": 0,
                        "deviation_friendly_no_business": "0s",
                        "deviation_raw_no_business": 0,
                        "median_friendly": "24m:33s",
                        "median_raw": 1473,
                        "median_friendly_no_business": "24m:33s",
                        "median_raw_no_business": 1473,
                        "consistency_score": "100%",
                        "consistency_score_no_business": "100%",
                        "percentileRanks": [],
                        "percentileRanksRaw": [],
                        "within_sla": null,
                        "within_sla_percentage_friendly": 0,
                        "sla_breach": null,
                        "sla_breach_percentage_friendly": 0,
                        "excluded_from_sla": 1,
                        "excluded_from_sla_percentage_friendly": 100
                    },
                    "overallTTF": {
                        "friendly": "N/A",
                        "raw": null,
                        "friendly_no_business": "N/A",
                        "raw_no_business": null
                    },
                    "initialTTR": {
                        "friendly": "24m:33s",
                        "raw": 1473,
                        "friendly_no_business": "24m:33s",
                        "raw_no_business": 1473,
                        "deviation_friendly": "0s",
                        "deviation_raw": 0,
                        "deviation_friendly_no_business": "0s",
                        "deviation_raw_no_business": 0,
                        "median_friendly": "24m:33s",
                        "median_raw": 1473,
                        "median_friendly_no_business": "24m:33s",
                        "median_raw_no_business": 1473,
                        "consistency_score": "100%",
                        "consistency_score_no_business": "100%",
                        "percentileRanks": [],
                        "percentileRanksRaw": [],
                        "within_sla": 0,
                        "within_sla_percentage_friendly": 0,
                        "sla_breach": 0,
                        "sla_breach_percentage_friendly": 0,
                        "excluded_from_sla": 1,
                        "excluded_from_sla_percentage_friendly": 100
                    },
                    "overallTTC": {
                        "friendly": "N/A",
                        "raw": null,
                        "friendly_no_business": "N/A",
                        "raw_no_business": null,
                        "within_sla": 0,
                        "within_sla_percentage_friendly": "N/A",
                        "sla_breach": 0,
                        "sla_breach_percentage_friendly": "N/A",
                        "percentileRanks": [],
                        "percentileRanksRaw": []
                    }
                },
                {
                    "name": "cormier.com",
                    "threads": {
                        "total": 0,
                        "internal": 0,
                        "inbound": 0,
                        "outbound": 0,
                        "sent_internally": 0,
                        "await_customer": 0,
                        "await_agent": 0,
                        "closed": 0,
                        "have_replies": 0,
                        "have_initial_replies": 0,
                        "handledRate": {
                            "rate": 0
                        },
                        "top_labels": [],
                        "messages_per_conversations_avg": "N/A",
                        "messages_received_per_conversations_avg": "N/A",
                        "messages_sent_per_conversations_avg": "N/A"
                    },
                    "messages": {
                        "count": 0,
                        "initial": 0,
                        "replies": 0,
                        "forward": 0,
                        "follow_up": 0,
                        "sent": {
                            "count": 0,
                            "initial": 0,
                            "replies": 0,
                            "forward": 0,
                            "follow_up": 0,
                            "initial_replies": 0,
                            "dailyStats": null
                        },
                        "received": {
                            "count": 0,
                            "initial": 0,
                            "replies": 0,
                            "forward": 0,
                            "follow_up": 0,
                            "initial_replies": 0,
                            "dailyStats": null,
                            "avg_wait": "N/A",
                            "avg_wait_raw": null,
                            "avg_first_wait": "N/A",
                            "avg_first_wait_raw": null
                        }
                    },
                    "overallTTR": {
                        "friendly": "N/A",
                        "raw": null,
                        "friendly_no_business": "N/A",
                        "raw_no_business": null,
                        "deviation_friendly": "N/A",
                        "deviation_raw": null,
                        "deviation_friendly_no_business": "N/A",
                        "deviation_raw_no_business": null,
                        "median_friendly": "N/A",
                        "median_raw": null,
                        "median_friendly_no_business": "N/A",
                        "median_raw_no_business": null,
                        "consistency_score": "N/A",
                        "consistency_score_no_business": "N/A",
                        "percentileRanks": [],
                        "percentileRanksRaw": [],
                        "within_sla": 0,
                        "within_sla_percentage_friendly": "N/A",
                        "sla_breach": 0,
                        "sla_breach_percentage_friendly": "N/A",
                        "excluded_from_sla": 0,
                        "excluded_from_sla_percentage_friendly": "N/A"
                    },
                    "overallTTF": {
                        "friendly": "N/A",
                        "raw": null,
                        "friendly_no_business": "N/A",
                        "raw_no_business": null
                    },
                    "initialTTR": {
                        "friendly": "N/A",
                        "raw": null,
                        "friendly_no_business": "N/A",
                        "raw_no_business": null,
                        "deviation_friendly": "N/A",
                        "deviation_raw": null,
                        "deviation_friendly_no_business": "N/A",
                        "deviation_raw_no_business": null,
                        "median_friendly": "N/A",
                        "median_raw": null,
                        "median_friendly_no_business": "N/A",
                        "median_raw_no_business": null,
                        "consistency_score": "N/A",
                        "consistency_score_no_business": "N/A",
                        "percentileRanks": [],
                        "percentileRanksRaw": [],
                        "within_sla": 0,
                        "within_sla_percentage_friendly": "N/A",
                        "sla_breach": 0,
                        "sla_breach_percentage_friendly": "N/A",
                        "excluded_from_sla": 0,
                        "excluded_from_sla_percentage_friendly": "N/A"
                    },
                    "overallTTC": {
                        "friendly": "N/A",
                        "raw": null,
                        "friendly_no_business": "N/A",
                        "raw_no_business": null,
                        "within_sla": 0,
                        "within_sla_percentage_friendly": "N/A",
                        "sla_breach": 0,
                        "sla_breach_percentage_friendly": "N/A"
                    }
                }
            ],
            "first_page_url": "https://portal.timetoreply.com/api/reports/contact?model=My%20Company&model_type=Internal&model_com=1&model_type_com=Contact%20Group&page_emails=1&per_page_emails=2&direction_emails=desc&sort_by_emails=threads.total&page_domains=1&per_page_domains=2&direction_domains=desc&sort_by_domains=threads.total&per_page=2&page=1",
            "from": 1,
            "last_page": 1,
            "last_page_url": "https://portal.timetoreply.com/api/reports/contact?model=My%20Company&model_type=Internal&model_com=1&model_type_com=Contact%20Group&page_emails=1&per_page_emails=2&direction_emails=desc&sort_by_emails=threads.total&page_domains=1&per_page_domains=2&direction_domains=desc&sort_by_domains=threads.total&per_page=2&page=1",
            "links": [
                {
                    "url": null,
                    "label": "« Previous",
                    "active": false
                },
                {
                    "url": "https://portal.timetoreply.com/api/reports/contact?model=My%20Company&model_type=Internal&model_com=1&model_type_com=Contact%20Group&page_emails=1&per_page_emails=2&direction_emails=desc&sort_by_emails=threads.total&page_domains=1&per_page_domains=2&direction_domains=desc&sort_by_domains=threads.total&per_page=2&page=1",
                    "label": "1",
                    "active": true
                },
                {
                    "url": null,
                    "label": "Next »",
                    "active": false
                }
            ],
            "next_page_url": null,
            "path": "https://portal.timetoreply.com/api/reports/contact",
            "per_page": 2,
            "prev_page_url": null,
            "to": 2,
            "total": 2
        },
        "totals": {
            "name": null,
            "threads.total": 2,
            "threads.await_customer": 0,
            "threads.await_agent": 2,
            "messages.received.count": 2,
            "messages.sent.count": 2,
            "overallTTR.friendly": "N/A",
            "overallTTR.friendly_no_business": "N/A",
            "initialTTR.friendly": "N/A",
            "initialTTR.friendly_no_business": "N/A",
            "overallTTC.friendly": "N/A",
            "overallTTC.friendly_no_business": "N/A"
        }
    },
    "emails": {
        "data": {
            "current_page": 1,
            "data": [
                {
                    "name": "[email protected]",
                    "threads": {
                        "total": 2,
                        "await_customer": 0,
                        "await_agent": 2
                    },
                    "messages": {
                        "received": {
                            "count": 2
                        },
                        "sent": {
                            "count": 2
                        }
                    },
                    "overallTTR": {
                        "friendly": "24m:33s",
                        "friendly_no_business": "24m:33s"
                    },
                    "initialTTR": {
                        "friendly": "24m:33s",
                        "friendly_no_business": "24m:33s"
                    },
                    "overallTTC": {
                        "friendly": "N/A",
                        "friendly_no_business": "N/A"
                    }
                },
                {
                    "name": "[email protected]",
                    "threads": {
                        "total": 0,
                        "await_customer": 0,
                        "await_agent": 0
                    },
                    "messages": {
                        "received": {
                            "count": 0
                        },
                        "sent": {
                            "count": 0
                        }
                    },
                    "overallTTR": {
                        "friendly": "N/A",
                        "friendly_no_business": "N/A"
                    },
                    "initialTTR": {
                        "friendly": "N/A",
                        "friendly_no_business": "N/A"
                    },
                    "overallTTC": {
                        "friendly": "N/A",
                        "friendly_no_business": "N/A"
                    }
                }
            ],
            "first_page_url": "https://portal.timetoreply.com/api/reports/contact?model=My%20Company&model_type=Internal&model_com=1&model_type_com=Contact%20Group&page_emails=1&per_page_emails=2&direction_emails=desc&sort_by_emails=threads.total&page_domains=1&per_page_domains=2&direction_domains=desc&sort_by_domains=threads.total&per_page=2&page=1",
            "from": 1,
            "last_page": 3,
            "last_page_url": "https://portal.timetoreply.com/api/reports/contact?model=My%20Company&model_type=Internal&model_com=1&model_type_com=Contact%20Group&page_emails=1&per_page_emails=2&direction_emails=desc&sort_by_emails=threads.total&page_domains=1&per_page_domains=2&direction_domains=desc&sort_by_domains=threads.total&per_page=2&page=3",
            "links": [
                {
                    "url": null,
                    "label": "« Previous",
                    "active": false
                },
                {
                    "url": "https://portal.timetoreply.com/api/reports/contact?model=My%20Company&model_type=Internal&model_com=1&model_type_com=Contact%20Group&page_emails=1&per_page_emails=2&direction_emails=desc&sort_by_emails=threads.total&page_domains=1&per_page_domains=2&direction_domains=desc&sort_by_domains=threads.total&per_page=2&page=1",
                    "label": "1",
                    "active": true
                },
                {
                    "url": "https://portal.timetoreply.com/api/reports/contact?model=My%20Company&model_type=Internal&model_com=1&model_type_com=Contact%20Group&page_emails=1&per_page_emails=2&direction_emails=desc&sort_by_emails=threads.total&page_domains=1&per_page_domains=2&direction_domains=desc&sort_by_domains=threads.total&per_page=2&page=2",
                    "label": "2",
                    "active": false
                },
                {
                    "url": "https://portal.timetoreply.com/api/reports/contact?model=My%20Company&model_type=Internal&model_com=1&model_type_com=Contact%20Group&page_emails=1&per_page_emails=2&direction_emails=desc&sort_by_emails=threads.total&page_domains=1&per_page_domains=2&direction_domains=desc&sort_by_domains=threads.total&per_page=2&page=3",
                    "label": "3",
                    "active": false
                },
                {
                    "url": "https://portal.timetoreply.com/api/reports/contact?model=My%20Company&model_type=Internal&model_com=1&model_type_com=Contact%20Group&page_emails=1&per_page_emails=2&direction_emails=desc&sort_by_emails=threads.total&page_domains=1&per_page_domains=2&direction_domains=desc&sort_by_domains=threads.total&per_page=2&page=2",
                    "label": "Next »",
                    "active": false
                }
            ],
            "next_page_url": "https://portal.timetoreply.com/api/reports/contact?model=My%20Company&model_type=Internal&model_com=1&model_type_com=Contact%20Group&page_emails=1&per_page_emails=2&direction_emails=desc&sort_by_emails=threads.total&page_domains=1&per_page_domains=2&direction_domains=desc&sort_by_domains=threads.total&per_page=2&page=2",
            "path": "https://portal.timetoreply.com/api/reports/contact",
            "per_page": 2,
            "prev_page_url": null,
            "to": 2,
            "total": 5
        },
        "totals": {
            "name": null,
            "threads.total": 2,
            "threads.await_customer": 0,
            "threads.await_agent": 2,
            "messages.received.count": 2,
            "messages.sent.count": 2,
            "overallTTR.friendly": "N/A",
            "overallTTR.friendly_no_business": "N/A",
            "initialTTR.friendly": "N/A",
            "initialTTR.friendly_no_business": "N/A",
            "overallTTC.friendly": "N/A",
            "overallTTC.friendly_no_business": "N/A"
        }
    },
    "columns": [
        {
            "field": "name",
            "sortable": true,
            "centered": false,
            "label": "Email",
            "visible": true,
            "hasEmails": true,
            "hasComparison": false,
            "headerClass": "w-1/6",
            "flipColours": false
        },
        {
            "field": "threads.total",
            "sortable": true,
            "centered": false,
            "label": "Total",
            "visible": true,
            "hasComparison": true,
            "group": "Conversations",
            "flipColours": false
        },
        {
            "field": "threads.await_customer",
            "sortable": true,
            "centered": false,
            "label": "Awaiting Contact Response",
            "visible": false,
            "hasComparison": true,
            "group": "Conversations",
            "flipColours": false
        },
        {
            "field": "threads.await_agent",
            "sortable": true,
            "centered": false,
            "label": "Awaiting Mailbox Response",
            "visible": false,
            "hasComparison": true,
            "group": "Conversations",
            "flipColours": false
        },
        {
            "field": "messages.received.count",
            "sortable": true,
            "centered": false,
            "label": "Total",
            "visible": true,
            "hasComparison": true,
            "group": "Emails Received",
            "flipColours": false
        },
        {
            "field": "messages.sent.count",
            "sortable": true,
            "centered": false,
            "label": "Total",
            "visible": true,
            "hasComparison": true,
            "group": "Emails Sent",
            "flipColours": false
        },
        {
            "field": "overallTTR.friendly",
            "sortable": true,
            "centered": true,
            "label": "Average",
            "visible": true,
            "hasComparison": false,
            "hasGoals": true,
            "group": "Overall Reply Time",
            "flipColours": true
        },
        {
            "field": "overallTTR.friendly_no_business",
            "sortable": true,
            "centered": true,
            "label": "Average (no business hours)",
            "visible": false,
            "hasComparison": false,
            "group": "Overall Reply Time",
            "flipColours": true
        },
        {
            "field": "initialTTR.friendly",
            "sortable": true,
            "centered": true,
            "label": "Average",
            "visible": true,
            "hasComparison": false,
            "hasGoals": true,
            "group": "First Reply Time",
            "flipColours": true
        },
        {
            "field": "initialTTR.friendly_no_business",
            "sortable": true,
            "centered": true,
            "label": "Average (no business hours)",
            "visible": false,
            "hasComparison": false,
            "group": "First Reply Time",
            "flipColours": true
        },
        {
            "field": "overallTTC.friendly",
            "sortable": true,
            "centered": true,
            "label": "Average",
            "visible": false,
            "tooltip": "Average time to close a conversation. Measured from the first message in a conversation to the last. Takes account of business hours",
            "hasComparison": false,
            "hasGoals": true,
            "group": "Time To Close",
            "flipColours": true
        },
        {
            "field": "overallTTC.friendly_no_business",
            "sortable": true,
            "centered": true,
            "label": "Average (no business hours)",
            "visible": false,
            "tooltip": "Average time to close a conversation. Measured from the first message in a conversation to the last. Ingores of business hours",
            "hasComparison": false,
            "group": "Time To Close",
            "flipColours": true
        }
    ]
}
 

Request   

GET api/reports/contact

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

from   string  optional  

The start date of your request in the format "YYYY-MM-DD". Must be less than or equal to "to". Example: 2020-01-01

to   string  optional  

The end date of your request in the format "YYYY-MM-DD". Must be greater than or equal to "from". Example: 2020-01-08

model   string  optional  

The ID, Name, email address or domain you want statistics for. Use the models endpoint to get a list. Example: My Company

model_type   string  optional  

Model Type of the model being queried. Use "Contact" for email address and domain. Example: Internal

exclude_cc   boolean  optional  

Should we exclude CC messages from the statistics. Example: false

model_com   string  optional  

Model Communicating With, same as Model, except now for who/what the Model is communicating with. Example: 1

model_type_com   string  optional  

Model Type of the model you are communicating with. Use "Contact" for email address and domain. Example: Contact Group

exclude_cc_com   boolean  optional  

Should we exclude CC messages from the statistics for the communicating with model. Example: false

exclusive   boolean  optional  

Should we only focus on statistics where exclusively Model and ModelCom were involved?. Example: false

search   string  optional  

Search a specific email subject line (warning this is very slow!).

label   string[]  optional  

Label, if your mail provider supports labels/categories, you can filter your results using them.

thread_type   string  optional  

A comma separated list (no spaces) of any combination of the following: inbound,outbound,internal. Example: inbound,outbound,internal

thread_status   string  optional  

A comma separated list (no spaces) of any combination of the following: internal,await-customer,closed,await-agent. Example: internal,await-customer,closed,await-agent

has_replies   string  optional  

A comma separated list (no spaces) of any combination of the following: hasReplies,hasForwards,hasNoRepliesOrForwards. Example: hasReplies,hasForwards,hasNoRepliesOrForwards

classification   string  optional  

A comma separated list (no spaces) of any combination of the following: calculating,first,reply,reply-all,forward,follow-up. Example: calculating,first,reply,reply-all,forward

messageType   string  optional  

A comma separated list (no spaces) of any combination of the following: inbound,outbound,internal. Example: inbound,outbound,internal

replies_over   integer  optional  

Limit results to conversations with first reply times over X minutes. Should not be used at same time as message_replies_over. Example: 15

message_replies_over   integer  optional  

Limit results to messages where the reply time was over X minutes. Should not be used at same time as replies_over. Example: 15

no_reply_for   integer  optional  

Limit results to messages that have not had a reply for at least X minutes. Example: 15

page_emails   integer  optional  

For paginated results, which page to get for emails. Example: 1

per_page_emails   integer  optional  

For paginated results, how many results per page for emails. Max 200. Example: 2

direction_emails   string  optional  

Direction in which to sort email results. Must be either asc or desc. Example: desc

sort_by_emails   string  optional  

Field Name to sort emails by. Defaults to threads.total. Example: threads.total

page_domains   integer  optional  

For paginated results, which page to get for domains. Example: 1

per_page_domains   integer  optional  

For paginated results, how many results per page for domains. Max 200. Example: 2

direction_domains   string  optional  

Direction in which to sort domain results. Must be either asc or desc. Example: desc

sort_by_domains   string  optional  

Field Name to sort domains by. Defaults to threads.total. Example: threads.total

Teams

Teams - Report

requires authentication

Teams Report Data

Example request:
const url = new URL(
    "https://portal.timetoreply.com/api/reports/teams"
);

const params = {
    "from": "2020-01-01",
    "to": "2020-01-08",
    "model": "1",
    "model_type": "Team",
    "exclude_cc": "0",
    "model_com": "1",
    "model_type_com": "Contact Group",
    "exclude_cc_com": "0",
    "exclusive": "0",
    "label[0]": "INBOX",
    "thread_type": "inbound,outbound,internal",
    "thread_status": "internal,await-customer,closed,await-agent",
    "has_replies": "hasReplies,hasForwards,hasNoRepliesOrForwards",
    "classification": "calculating,first,reply,reply-all,forward",
    "messageType": "inbound,outbound,internal",
    "replies_over": "15",
    "message_replies_over": "15",
    "no_reply_for": "15",
    "per_page": "2",
    "sort_by": "threads.total",
    "direction": "desc",
    "page": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/reports/teams';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'from' => '2020-01-01',
            'to' => '2020-01-08',
            'model' => '1',
            'model_type' => 'Team',
            'exclude_cc' => '0',
            'model_com' => '1',
            'model_type_com' => 'Contact Group',
            'exclude_cc_com' => '0',
            'exclusive' => '0',
            'label[0]' => 'INBOX',
            'thread_type' => 'inbound,outbound,internal',
            'thread_status' => 'internal,await-customer,closed,await-agent',
            'has_replies' => 'hasReplies,hasForwards,hasNoRepliesOrForwards',
            'classification' => 'calculating,first,reply,reply-all,forward',
            'messageType' => 'inbound,outbound,internal',
            'replies_over' => '15',
            'message_replies_over' => '15',
            'no_reply_for' => '15',
            'per_page' => '2',
            'sort_by' => 'threads.total',
            'direction' => 'desc',
            'page' => '1',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://portal.timetoreply.com/api/reports/teams?from=2020-01-01&to=2020-01-08&model=1&model_type=Team&exclude_cc=&model_com=1&model_type_com=Contact+Group&exclude_cc_com=&exclusive=&label[]=INBOX&thread_type=inbound%2Coutbound%2Cinternal&thread_status=internal%2Cawait-customer%2Cclosed%2Cawait-agent&has_replies=hasReplies%2ChasForwards%2ChasNoRepliesOrForwards&classification=calculating%2Cfirst%2Creply%2Creply-all%2Cforward&messageType=inbound%2Coutbound%2Cinternal&replies_over=15&message_replies_over=15&no_reply_for=15&per_page=2&sort_by=threads.total&direction=desc&page=1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
tracking-events: []
 

{
    "stats": {
        "threads": {
            "total": 1,
            "internal": 0,
            "inbound": 0,
            "outbound": 1,
            "sent_internally": 0,
            "await_customer": 0,
            "await_agent": 1,
            "closed": 0,
            "have_replies": 0,
            "have_replies_from_agents": 0,
            "have_no_replies_from_agents": 1,
            "completionRatio": {
                "ratio": 0,
                "numerator": 0,
                "denominator": 0
            },
            "handledRate": {
                "rate": 0,
                "numerator": 0,
                "denominator": 1
            },
            "labels": {
                "total": 0,
                "list": []
            },
            "messages_per_conversations_avg": 1,
            "messages_sent_per_conversations_avg": 1,
            "messages_received_per_conversations_avg": 0,
            "top_labels": ""
        },
        "messages": {
            "count": 1,
            "initial": 0,
            "replies": 0,
            "forward": 0,
            "follow_up": 0,
            "received": {
                "count": 0,
                "initial": 0,
                "replies": 0,
                "forward": 0,
                "follow_up": 0,
                "initial_replies": 0,
                "dayOfWeek": {
                    "Monday": 0,
                    "Tuesday": 0,
                    "Wednesday": 0,
                    "Thursday": 0,
                    "Friday": 0,
                    "Saturday": 0,
                    "Sunday": 0
                },
                "hourOfDay": {
                    "00:00": 0,
                    "01:00": 0,
                    "02:00": 0,
                    "03:00": 0,
                    "04:00": 0,
                    "05:00": 0,
                    "06:00": 0,
                    "07:00": 0,
                    "08:00": 0,
                    "09:00": 0,
                    "10:00": 0,
                    "11:00": 0,
                    "12:00": 0,
                    "13:00": 0,
                    "14:00": 0,
                    "15:00": 0,
                    "16:00": 0,
                    "17:00": 0,
                    "18:00": 0,
                    "19:00": 0,
                    "20:00": 0,
                    "21:00": 0,
                    "22:00": 0,
                    "23:00": 0
                },
                "avg_wait": "N/A",
                "avg_wait_raw": null,
                "avg_first_wait": "N/A",
                "avg_first_wait_raw": null
            },
            "sent": {
                "count": 1,
                "initial": 1,
                "replies": 0,
                "forward": 0,
                "follow_up": 0,
                "initial_replies": 0,
                "dayOfWeek": {
                    "Monday": 0,
                    "Tuesday": 0,
                    "Wednesday": 0,
                    "Thursday": 0,
                    "Friday": 0,
                    "Saturday": 0,
                    "Sunday": 0
                },
                "hourOfDay": {
                    "00:00": 0,
                    "01:00": 0,
                    "02:00": 0,
                    "03:00": 0,
                    "04:00": 0,
                    "05:00": 0,
                    "06:00": 0,
                    "07:00": 0,
                    "08:00": 0,
                    "09:00": 0,
                    "10:00": 0,
                    "11:00": 0,
                    "12:00": 0,
                    "13:00": 0,
                    "14:00": 0,
                    "15:00": 0,
                    "16:00": 0,
                    "17:00": 0,
                    "18:00": 0,
                    "19:00": 0,
                    "20:00": 0,
                    "21:00": 0,
                    "22:00": 0,
                    "23:00": 0
                }
            }
        },
        "overallTTR": {
            "friendly": "N/A",
            "raw": null,
            "friendly_no_business": "N/A",
            "raw_no_business": null,
            "deviation_friendly": "N/A",
            "deviation_raw": null,
            "deviation_friendly_no_business": "N/A",
            "deviation_raw_no_business": null,
            "median_friendly": "N/A",
            "median_raw": null,
            "median_friendly_no_business": "N/A",
            "median_raw_no_business": null,
            "consistency_score": "N/A",
            "consistency_score_no_business": "N/A",
            "percentileRanks": [],
            "percentileRanksRaw": [],
            "within_sla": null,
            "within_sla_percentage_friendly": "N/A",
            "sla_breach": null,
            "sla_breach_percentage_friendly": "N/A",
            "excluded_from_sla": 0,
            "excluded_from_sla_percentage_friendly": "N/A"
        },
        "initialTTR": {
            "friendly": "N/A",
            "raw": null,
            "friendly_no_business": "N/A",
            "raw_no_business": null,
            "deviation_friendly": "N/A",
            "deviation_raw": null,
            "deviation_friendly_no_business": "N/A",
            "deviation_raw_no_business": null,
            "median_friendly": "N/A",
            "median_raw": null,
            "median_friendly_no_business": "N/A",
            "median_raw_no_business": null,
            "consistency_score": "N/A",
            "consistency_score_no_business": "N/A",
            "percentileRanks": [],
            "percentileRanksRaw": [],
            "within_sla": 0,
            "within_sla_percentage_friendly": "N/A",
            "sla_breach": 0,
            "sla_breach_percentage_friendly": "N/A",
            "excluded_from_sla": 0,
            "excluded_from_sla_percentage_friendly": "N/A"
        },
        "overallTTF": {
            "friendly": "N/A",
            "raw": null,
            "friendly_no_business": "N/A",
            "raw_no_business": null
        },
        "overallTTC": {
            "friendly": "N/A",
            "raw": null,
            "friendly_no_business": "N/A",
            "raw_no_business": null,
            "percentileRanks": [],
            "percentileRanksRaw": [],
            "within_sla": 0,
            "within_sla_percentage_friendly": "N/A",
            "sla_breach": 0,
            "sla_breach_percentage_friendly": "N/A"
        },
        "dailyStats": []
    },
    "all_team_stats": {
        "current_page": 1,
        "data": [
            {
                "name": "US Support Team",
                "threads": {
                    "total": 1,
                    "internal": 0,
                    "inbound": 0,
                    "outbound": 1,
                    "sent_internally": 0,
                    "await_customer": 0,
                    "await_agent": 1,
                    "closed": 0,
                    "have_replies": 0,
                    "handledRate": {
                        "rate": 0
                    }
                },
                "messages": {
                    "received": {
                        "count": 0,
                        "initial": 0,
                        "replies": 0,
                        "forward": 0,
                        "follow_up": 0
                    },
                    "sent": {
                        "count": 1,
                        "initial": 1,
                        "replies": 0,
                        "forward": 0,
                        "follow_up": 0
                    }
                },
                "overallTTR": {
                    "friendly": "N/A",
                    "friendly_no_business": "N/A",
                    "deviation_friendly": "N/A",
                    "deviation_friendly_no_business": "N/A",
                    "median_friendly": "N/A",
                    "median_friendly_no_business": "N/A",
                    "consistency_score": "N/A",
                    "consistency_score_no_business": "N/A"
                },
                "initialTTR": {
                    "friendly": "N/A",
                    "friendly_no_business": "N/A",
                    "deviation_friendly": "N/A",
                    "deviation_friendly_no_business": "N/A",
                    "median_friendly": "N/A",
                    "median_friendly_no_business": "N/A",
                    "consistency_score": "N/A",
                    "consistency_score_no_business": "N/A"
                },
                "overallTTC": {
                    "friendly": "N/A",
                    "friendly_no_business": "N/A"
                },
                "overallTTF": {
                    "friendly": "N/A",
                    "friendly_no_business": "N/A"
                },
                "members": {
                    "current_page": 1,
                    "data": [
                        {
                            "name": "[email protected]",
                            "threads": {
                                "total": 1,
                                "internal": 0,
                                "inbound": 0,
                                "outbound": 1,
                                "sent_internally": 0,
                                "await_customer": 0,
                                "await_agent": 1,
                                "closed": 0,
                                "have_replies": 0,
                                "handledRate": {
                                    "rate": 0
                                }
                            },
                            "messages": {
                                "received": {
                                    "count": 0,
                                    "initial": 0,
                                    "replies": 0,
                                    "forward": 0,
                                    "follow_up": 0
                                },
                                "sent": {
                                    "count": 1,
                                    "initial": 1,
                                    "replies": 0,
                                    "forward": 0,
                                    "follow_up": 0
                                }
                            },
                            "overallTTR": {
                                "friendly": "N/A",
                                "friendly_no_business": "N/A",
                                "deviation_friendly": "N/A",
                                "deviation_friendly_no_business": "N/A",
                                "median_friendly": "N/A",
                                "median_friendly_no_business": "N/A",
                                "consistency_score": "N/A",
                                "consistency_score_no_business": "N/A"
                            },
                            "initialTTR": {
                                "friendly": "N/A",
                                "friendly_no_business": "N/A",
                                "deviation_friendly": "N/A",
                                "deviation_friendly_no_business": "N/A",
                                "median_friendly": "N/A",
                                "median_friendly_no_business": "N/A",
                                "consistency_score": "N/A",
                                "consistency_score_no_business": "N/A"
                            },
                            "overallTTC": {
                                "friendly": "N/A",
                                "friendly_no_business": "N/A"
                            },
                            "overallTTF": {
                                "friendly": "N/A",
                                "friendly_no_business": "N/A"
                            }
                        },
                        {
                            "name": "[email protected]",
                            "threads": {
                                "total": 0,
                                "internal": 0,
                                "inbound": 0,
                                "outbound": 0,
                                "sent_internally": 0,
                                "await_customer": 0,
                                "await_agent": 0,
                                "closed": 0,
                                "have_replies": 0,
                                "handledRate": {
                                    "rate": 0
                                }
                            },
                            "messages": {
                                "received": {
                                    "count": 0,
                                    "initial": 0,
                                    "replies": 0,
                                    "forward": 0,
                                    "follow_up": 0
                                },
                                "sent": {
                                    "count": 0,
                                    "initial": 0,
                                    "replies": 0,
                                    "forward": 0,
                                    "follow_up": 0
                                }
                            },
                            "overallTTR": {
                                "friendly": "N/A",
                                "friendly_no_business": "N/A",
                                "deviation_friendly": "N/A",
                                "deviation_friendly_no_business": "N/A",
                                "median_friendly": "N/A",
                                "median_friendly_no_business": "N/A",
                                "consistency_score": "N/A",
                                "consistency_score_no_business": "N/A"
                            },
                            "initialTTR": {
                                "friendly": "N/A",
                                "friendly_no_business": "N/A",
                                "deviation_friendly": "N/A",
                                "deviation_friendly_no_business": "N/A",
                                "median_friendly": "N/A",
                                "median_friendly_no_business": "N/A",
                                "consistency_score": "N/A",
                                "consistency_score_no_business": "N/A"
                            },
                            "overallTTC": {
                                "friendly": "N/A",
                                "friendly_no_business": "N/A"
                            },
                            "overallTTF": {
                                "friendly": "N/A",
                                "friendly_no_business": "N/A"
                            }
                        }
                    ],
                    "first_page_url": "https://portal.timetoreply.com/api/reports/teams?model=1&model_type=Team&model_com=1&model_type_com=Contact%20Group&per_page=2&direction=desc&page=1",
                    "from": 1,
                    "last_page": 2,
                    "last_page_url": "https://portal.timetoreply.com/api/reports/teams?model=1&model_type=Team&model_com=1&model_type_com=Contact%20Group&per_page=2&direction=desc&page=2",
                    "links": [
                        {
                            "url": null,
                            "label": "« Previous",
                            "active": false
                        },
                        {
                            "url": "https://portal.timetoreply.com/api/reports/teams?model=1&model_type=Team&model_com=1&model_type_com=Contact%20Group&per_page=2&direction=desc&page=1",
                            "label": "1",
                            "active": true
                        },
                        {
                            "url": "https://portal.timetoreply.com/api/reports/teams?model=1&model_type=Team&model_com=1&model_type_com=Contact%20Group&per_page=2&direction=desc&page=2",
                            "label": "2",
                            "active": false
                        },
                        {
                            "url": "https://portal.timetoreply.com/api/reports/teams?model=1&model_type=Team&model_com=1&model_type_com=Contact%20Group&per_page=2&direction=desc&page=2",
                            "label": "Next »",
                            "active": false
                        }
                    ],
                    "next_page_url": "https://portal.timetoreply.com/api/reports/teams?model=1&model_type=Team&model_com=1&model_type_com=Contact%20Group&per_page=2&direction=desc&page=2",
                    "path": "https://portal.timetoreply.com/api/reports/teams",
                    "per_page": 2,
                    "prev_page_url": null,
                    "to": 2,
                    "total": 3
                }
            }
        ],
        "first_page_url": "https://portal.timetoreply.com/api/reports/teams?model=1&model_type=Team&model_com=1&model_type_com=Contact%20Group&per_page=2&direction=desc&page=1",
        "from": 1,
        "last_page": 1,
        "last_page_url": "https://portal.timetoreply.com/api/reports/teams?model=1&model_type=Team&model_com=1&model_type_com=Contact%20Group&per_page=2&direction=desc&page=1",
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "https://portal.timetoreply.com/api/reports/teams?model=1&model_type=Team&model_com=1&model_type_com=Contact%20Group&per_page=2&direction=desc&page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "next_page_url": null,
        "path": "https://portal.timetoreply.com/api/reports/teams",
        "per_page": 2,
        "prev_page_url": null,
        "to": 1,
        "total": 1
    },
    "args": {
        "model": {
            "id": 1,
            "name": "US Support Team",
            "email_usernames": [
                "[email protected]",
                "[email protected]",
                "[email protected]"
            ],
            "model_type": "Team",
            "icon": "handshake"
        },
        "modelCom": {
            "id": 1,
            "name": "Top Revenue Customers",
            "email_usernames": [
                "[email protected]",
                "[email protected]"
            ],
            "customer_domains": [
                "cormier.com",
                "hills.com"
            ],
            "model_type": "Contact Group",
            "icon": "user-friends"
        }
    }
}
 

Request   

GET api/reports/teams

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

from   string  optional  

The start date of your request in the format "YYYY-MM-DD". Must be less than or equal to "to". Example: 2020-01-01

to   string  optional  

The end date of your request in the format "YYYY-MM-DD". Must be greater than or equal to "from". Example: 2020-01-08

model   string  optional  

The ID, Name of the team you want statistics for. Use the models endpoint to get a list. Example: 1

model_type   string  optional  

Model Type of the model being queried. Can only be 'Internal' or 'Team'. Example: Team

exclude_cc   boolean  optional  

Should we exclude CC messages from the statistics. Example: false

model_com   string  optional  

Model Communicating With, same as Model, except now for who/what the Model is communicating with. Example: 1

model_type_com   string  optional  

Model Type of the model you are communicating with. Use "Contact" for email address and domain. Example: Contact Group

exclude_cc_com   boolean  optional  

Should we exclude CC messages from the statistics for the communicating with model. Example: false

exclusive   boolean  optional  

Should we only focus on statistics where exclusively Model and ModelCom were involved?. Example: false

search   string  optional  

Search a specific email subject line (warning this is very slow!).

label   string[]  optional  

Label, if your mail provider supports labels/categories, you can filter your results using them.

thread_type   string  optional  

A comma separated list (no spaces) of any combination of the following: inbound,outbound,internal. Example: inbound,outbound,internal

thread_status   string  optional  

A comma separated list (no spaces) of any combination of the following: internal,await-customer,closed,await-agent. Example: internal,await-customer,closed,await-agent

has_replies   string  optional  

A comma separated list (no spaces) of any combination of the following: hasReplies,hasForwards,hasNoRepliesOrForwards. Example: hasReplies,hasForwards,hasNoRepliesOrForwards

classification   string  optional  

A comma separated list (no spaces) of any combination of the following: calculating,first,reply,reply-all,forward,follow-up. Example: calculating,first,reply,reply-all,forward

messageType   string  optional  

A comma separated list (no spaces) of any combination of the following: inbound,outbound,internal. Example: inbound,outbound,internal

replies_over   integer  optional  

Limit results to conversations with first reply times over X minutes. Should not be used at same time as message_replies_over. Example: 15

message_replies_over   integer  optional  

Limit results to messages where the reply time was over X minutes. Should not be used at same time as replies_over. Example: 15

no_reply_for   integer  optional  

Limit results to messages that have not had a reply for at least X minutes. Example: 15

per_page   integer  optional  

For paginated results, how many results per page. Max 200. Example: 2

sort_by   string  optional  

Field Name to sort agents by. Defaults to threads.total. Example: threads.total

direction   string  optional  

Direction in which to sort paginated results. Must be either asc or desc. Example: desc

page   integer  optional  

For paginated results, which page to get. Example: 1

Group Mailboxes

Group Mailboxes - Report

requires authentication

Group Mailboxes Report Data

Example request:
const url = new URL(
    "https://portal.timetoreply.com/api/reports/group-mailboxes"
);

const params = {
    "from": "2020-01-01",
    "to": "2020-01-08",
    "model": "1",
    "model_type": "Group Mailbox",
    "exclude_cc": "0",
    "model_com": "1",
    "model_type_com": "Contact Group",
    "exclude_cc_com": "0",
    "exclusive": "0",
    "label[0]": "INBOX",
    "thread_type": "inbound,outbound,internal",
    "thread_status": "internal,await-customer,closed,await-agent",
    "has_replies": "hasReplies,hasForwards,hasNoRepliesOrForwards",
    "classification": "calculating,first,reply,reply-all,forward",
    "messageType": "inbound,outbound,internal",
    "replies_over": "15",
    "message_replies_over": "15",
    "no_reply_for": "15",
    "per_page": "2",
    "sort_by": "threads.total",
    "direction": "desc",
    "page": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/reports/group-mailboxes';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'from' => '2020-01-01',
            'to' => '2020-01-08',
            'model' => '1',
            'model_type' => 'Group Mailbox',
            'exclude_cc' => '0',
            'model_com' => '1',
            'model_type_com' => 'Contact Group',
            'exclude_cc_com' => '0',
            'exclusive' => '0',
            'label[0]' => 'INBOX',
            'thread_type' => 'inbound,outbound,internal',
            'thread_status' => 'internal,await-customer,closed,await-agent',
            'has_replies' => 'hasReplies,hasForwards,hasNoRepliesOrForwards',
            'classification' => 'calculating,first,reply,reply-all,forward',
            'messageType' => 'inbound,outbound,internal',
            'replies_over' => '15',
            'message_replies_over' => '15',
            'no_reply_for' => '15',
            'per_page' => '2',
            'sort_by' => 'threads.total',
            'direction' => 'desc',
            'page' => '1',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://portal.timetoreply.com/api/reports/group-mailboxes?from=2020-01-01&to=2020-01-08&model=1&model_type=Group+Mailbox&exclude_cc=&model_com=1&model_type_com=Contact+Group&exclude_cc_com=&exclusive=&label[]=INBOX&thread_type=inbound%2Coutbound%2Cinternal&thread_status=internal%2Cawait-customer%2Cclosed%2Cawait-agent&has_replies=hasReplies%2ChasForwards%2ChasNoRepliesOrForwards&classification=calculating%2Cfirst%2Creply%2Creply-all%2Cforward&messageType=inbound%2Coutbound%2Cinternal&replies_over=15&message_replies_over=15&no_reply_for=15&per_page=2&sort_by=threads.total&direction=desc&page=1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
tracking-events: []
 

{
    "stats": {
        "threads": {
            "total": 0,
            "internal": 0,
            "inbound": 0,
            "outbound": 0,
            "sent_internally": 0,
            "await_customer": 0,
            "await_agent": 0,
            "closed": 0,
            "have_replies": 0,
            "have_replies_from_agents": 0,
            "have_no_replies_from_agents": 0,
            "completionRatio": {
                "ratio": 0,
                "numerator": 0,
                "denominator": 0
            },
            "handledRate": {
                "rate": 0,
                "numerator": 0,
                "denominator": 0
            },
            "top_labels": "",
            "messages_per_conversations_avg": "N/A",
            "messages_sent_per_conversations_avg": "N/A",
            "messages_received_per_conversations_avg": "N/A",
            "labels": {
                "total": 0,
                "list": []
            }
        },
        "messages": {
            "count": 0,
            "initial": 0,
            "replies": 0,
            "forward": 0,
            "follow_up": 0,
            "received": {
                "count": 0,
                "initial": 0,
                "replies": 0,
                "forward": 0,
                "follow_up": 0,
                "initial_replies": 0,
                "dayOfWeek": null,
                "hourOfDay": null,
                "avg_wait": "N/A",
                "avg_wait_raw": null,
                "avg_first_wait": "N/A",
                "avg_first_wait_raw": null
            },
            "sent": {
                "count": 0,
                "initial": 0,
                "replies": 0,
                "forward": 0,
                "follow_up": 0,
                "initial_replies": 0,
                "dayOfWeek": null,
                "hourOfDay": null
            }
        },
        "overallTTR": {
            "friendly": "N/A",
            "raw": 0,
            "friendly_no_business": "N/A",
            "raw_no_business": 0,
            "deviation_friendly": "N/A",
            "deviation_raw": 0,
            "deviation_friendly_no_business": "N/A",
            "deviation_raw_no_business": 0,
            "median_friendly": "N/A",
            "median_raw": 0,
            "median_friendly_no_business": "N/A",
            "median_raw_no_business": 0,
            "consistency_score": "N/A",
            "consistency_score_no_business": "N/A",
            "percentileRanks": [],
            "percentileRanksRaw": [],
            "within_sla": null,
            "within_sla_percentage_friendly": "N/A",
            "sla_breach": null,
            "sla_breach_percentage_friendly": "N/A",
            "excluded_from_sla": 0,
            "excluded_from_sla_percentage_friendly": "N/A"
        },
        "initialTTR": {
            "friendly": "N/A",
            "raw": 0,
            "friendly_no_business": "N/A",
            "raw_no_business": 0,
            "deviation_friendly": "N/A",
            "deviation_raw": 0,
            "deviation_friendly_no_business": "N/A",
            "deviation_raw_no_business": 0,
            "median_friendly": "N/A",
            "median_raw": 0,
            "median_friendly_no_business": "N/A",
            "median_raw_no_business": 0,
            "consistency_score": "N/A",
            "consistency_score_no_business": "N/A",
            "percentileRanks": [],
            "percentileRanksRaw": [],
            "within_sla": null,
            "within_sla_percentage_friendly": "N/A",
            "sla_breach": null,
            "sla_breach_percentage_friendly": "N/A",
            "excluded_from_sla": 0,
            "excluded_from_sla_percentage_friendly": "N/A"
        },
        "overallTTF": {
            "friendly": "N/A",
            "raw": 0,
            "friendly_no_business": "N/A",
            "raw_no_business": 0
        },
        "overallTTC": {
            "friendly": "N/A",
            "raw": 0,
            "friendly_no_business": "N/A",
            "raw_no_business": 0,
            "percentileRanks": [],
            "percentileRanksRaw": [],
            "within_sla": null,
            "within_sla_percentage_friendly": "N/A",
            "sla_breach": null,
            "sla_breach_percentage_friendly": "N/A"
        },
        "dailyStats": []
    },
    "all_group_mailbox_stats": {
        "current_page": 1,
        "data": [
            {
                "name": "US Support",
                "threads": {
                    "total": 0,
                    "internal": 0,
                    "inbound": 0,
                    "outbound": 0,
                    "sent_internally": 0,
                    "await_customer": 0,
                    "await_agent": 0,
                    "closed": 0,
                    "have_replies": 0,
                    "handledRate": {
                        "rate": 0
                    }
                },
                "messages": {
                    "received": {
                        "count": 0,
                        "initial": 0,
                        "replies": 0,
                        "forward": 0,
                        "follow_up": 0
                    },
                    "sent": {
                        "count": 0,
                        "initial": 0,
                        "replies": 0,
                        "forward": 0,
                        "follow_up": 0
                    }
                },
                "overallTTR": {
                    "friendly": "N/A",
                    "friendly_no_business": "N/A",
                    "deviation_friendly": "N/A",
                    "deviation_friendly_no_business": "N/A",
                    "median_friendly": "N/A",
                    "median_friendly_no_business": "N/A",
                    "consistency_score": "N/A",
                    "consistency_score_no_business": "N/A",
                    "excluded_from_sla": 0,
                    "excluded_from_sla_percentage_friendly": "N/A"
                },
                "initialTTR": {
                    "friendly": "N/A",
                    "friendly_no_business": "N/A",
                    "deviation_friendly": "N/A",
                    "deviation_friendly_no_business": "N/A",
                    "median_friendly": "N/A",
                    "median_friendly_no_business": "N/A",
                    "consistency_score": "N/A",
                    "consistency_score_no_business": "N/A",
                    "excluded_from_sla": 0,
                    "excluded_from_sla_percentage_friendly": "N/A"
                },
                "overallTTC": {
                    "friendly": "N/A",
                    "friendly_no_business": "N/A"
                },
                "overallTTF": {
                    "friendly": "N/A",
                    "friendly_no_business": "N/A"
                },
                "members": {
                    "current_page": 1,
                    "data": [
                        {
                            "name": "[email protected]",
                            "threads": {
                                "total": 0,
                                "internal": 0,
                                "inbound": 0,
                                "outbound": 0,
                                "sent_internally": 0,
                                "await_customer": 0,
                                "await_agent": 0,
                                "closed": 0,
                                "have_replies": 0,
                                "handledRate": {
                                    "rate": 0
                                }
                            },
                            "messages": {
                                "received": {
                                    "count": 0,
                                    "initial": 0,
                                    "replies": 0,
                                    "forward": 0,
                                    "follow_up": 0
                                },
                                "sent": {
                                    "count": 0,
                                    "initial": 0,
                                    "replies": 0,
                                    "forward": 0,
                                    "follow_up": 0
                                }
                            },
                            "overallTTR": {
                                "friendly": "N/A",
                                "friendly_no_business": "N/A",
                                "deviation_friendly": "N/A",
                                "deviation_friendly_no_business": "N/A",
                                "median_friendly": "N/A",
                                "median_friendly_no_business": "N/A",
                                "consistency_score": "N/A",
                                "consistency_score_no_business": "N/A",
                                "excluded_from_sla": 0,
                                "excluded_from_sla_percentage_friendly": "N/A"
                            },
                            "initialTTR": {
                                "friendly": "N/A",
                                "friendly_no_business": "N/A",
                                "deviation_friendly": "N/A",
                                "deviation_friendly_no_business": "N/A",
                                "median_friendly": "N/A",
                                "median_friendly_no_business": "N/A",
                                "consistency_score": "N/A",
                                "consistency_score_no_business": "N/A",
                                "excluded_from_sla": 0,
                                "excluded_from_sla_percentage_friendly": "N/A"
                            },
                            "overallTTC": {
                                "friendly": "N/A",
                                "friendly_no_business": "N/A"
                            },
                            "overallTTF": {
                                "friendly": "N/A",
                                "friendly_no_business": "N/A"
                            }
                        },
                        {
                            "name": "[email protected]",
                            "threads": {
                                "total": 0,
                                "internal": 0,
                                "inbound": 0,
                                "outbound": 0,
                                "sent_internally": 0,
                                "await_customer": 0,
                                "await_agent": 0,
                                "closed": 0,
                                "have_replies": 0,
                                "handledRate": {
                                    "rate": 0
                                }
                            },
                            "messages": {
                                "received": {
                                    "count": 0,
                                    "initial": 0,
                                    "replies": 0,
                                    "forward": 0,
                                    "follow_up": 0
                                },
                                "sent": {
                                    "count": 0,
                                    "initial": 0,
                                    "replies": 0,
                                    "forward": 0,
                                    "follow_up": 0
                                }
                            },
                            "overallTTR": {
                                "friendly": "N/A",
                                "friendly_no_business": "N/A",
                                "deviation_friendly": "N/A",
                                "deviation_friendly_no_business": "N/A",
                                "median_friendly": "N/A",
                                "median_friendly_no_business": "N/A",
                                "consistency_score": "N/A",
                                "consistency_score_no_business": "N/A",
                                "excluded_from_sla": 0,
                                "excluded_from_sla_percentage_friendly": "N/A"
                            },
                            "initialTTR": {
                                "friendly": "N/A",
                                "friendly_no_business": "N/A",
                                "deviation_friendly": "N/A",
                                "deviation_friendly_no_business": "N/A",
                                "median_friendly": "N/A",
                                "median_friendly_no_business": "N/A",
                                "consistency_score": "N/A",
                                "consistency_score_no_business": "N/A",
                                "excluded_from_sla": 0,
                                "excluded_from_sla_percentage_friendly": "N/A"
                            },
                            "overallTTC": {
                                "friendly": "N/A",
                                "friendly_no_business": "N/A"
                            },
                            "overallTTF": {
                                "friendly": "N/A",
                                "friendly_no_business": "N/A"
                            }
                        }
                    ],
                    "first_page_url": "https://portal.timetoreply.com/api/reports/group-mailboxes?model=1&model_type=Group%20Mailbox&model_com=1&model_type_com=Contact%20Group&per_page=2&direction=desc&page=1",
                    "from": 1,
                    "last_page": 2,
                    "last_page_url": "https://portal.timetoreply.com/api/reports/group-mailboxes?model=1&model_type=Group%20Mailbox&model_com=1&model_type_com=Contact%20Group&per_page=2&direction=desc&page=2",
                    "links": [
                        {
                            "url": null,
                            "label": "« Previous",
                            "active": false
                        },
                        {
                            "url": "https://portal.timetoreply.com/api/reports/group-mailboxes?model=1&model_type=Group%20Mailbox&model_com=1&model_type_com=Contact%20Group&per_page=2&direction=desc&page=1",
                            "label": "1",
                            "active": true
                        },
                        {
                            "url": "https://portal.timetoreply.com/api/reports/group-mailboxes?model=1&model_type=Group%20Mailbox&model_com=1&model_type_com=Contact%20Group&per_page=2&direction=desc&page=2",
                            "label": "2",
                            "active": false
                        },
                        {
                            "url": "https://portal.timetoreply.com/api/reports/group-mailboxes?model=1&model_type=Group%20Mailbox&model_com=1&model_type_com=Contact%20Group&per_page=2&direction=desc&page=2",
                            "label": "Next »",
                            "active": false
                        }
                    ],
                    "next_page_url": "https://portal.timetoreply.com/api/reports/group-mailboxes?model=1&model_type=Group%20Mailbox&model_com=1&model_type_com=Contact%20Group&per_page=2&direction=desc&page=2",
                    "path": "https://portal.timetoreply.com/api/reports/group-mailboxes",
                    "per_page": 2,
                    "prev_page_url": null,
                    "to": 2,
                    "total": 4
                }
            }
        ],
        "first_page_url": "https://portal.timetoreply.com/api/reports/group-mailboxes?model=1&model_type=Group%20Mailbox&model_com=1&model_type_com=Contact%20Group&per_page=2&direction=desc&page=1",
        "from": 1,
        "last_page": 1,
        "last_page_url": "https://portal.timetoreply.com/api/reports/group-mailboxes?model=1&model_type=Group%20Mailbox&model_com=1&model_type_com=Contact%20Group&per_page=2&direction=desc&page=1",
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "https://portal.timetoreply.com/api/reports/group-mailboxes?model=1&model_type=Group%20Mailbox&model_com=1&model_type_com=Contact%20Group&per_page=2&direction=desc&page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "next_page_url": null,
        "path": "https://portal.timetoreply.com/api/reports/group-mailboxes",
        "per_page": 2,
        "prev_page_url": null,
        "to": 1,
        "total": 1
    },
    "args": {
        "model": {
            "id": 1,
            "name": "US Support",
            "email_usernames": [
                "[email protected]",
                "[email protected]",
                "[email protected]",
                "[email protected]"
            ],
            "model_type": "Group Mailbox",
            "icon": "users"
        },
        "modelCom": {
            "id": 1,
            "name": "Top Revenue Customers",
            "email_usernames": [
                "[email protected]",
                "[email protected]"
            ],
            "customer_domains": [
                "cormier.com",
                "hills.com"
            ],
            "model_type": "Contact Group",
            "icon": "user-friends"
        }
    }
}
 

Request   

GET api/reports/group-mailboxes

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

from   string  optional  

The start date of your request in the format "YYYY-MM-DD". Must be less than or equal to "to". Example: 2020-01-01

to   string  optional  

The end date of your request in the format "YYYY-MM-DD". Must be greater than or equal to "from". Example: 2020-01-08

model   string  optional  

The ID or Name of the group mailbox you want statistics for. Use the models endpoint to get a list. Example: 1

model_type   string  optional  

Model Type of the model being queried. Can only be 'Internal' or 'Group Mailbox'. Example: Group Mailbox

exclude_cc   boolean  optional  

Should we exclude CC messages from the statistics. Example: false

model_com   string  optional  

Model Communicating With, same as Model, except now for who/what the Model is communicating with. Example: 1

model_type_com   string  optional  

Model Type of the model you are communicating with. Use "Contact" for email address and domain. Example: Contact Group

exclude_cc_com   boolean  optional  

Should we exclude CC messages from the statistics for the communicating with model. Example: false

exclusive   boolean  optional  

Should we only focus on statistics where exclusively Model and ModelCom were involved?. Example: false

search   string  optional  

Search a specific email subject line (warning this is very slow!).

label   string[]  optional  

Label, if your mail provider supports labels/categories, you can filter your results using them.

thread_type   string  optional  

A comma separated list (no spaces) of any combination of the following: inbound,outbound,internal. Example: inbound,outbound,internal

thread_status   string  optional  

A comma separated list (no spaces) of any combination of the following: internal,await-customer,closed,await-agent. Example: internal,await-customer,closed,await-agent

has_replies   string  optional  

A comma separated list (no spaces) of any combination of the following: hasReplies,hasForwards,hasNoRepliesOrForwards. Example: hasReplies,hasForwards,hasNoRepliesOrForwards

classification   string  optional  

A comma separated list (no spaces) of any combination of the following: calculating,first,reply,reply-all,forward,follow-up. Example: calculating,first,reply,reply-all,forward

messageType   string  optional  

A comma separated list (no spaces) of any combination of the following: inbound,outbound,internal. Example: inbound,outbound,internal

replies_over   integer  optional  

Limit results to conversations with first reply times over X minutes. Should not be used at same time as message_replies_over. Example: 15

message_replies_over   integer  optional  

Limit results to messages where the reply time was over X minutes. Should not be used at same time as replies_over. Example: 15

no_reply_for   integer  optional  

Limit results to messages that have not had a reply for at least X minutes. Example: 15

per_page   integer  optional  

For paginated results, how many results per page. Max 200. Example: 2

sort_by   string  optional  

Field Name to sort agents by. Defaults to threads.total. Example: threads.total

direction   string  optional  

Direction in which to sort paginated results. Must be either asc or desc. Example: desc

page   integer  optional  

For paginated results, which page to get. Example: 1

Lead Sources

Lead Sources - Report

requires authentication

Lead Sources Report Data

Example request:
const url = new URL(
    "https://portal.timetoreply.com/api/reports/lead-sources"
);

const params = {
    "from": "2020-01-01",
    "to": "2020-01-08",
    "model": "1",
    "model_type": "Team",
    "exclude_cc": "0",
    "model_com": "1",
    "model_type_com": "Contact Group",
    "exclude_cc_com": "0",
    "exclusive": "0",
    "label[0]": "INBOX",
    "thread_type": "inbound,outbound,internal",
    "thread_status": "internal,await-customer,closed,await-agent",
    "has_replies": "hasReplies,hasForwards,hasNoRepliesOrForwards",
    "classification": "calculating,first,reply,reply-all,forward",
    "messageType": "inbound,outbound,internal",
    "replies_over": "15",
    "message_replies_over": "15",
    "no_reply_for": "15",
    "per_page": "2",
    "sort_by": "threads.total",
    "direction": "desc",
    "page": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/reports/lead-sources';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'from' => '2020-01-01',
            'to' => '2020-01-08',
            'model' => '1',
            'model_type' => 'Team',
            'exclude_cc' => '0',
            'model_com' => '1',
            'model_type_com' => 'Contact Group',
            'exclude_cc_com' => '0',
            'exclusive' => '0',
            'label[0]' => 'INBOX',
            'thread_type' => 'inbound,outbound,internal',
            'thread_status' => 'internal,await-customer,closed,await-agent',
            'has_replies' => 'hasReplies,hasForwards,hasNoRepliesOrForwards',
            'classification' => 'calculating,first,reply,reply-all,forward',
            'messageType' => 'inbound,outbound,internal',
            'replies_over' => '15',
            'message_replies_over' => '15',
            'no_reply_for' => '15',
            'per_page' => '2',
            'sort_by' => 'threads.total',
            'direction' => 'desc',
            'page' => '1',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://portal.timetoreply.com/api/reports/lead-sources?from=2020-01-01&to=2020-01-08&model=1&model_type=Team&exclude_cc=&model_com=1&model_type_com=Contact+Group&exclude_cc_com=&exclusive=&label[]=INBOX&thread_type=inbound%2Coutbound%2Cinternal&thread_status=internal%2Cawait-customer%2Cclosed%2Cawait-agent&has_replies=hasReplies%2ChasForwards%2ChasNoRepliesOrForwards&classification=calculating%2Cfirst%2Creply%2Creply-all%2Cforward&messageType=inbound%2Coutbound%2Cinternal&replies_over=15&message_replies_over=15&no_reply_for=15&per_page=2&sort_by=threads.total&direction=desc&page=1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
tracking-events: []
 

{
    "stats": {
        "overallTTR": {
            "friendly": "N/A",
            "raw": null,
            "friendly_no_business": "N/A",
            "raw_no_business": null,
            "deviation_friendly": "N/A",
            "deviation_raw": null,
            "deviation_friendly_no_business": "N/A",
            "deviation_raw_no_business": null,
            "median_friendly": "N/A",
            "median_raw": null,
            "median_friendly_no_business": "N/A",
            "median_raw_no_business": null,
            "consistency_score": "N/A",
            "consistency_score_no_business": "N/A",
            "percentileRanks": [],
            "percentileRanksRaw": [],
            "within_sla": null,
            "within_sla_percentage_friendly": "N/A",
            "sla_breach": null,
            "sla_breach_percentage_friendly": "N/A",
            "excluded_from_sla": 0,
            "excluded_from_sla_percentage_friendly": "N/A"
        },
        "initialTTR": {
            "friendly": "N/A",
            "raw": null,
            "friendly_no_business": "N/A",
            "raw_no_business": null,
            "deviation_friendly": "N/A",
            "deviation_raw": null,
            "deviation_friendly_no_business": "N/A",
            "deviation_raw_no_business": null,
            "median_friendly": "N/A",
            "median_raw": null,
            "median_friendly_no_business": "N/A",
            "median_raw_no_business": null,
            "consistency_score": "N/A",
            "consistency_score_no_business": "N/A",
            "percentileRanks": [
                {
                    "key": "Within 1 hour",
                    "value": 0,
                    "count": 0
                },
                {
                    "key": "Within 2 hours",
                    "value": 0,
                    "count": 0
                },
                {
                    "key": "Within 4 hours",
                    "value": 0,
                    "count": 0
                },
                {
                    "key": "Within 8 hours",
                    "value": 0,
                    "count": 0
                },
                {
                    "key": "Without Any Reply",
                    "value": 100,
                    "count": 1
                }
            ],
            "percentileRanksRaw": [],
            "within_sla": 0,
            "within_sla_percentage_friendly": "N/A",
            "sla_breach": 0,
            "sla_breach_percentage_friendly": "N/A",
            "excluded_from_sla": 0,
            "excluded_from_sla_percentage_friendly": "N/A"
        },
        "threads": {
            "total": 1,
            "internal": 0,
            "inbound": 0,
            "outbound": 0,
            "sent_internally": 0,
            "await_customer": 0,
            "await_agent": 0,
            "closed": 0,
            "have_replies": 0,
            "have_replies_from_agents": 0,
            "have_no_replies_from_agents": 1,
            "completionRatio": {
                "ratio": 0,
                "numerator": 0,
                "denominator": 0
            },
            "handledRate": {
                "rate": 0,
                "numerator": 0,
                "denominator": 1
            },
            "labels": {
                "total": 0,
                "list": []
            },
            "messages_per_conversations_avg": 1,
            "messages_sent_per_conversations_avg": 1,
            "messages_received_per_conversations_avg": 0,
            "top_labels": ""
        },
        "closedWon": {
            "percentage": 100,
            "avg_touches": 1,
            "overallTTC": {
                "friendly": "0 minutes",
                "raw": 0
            }
        },
        "revenue": {
            "raw": 1635,
            "currency": "USD",
            "avg_touches": 1,
            "avg_nudges": 0,
            "potential_raw": 1635,
            "projected_raw": 1635
        },
        "dealStages": [
            {
                "name": "Closed won",
                "closing": true,
                "percentage": 100,
                "count": 1,
                "stage_id": 11,
                "sum_deal_values": 1635
            }
        ],
        "leadSources": [
            {
                "name": "US Sales Box",
                "percentage": 0,
                "count": 0,
                "overallTTR": {
                    "friendly": "0 minutes",
                    "raw": 0
                },
                "initialTTR": {
                    "friendly": "0 minutes",
                    "raw": 0
                }
            },
            {
                "name": "Web Enquiry Form",
                "percentage": 0,
                "count": 0,
                "overallTTR": {
                    "friendly": "0 minutes",
                    "raw": 0
                },
                "initialTTR": {
                    "friendly": "0 minutes",
                    "raw": 0
                }
            }
        ],
        "leads": {
            "count": 1
        },
        "deals": {
            "count": 1
        }
    },
    "args": {
        "model": {
            "id": 1,
            "name": "US Support Team",
            "email_usernames": [
                "[email protected]",
                "[email protected]",
                "[email protected]"
            ],
            "model_type": "Team",
            "icon": "handshake"
        },
        "modelCom": {
            "id": 1,
            "name": "Top Revenue Customers",
            "email_usernames": [
                "[email protected]",
                "[email protected]"
            ],
            "customer_domains": [
                "cormier.com",
                "hills.com"
            ],
            "model_type": "Contact Group",
            "icon": "user-friends"
        }
    }
}
 

Request   

GET api/reports/lead-sources

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

from   string  optional  

The start date of your request in the format "YYYY-MM-DD". Must be less than or equal to "to". Example: 2020-01-01

to   string  optional  

The end date of your request in the format "YYYY-MM-DD". Must be greater than or equal to "from". Example: 2020-01-08

model   string  optional  

The ID or Name of the team you want statistics for. Use the models endpoint to get a list. Example: 1

model_type   string  optional  

Model Type of the model being queried. Can only be 'Internal' or 'Team'. Example: Team

exclude_cc   boolean  optional  

Should we exclude CC messages from the statistics. Example: false

model_com   string  optional  

Model Communicating With, same as Model, except now for who/what the Model is communicating with. Example: 1

model_type_com   string  optional  

Model Type of the model you are communicating with. Use "Contact" for email address and domain. Example: Contact Group

exclude_cc_com   boolean  optional  

Should we exclude CC messages from the statistics for the communicating with model. Example: false

exclusive   boolean  optional  

Should we only focus on statistics where exclusively Model and ModelCom were involved?. Example: false

search   string  optional  

Search a specific email subject line (warning this is very slow!).

label   string[]  optional  

Label, if your mail provider supports labels/categories, you can filter your results using them.

thread_type   string  optional  

A comma separated list (no spaces) of any combination of the following: inbound,outbound,internal. Example: inbound,outbound,internal

thread_status   string  optional  

A comma separated list (no spaces) of any combination of the following: internal,await-customer,closed,await-agent. Example: internal,await-customer,closed,await-agent

has_replies   string  optional  

A comma separated list (no spaces) of any combination of the following: hasReplies,hasForwards,hasNoRepliesOrForwards. Example: hasReplies,hasForwards,hasNoRepliesOrForwards

classification   string  optional  

A comma separated list (no spaces) of any combination of the following: calculating,first,reply,reply-all,forward,follow-up. Example: calculating,first,reply,reply-all,forward

messageType   string  optional  

A comma separated list (no spaces) of any combination of the following: inbound,outbound,internal. Example: inbound,outbound,internal

replies_over   integer  optional  

Limit results to conversations with first reply times over X minutes. Should not be used at same time as message_replies_over. Example: 15

message_replies_over   integer  optional  

Limit results to messages where the reply time was over X minutes. Should not be used at same time as replies_over. Example: 15

no_reply_for   integer  optional  

Limit results to messages that have not had a reply for at least X minutes. Example: 15

per_page   integer  optional  

For paginated results, how many results per page. Max 200. Example: 2

sort_by   string  optional  

Field Name to sort agents by. Defaults to threads.total. Example: threads.total

direction   string  optional  

Direction in which to sort paginated results. Must be either asc or desc. Example: desc

page   integer  optional  

For paginated results, which page to get. Example: 1

Sales Rep

Sales Rep - Report

requires authentication

Sales Rep Report Data

Example request:
const url = new URL(
    "https://portal.timetoreply.com/api/reports/sales-rep"
);

const params = {
    "from": "2020-01-01",
    "to": "2020-01-08",
    "model": "My Company",
    "model_type": "Internal",
    "exclude_cc": "0",
    "model_com": "1",
    "model_type_com": "Contact Group",
    "exclude_cc_com": "0",
    "exclusive": "0",
    "label[0]": "INBOX",
    "thread_type": "inbound,outbound,internal",
    "thread_status": "internal,await-customer,closed,await-agent",
    "has_replies": "hasReplies,hasForwards,hasNoRepliesOrForwards",
    "classification": "calculating,first,reply,reply-all,forward",
    "messageType": "inbound,outbound,internal",
    "replies_over": "15",
    "message_replies_over": "15",
    "no_reply_for": "15",
    "page_emails": "1",
    "per_page_emails": "2",
    "direction_emails": "desc",
    "sort_by_emails": "threads.total",
    "page_domains": "1",
    "per_page_domains": "2",
    "direction_domains": "desc",
    "sort_by_domains": "threads.total",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/reports/sales-rep';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'from' => '2020-01-01',
            'to' => '2020-01-08',
            'model' => 'My Company',
            'model_type' => 'Internal',
            'exclude_cc' => '0',
            'model_com' => '1',
            'model_type_com' => 'Contact Group',
            'exclude_cc_com' => '0',
            'exclusive' => '0',
            'label[0]' => 'INBOX',
            'thread_type' => 'inbound,outbound,internal',
            'thread_status' => 'internal,await-customer,closed,await-agent',
            'has_replies' => 'hasReplies,hasForwards,hasNoRepliesOrForwards',
            'classification' => 'calculating,first,reply,reply-all,forward',
            'messageType' => 'inbound,outbound,internal',
            'replies_over' => '15',
            'message_replies_over' => '15',
            'no_reply_for' => '15',
            'page_emails' => '1',
            'per_page_emails' => '2',
            'direction_emails' => 'desc',
            'sort_by_emails' => 'threads.total',
            'page_domains' => '1',
            'per_page_domains' => '2',
            'direction_domains' => 'desc',
            'sort_by_domains' => 'threads.total',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://portal.timetoreply.com/api/reports/sales-rep?from=2020-01-01&to=2020-01-08&model=My+Company&model_type=Internal&exclude_cc=&model_com=1&model_type_com=Contact+Group&exclude_cc_com=&exclusive=&label[]=INBOX&thread_type=inbound%2Coutbound%2Cinternal&thread_status=internal%2Cawait-customer%2Cclosed%2Cawait-agent&has_replies=hasReplies%2ChasForwards%2ChasNoRepliesOrForwards&classification=calculating%2Cfirst%2Creply%2Creply-all%2Cforward&messageType=inbound%2Coutbound%2Cinternal&replies_over=15&message_replies_over=15&no_reply_for=15&page_emails=1&per_page_emails=2&direction_emails=desc&sort_by_emails=threads.total&page_domains=1&per_page_domains=2&direction_domains=desc&sort_by_domains=threads.total" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
tracking-events: []
 

{
    "current_page": 1,
    "data": [
        {
            "deals": {
                "total": 0,
                "avg_messages_per_deal": 0
            },
            "leads": {
                "total": 0
            },
            "touches": {
                "count": 0,
                "avg": 0,
                "median": 0,
                "avg_time_between_touch": {
                    "friendly": "N/A",
                    "raw": 0
                }
            },
            "nudges": {
                "count": 0,
                "median": 0,
                "avg": 0
            },
            "closedWon": {
                "count": 0,
                "percentage": 0,
                "avg_touches": 0,
                "overallTTC": {
                    "friendly": "N/A",
                    "raw": 0
                }
            },
            "revenue": {
                "raw": 0,
                "currency": "USD"
            },
            "initialTTR": {
                "friendly": "N/A",
                "raw": null
            },
            "name": "[email protected]"
        },
        {
            "deals": {
                "total": 0,
                "avg_messages_per_deal": 0
            },
            "leads": {
                "total": 1
            },
            "touches": {
                "count": 1,
                "avg": 1,
                "median": 1,
                "avg_time_between_touch": {
                    "friendly": "0 minutes",
                    "raw": 0
                }
            },
            "nudges": {
                "count": 0,
                "avg": 0,
                "median": 0
            },
            "closedWon": {
                "count": 1,
                "percentage": 100,
                "avg_touches": 1,
                "overallTTC": {
                    "friendly": "0 minutes",
                    "raw": 0
                }
            },
            "revenue": {
                "raw": 1635,
                "currency": "USD"
            },
            "initialTTR": {
                "friendly": "N/A",
                "raw": null
            },
            "name": "[email protected]"
        }
    ],
    "first_page_url": "https://portal.timetoreply.com/api/reports/sales-rep?model=My%20Company&model_type=Internal&model_com=1&model_type_com=Contact%20Group&page_emails=1&per_page_emails=2&direction_emails=desc&sort_by_emails=threads.total&page_domains=1&per_page_domains=2&direction_domains=desc&sort_by_domains=threads.total&per_page=2&page=1",
    "from": 1,
    "last_page": 3,
    "last_page_url": "https://portal.timetoreply.com/api/reports/sales-rep?model=My%20Company&model_type=Internal&model_com=1&model_type_com=Contact%20Group&page_emails=1&per_page_emails=2&direction_emails=desc&sort_by_emails=threads.total&page_domains=1&per_page_domains=2&direction_domains=desc&sort_by_domains=threads.total&per_page=2&page=3",
    "links": [
        {
            "url": null,
            "label": "« Previous",
            "active": false
        },
        {
            "url": "https://portal.timetoreply.com/api/reports/sales-rep?model=My%20Company&model_type=Internal&model_com=1&model_type_com=Contact%20Group&page_emails=1&per_page_emails=2&direction_emails=desc&sort_by_emails=threads.total&page_domains=1&per_page_domains=2&direction_domains=desc&sort_by_domains=threads.total&per_page=2&page=1",
            "label": "1",
            "active": true
        },
        {
            "url": "https://portal.timetoreply.com/api/reports/sales-rep?model=My%20Company&model_type=Internal&model_com=1&model_type_com=Contact%20Group&page_emails=1&per_page_emails=2&direction_emails=desc&sort_by_emails=threads.total&page_domains=1&per_page_domains=2&direction_domains=desc&sort_by_domains=threads.total&per_page=2&page=2",
            "label": "2",
            "active": false
        },
        {
            "url": "https://portal.timetoreply.com/api/reports/sales-rep?model=My%20Company&model_type=Internal&model_com=1&model_type_com=Contact%20Group&page_emails=1&per_page_emails=2&direction_emails=desc&sort_by_emails=threads.total&page_domains=1&per_page_domains=2&direction_domains=desc&sort_by_domains=threads.total&per_page=2&page=3",
            "label": "3",
            "active": false
        },
        {
            "url": "https://portal.timetoreply.com/api/reports/sales-rep?model=My%20Company&model_type=Internal&model_com=1&model_type_com=Contact%20Group&page_emails=1&per_page_emails=2&direction_emails=desc&sort_by_emails=threads.total&page_domains=1&per_page_domains=2&direction_domains=desc&sort_by_domains=threads.total&per_page=2&page=2",
            "label": "Next »",
            "active": false
        }
    ],
    "next_page_url": "https://portal.timetoreply.com/api/reports/sales-rep?model=My%20Company&model_type=Internal&model_com=1&model_type_com=Contact%20Group&page_emails=1&per_page_emails=2&direction_emails=desc&sort_by_emails=threads.total&page_domains=1&per_page_domains=2&direction_domains=desc&sort_by_domains=threads.total&per_page=2&page=2",
    "path": "https://portal.timetoreply.com/api/reports/sales-rep",
    "per_page": 2,
    "prev_page_url": null,
    "to": 2,
    "total": 5
}
 

Request   

GET api/reports/sales-rep

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

from   string  optional  

The start date of your request in the format "YYYY-MM-DD". Must be less than or equal to "to". Example: 2020-01-01

to   string  optional  

The end date of your request in the format "YYYY-MM-DD". Must be greater than or equal to "from". Example: 2020-01-08

model   string  optional  

The ID, Name, email address or domain you want statistics for. Use the models endpoint to get a list. Example: My Company

model_type   string  optional  

Model Type of the model being queried. Use "Contact" for email address and domain. Example: Internal

exclude_cc   boolean  optional  

Should we exclude CC messages from the statistics. Example: false

model_com   string  optional  

Model Communicating With, same as Model, except now for who/what the Model is communicating with. Example: 1

model_type_com   string  optional  

Model Type of the model you are communicating with. Use "Contact" for email address and domain. Example: Contact Group

exclude_cc_com   boolean  optional  

Should we exclude CC messages from the statistics for the communicating with model. Example: false

exclusive   boolean  optional  

Should we only focus on statistics where exclusively Model and ModelCom were involved?. Example: false

search   string  optional  

Search a specific email subject line (warning this is very slow!).

label   string[]  optional  

Label, if your mail provider supports labels/categories, you can filter your results using them.

thread_type   string  optional  

A comma separated list (no spaces) of any combination of the following: inbound,outbound,internal. Example: inbound,outbound,internal

thread_status   string  optional  

A comma separated list (no spaces) of any combination of the following: internal,await-customer,closed,await-agent. Example: internal,await-customer,closed,await-agent

has_replies   string  optional  

A comma separated list (no spaces) of any combination of the following: hasReplies,hasForwards,hasNoRepliesOrForwards. Example: hasReplies,hasForwards,hasNoRepliesOrForwards

classification   string  optional  

A comma separated list (no spaces) of any combination of the following: calculating,first,reply,reply-all,forward,follow-up. Example: calculating,first,reply,reply-all,forward

messageType   string  optional  

A comma separated list (no spaces) of any combination of the following: inbound,outbound,internal. Example: inbound,outbound,internal

replies_over   integer  optional  

Limit results to conversations with first reply times over X minutes. Should not be used at same time as message_replies_over. Example: 15

message_replies_over   integer  optional  

Limit results to messages where the reply time was over X minutes. Should not be used at same time as replies_over. Example: 15

no_reply_for   integer  optional  

Limit results to messages that have not had a reply for at least X minutes. Example: 15

page_emails   integer  optional  

For paginated results, which page to get for emails. Example: 1

per_page_emails   integer  optional  

For paginated results, how many results per page for emails. Max 200. Example: 2

direction_emails   string  optional  

Direction in which to sort email results. Must be either asc or desc. Example: desc

sort_by_emails   string  optional  

Field Name to sort emails by. Defaults to threads.total. Example: threads.total

page_domains   integer  optional  

For paginated results, which page to get for domains. Example: 1

per_page_domains   integer  optional  

For paginated results, how many results per page for domains. Max 200. Example: 2

direction_domains   string  optional  

Direction in which to sort domain results. Must be either asc or desc. Example: desc

sort_by_domains   string  optional  

Field Name to sort domains by. Defaults to threads.total. Example: threads.total

Logs

Conversations

Conversations - Report

requires authentication

Conversation (Thread) Logs data

Example request:
const url = new URL(
    "https://portal.timetoreply.com/api/logs/conversations"
);

const params = {
    "from": "2020-01-01",
    "to": "2020-01-08",
    "model": "My Company",
    "model_type": "Internal",
    "exclude_cc": "0",
    "model_com": "1",
    "model_type_com": "Contact Group",
    "exclude_cc_com": "0",
    "exclusive": "0",
    "label[0]": "INBOX",
    "thread_type": "inbound,outbound,internal",
    "thread_status": "internal,await-customer,closed,await-agent",
    "has_replies": "hasReplies,hasForwards,hasNoRepliesOrForwards",
    "classification": "calculating,first,reply,reply-all,forward",
    "messageType": "inbound,outbound,internal",
    "replies_over": "15",
    "message_replies_over": "15",
    "no_reply_for": "15",
    "per_page": "2",
    "sort_by": "last_received_at_date_time",
    "direction": "desc",
    "page": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/logs/conversations';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'from' => '2020-01-01',
            'to' => '2020-01-08',
            'model' => 'My Company',
            'model_type' => 'Internal',
            'exclude_cc' => '0',
            'model_com' => '1',
            'model_type_com' => 'Contact Group',
            'exclude_cc_com' => '0',
            'exclusive' => '0',
            'label[0]' => 'INBOX',
            'thread_type' => 'inbound,outbound,internal',
            'thread_status' => 'internal,await-customer,closed,await-agent',
            'has_replies' => 'hasReplies,hasForwards,hasNoRepliesOrForwards',
            'classification' => 'calculating,first,reply,reply-all,forward',
            'messageType' => 'inbound,outbound,internal',
            'replies_over' => '15',
            'message_replies_over' => '15',
            'no_reply_for' => '15',
            'per_page' => '2',
            'sort_by' => 'last_received_at_date_time',
            'direction' => 'desc',
            'page' => '1',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://portal.timetoreply.com/api/logs/conversations?from=2020-01-01&to=2020-01-08&model=My+Company&model_type=Internal&exclude_cc=&model_com=1&model_type_com=Contact+Group&exclude_cc_com=&exclusive=&label[]=INBOX&thread_type=inbound%2Coutbound%2Cinternal&thread_status=internal%2Cawait-customer%2Cclosed%2Cawait-agent&has_replies=hasReplies%2ChasForwards%2ChasNoRepliesOrForwards&classification=calculating%2Cfirst%2Creply%2Creply-all%2Cforward&messageType=inbound%2Coutbound%2Cinternal&replies_over=15&message_replies_over=15&no_reply_for=15&per_page=2&sort_by=last_received_at_date_time&direction=desc&page=1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
tracking-events: []
 

{
    "threads": {
        "current_page": 1,
        "data": [
            {
                "id": 126,
                "init_agent_reply_time": null,
                "init_agent_action_time": 684,
                "total_agent_reply_time": 78530,
                "last_received_at_date_time": "Feb 6th 2024 11:27:05",
                "thread_type": "outbound",
                "thread_status": "await-agent",
                "raw_init_agent_reply_time": null,
                "init_agent_reply_message_id": null,
                "init_reply_agent_id": null,
                "time_to_close": null,
                "raw_time_to_close": null,
                "touches": 1,
                "nudges": 0,
                "friendly_initial_reply_time": "Pending",
                "friendly_raw_initial_reply_time": "Pending",
                "friendly_total_reply_time": "21h:48m:50s",
                "microsoft_conversations": [
                    "45YuWwxk78F0MNxvbu"
                ],
                "email_usernames": [
                    "[email protected]",
                    "[email protected]",
                    "[email protected]",
                    "[email protected]",
                    "[email protected]"
                ],
                "email_usernames_from": [
                    "[email protected]",
                    "[email protected]",
                    "[email protected]"
                ],
                "email_usernames_reply_to": [],
                "email_usernames_senders": [
                    "[email protected]",
                    "[email protected]",
                    "[email protected]"
                ],
                "email_usernames_to": [
                    "[email protected]",
                    "[email protected]",
                    "[email protected]",
                    "[email protected]"
                ],
                "email_usernames_received": [
                    "[email protected]",
                    "[email protected]",
                    "[email protected]",
                    "[email protected]"
                ],
                "email_domains": [
                    "hills.com",
                    "price.com",
                    "timetoreply.com",
                    "vandervort.com",
                    "fadel.com"
                ],
                "date_times": [
                    "2024-02-06 11:27:05",
                    "2024-02-05 16:28:14",
                    "2024-02-05 15:24:43",
                    "2024-02-05 13:49:39",
                    "2024-02-05 13:38:15"
                ],
                "message_classifications": [
                    "reply",
                    "forward",
                    "first"
                ],
                "message_subjects": [
                    "RE: iterate cross-media web-readiness",
                    "FW: iterate cross-media web-readiness",
                    "iterate cross-media web-readiness"
                ],
                "messages": [
                    {
                        "internet_message_id": "[email protected]",
                        "date_time": "Feb 6th 2024 11:27:05",
                        "timestamp": 1707218825,
                        "subject": "RE: iterate cross-media web-readiness (Excluded from statistics due to applied filters)",
                        "references": [
                            "[email protected]",
                            "[email protected]",
                            "[email protected]",
                            "[email protected]"
                        ],
                        "replytime": 68331,
                        "classification": "reply",
                        "raw_replytime": 68331,
                        "friendly_reply_time": "18h:58m:51s",
                        "friendly_raw_reply_time": "18h:58m:51s",
                        "email_domains": [
                            "hills.com",
                            "price.com"
                        ],
                        "email_domains_from": [
                            "hills.com"
                        ],
                        "email_domains_to": [
                            "price.com"
                        ],
                        "email_domains_reply_to": [],
                        "email_domains_senders": [
                            "hills.com"
                        ],
                        "email_domains_received": [
                            "price.com"
                        ],
                        "email_usernames": [
                            "[email protected]",
                            "[email protected]"
                        ],
                        "email_usernames_from": [
                            "[email protected]"
                        ],
                        "email_usernames_to": [
                            "[email protected]"
                        ],
                        "email_usernames_cc": [],
                        "email_usernames_reply_to": [],
                        "email_usernames_senders": [
                            "[email protected]"
                        ],
                        "email_usernames_received": [
                            "[email protected]"
                        ],
                        "is_initial_reply": false,
                        "is_newest_message": true,
                        "message_type": "other",
                        "labels": [
                            "UNREAD",
                            "CATEGORY_PERSONAL",
                            "STARRED",
                            "IMPORTANT"
                        ],
                        "is_touch": false,
                        "is_nudge": false,
                        "touch_time": null,
                        "reply_is_relevant": false,
                        "is_closing_email": false,
                        "is_included_in_stats": false,
                        "reply_is_outlier": false,
                        "agents_read_status": [],
                        "friendly_touch_time": "N/A",
                        "is_manually_excluded_from_sla_breach": false,
                        "within_percentile_rank": null
                    },
                    {
                        "internet_message_id": "[email protected]",
                        "date_time": "Feb 5th 2024 16:28:14",
                        "timestamp": 1707150494,
                        "subject": "RE: iterate cross-media web-readiness (Excluded from statistics due to applied filters)",
                        "references": [
                            "[email protected]",
                            "[email protected]",
                            "[email protected]"
                        ],
                        "replytime": 3811,
                        "classification": "reply",
                        "raw_replytime": 3811,
                        "friendly_reply_time": "01h:03m:31s",
                        "friendly_raw_reply_time": "01h:03m:31s",
                        "email_domains": [
                            "price.com",
                            "hills.com"
                        ],
                        "email_domains_from": [
                            "price.com"
                        ],
                        "email_domains_to": [
                            "hills.com"
                        ],
                        "email_domains_reply_to": [],
                        "email_domains_senders": [
                            "price.com"
                        ],
                        "email_domains_received": [
                            "hills.com"
                        ],
                        "email_usernames": [
                            "[email protected]",
                            "[email protected]"
                        ],
                        "email_usernames_from": [
                            "[email protected]"
                        ],
                        "email_usernames_to": [
                            "[email protected]"
                        ],
                        "email_usernames_cc": [],
                        "email_usernames_reply_to": [],
                        "email_usernames_senders": [
                            "[email protected]"
                        ],
                        "email_usernames_received": [
                            "[email protected]"
                        ],
                        "is_initial_reply": false,
                        "is_newest_message": false,
                        "message_type": "other",
                        "labels": [
                            "CATEGORY_PROMOTIONS",
                            "SENT",
                            "INBOX"
                        ],
                        "is_touch": false,
                        "is_nudge": false,
                        "touch_time": null,
                        "reply_is_relevant": false,
                        "is_closing_email": false,
                        "is_included_in_stats": false,
                        "reply_is_outlier": false,
                        "agents_read_status": [],
                        "friendly_touch_time": "N/A",
                        "is_manually_excluded_from_sla_breach": false,
                        "within_percentile_rank": null
                    },
                    {
                        "internet_message_id": "[email protected]",
                        "date_time": "Feb 5th 2024 15:24:43",
                        "timestamp": 1707146683,
                        "subject": "RE: iterate cross-media web-readiness (Excluded from statistics due to applied filters)",
                        "references": [
                            "[email protected]",
                            "[email protected]"
                        ],
                        "replytime": 5704,
                        "classification": "reply",
                        "raw_replytime": 5704,
                        "friendly_reply_time": "01h:35m:04s",
                        "friendly_raw_reply_time": "01h:35m:04s",
                        "email_domains": [
                            "hills.com",
                            "price.com"
                        ],
                        "email_domains_from": [
                            "hills.com"
                        ],
                        "email_domains_to": [
                            "price.com"
                        ],
                        "email_domains_reply_to": [],
                        "email_domains_senders": [
                            "hills.com"
                        ],
                        "email_domains_received": [
                            "price.com"
                        ],
                        "email_usernames": [
                            "[email protected]",
                            "[email protected]"
                        ],
                        "email_usernames_from": [
                            "[email protected]"
                        ],
                        "email_usernames_to": [
                            "[email protected]"
                        ],
                        "email_usernames_cc": [],
                        "email_usernames_reply_to": [],
                        "email_usernames_senders": [
                            "[email protected]"
                        ],
                        "email_usernames_received": [
                            "[email protected]"
                        ],
                        "is_initial_reply": false,
                        "is_newest_message": false,
                        "message_type": "other",
                        "labels": [],
                        "is_touch": false,
                        "is_nudge": false,
                        "touch_time": null,
                        "reply_is_relevant": false,
                        "is_closing_email": false,
                        "is_included_in_stats": false,
                        "reply_is_outlier": false,
                        "agents_read_status": [],
                        "friendly_touch_time": "N/A",
                        "is_manually_excluded_from_sla_breach": false,
                        "within_percentile_rank": null
                    },
                    {
                        "internet_message_id": "[email protected]",
                        "date_time": "Feb 5th 2024 13:49:39",
                        "timestamp": 1707140979,
                        "subject": "FW: iterate cross-media web-readiness (Excluded from statistics due to applied filters)",
                        "references": [
                            "[email protected]"
                        ],
                        "replytime": 684,
                        "classification": "forward",
                        "raw_replytime": 684,
                        "friendly_reply_time": "11m:24s",
                        "friendly_raw_reply_time": "11m:24s",
                        "email_domains": [
                            "price.com",
                            "hills.com"
                        ],
                        "email_domains_from": [
                            "price.com"
                        ],
                        "email_domains_to": [
                            "hills.com"
                        ],
                        "email_domains_reply_to": [],
                        "email_domains_senders": [
                            "price.com"
                        ],
                        "email_domains_received": [
                            "hills.com"
                        ],
                        "email_usernames": [
                            "[email protected]",
                            "[email protected]"
                        ],
                        "email_usernames_from": [
                            "[email protected]"
                        ],
                        "email_usernames_to": [
                            "[email protected]"
                        ],
                        "email_usernames_cc": [],
                        "email_usernames_reply_to": [],
                        "email_usernames_senders": [
                            "[email protected]"
                        ],
                        "email_usernames_received": [
                            "[email protected]"
                        ],
                        "is_initial_reply": false,
                        "is_newest_message": false,
                        "message_type": "other",
                        "labels": [
                            "UNREAD"
                        ],
                        "is_touch": false,
                        "is_nudge": false,
                        "touch_time": null,
                        "reply_is_relevant": false,
                        "is_closing_email": false,
                        "is_included_in_stats": false,
                        "reply_is_outlier": false,
                        "agents_read_status": [],
                        "friendly_touch_time": "N/A",
                        "is_manually_excluded_from_sla_breach": false,
                        "within_percentile_rank": null
                    },
                    {
                        "internet_message_id": "[email protected]",
                        "date_time": "Feb 5th 2024 13:38:15",
                        "timestamp": 1707140295,
                        "subject": "iterate cross-media web-readiness",
                        "references": null,
                        "replytime": null,
                        "classification": "first",
                        "raw_replytime": null,
                        "friendly_reply_time": "N/A",
                        "friendly_raw_reply_time": "N/A",
                        "email_domains": [
                            "timetoreply.com",
                            "vandervort.com",
                            "hills.com",
                            "fadel.com",
                            "price.com"
                        ],
                        "email_domains_from": [
                            "timetoreply.com"
                        ],
                        "email_domains_to": [
                            "vandervort.com",
                            "hills.com",
                            "fadel.com",
                            "price.com"
                        ],
                        "email_domains_reply_to": [],
                        "email_domains_senders": [
                            "timetoreply.com"
                        ],
                        "email_domains_received": [
                            "vandervort.com",
                            "hills.com",
                            "fadel.com",
                            "price.com"
                        ],
                        "email_usernames": [
                            "[email protected]",
                            "[email protected]",
                            "[email protected]",
                            "[email protected]",
                            "[email protected]"
                        ],
                        "email_usernames_from": [
                            "[email protected]"
                        ],
                        "email_usernames_to": [
                            "[email protected]",
                            "[email protected]",
                            "[email protected]",
                            "[email protected]"
                        ],
                        "email_usernames_cc": [],
                        "email_usernames_reply_to": [],
                        "email_usernames_senders": [
                            "[email protected]"
                        ],
                        "email_usernames_received": [
                            "[email protected]",
                            "[email protected]",
                            "[email protected]",
                            "[email protected]"
                        ],
                        "is_initial_reply": false,
                        "is_newest_message": false,
                        "message_type": "outbound",
                        "labels": [],
                        "is_touch": true,
                        "is_nudge": false,
                        "touch_time": null,
                        "reply_is_relevant": true,
                        "is_closing_email": false,
                        "is_included_in_stats": true,
                        "reply_is_outlier": false,
                        "agents_read_status": [],
                        "friendly_touch_time": "N/A",
                        "is_manually_excluded_from_sla_breach": false,
                        "within_percentile_rank": null
                    }
                ],
                "labels": [
                    "UNREAD",
                    "CATEGORY_PERSONAL",
                    "STARRED",
                    "IMPORTANT",
                    "CATEGORY_PROMOTIONS",
                    "SENT",
                    "INBOX"
                ],
                "has_contact_success": false,
                "contact_success_time": null,
                "contact_reply_time": null,
                "deal": {
                    "id": 15,
                    "deal_stage": 11,
                    "deal_value": 1635,
                    "owner": 3,
                    "name": "Practical Bronze Pants"
                },
                "subject": "iterate cross-media web-readiness",
                "initial_reply_is_relevant": true,
                "initial_reply_is_included_in_stats": true,
                "initial_reply_is_outlier": false,
                "friendly_time_to_close": "N/A",
                "friendly_raw_time_to_close": "N/A",
                "is_manually_excluded_from_sla_breach": false,
                "customer_has_response": false,
                "within_percentile_rank": null
            }
        ],
        "first_page_url": "https://portal.timetoreply.com/api/logs/conversations?model=My%20Company&model_type=Internal&model_com=1&model_type_com=Contact%20Group&per_page=2&direction=desc&page=1",
        "from": 1,
        "last_page": 1,
        "last_page_url": "https://portal.timetoreply.com/api/logs/conversations?model=My%20Company&model_type=Internal&model_com=1&model_type_com=Contact%20Group&per_page=2&direction=desc&page=1",
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "https://portal.timetoreply.com/api/logs/conversations?model=My%20Company&model_type=Internal&model_com=1&model_type_com=Contact%20Group&per_page=2&direction=desc&page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "next_page_url": null,
        "path": "https://portal.timetoreply.com/api/logs/conversations",
        "per_page": 2,
        "prev_page_url": null,
        "to": 1,
        "total": 1
    },
    "stats": {
        "threads": {
            "total": 1,
            "internal": 0,
            "inbound": 0,
            "outbound": 1,
            "sent_internally": 0,
            "await_customer": 0,
            "await_agent": 0,
            "closed": 0,
            "have_replies": 0,
            "have_replies_from_agents": 0,
            "have_no_replies_from_agents": 1,
            "completionRatio": {
                "ratio": 0,
                "numerator": 0,
                "denominator": 0
            },
            "handledRate": {
                "rate": 0,
                "numerator": 0,
                "denominator": 1
            },
            "labels": {
                "total": 0,
                "list": []
            },
            "messages_per_conversations_avg": 1,
            "messages_sent_per_conversations_avg": 1,
            "messages_received_per_conversations_avg": 0,
            "top_labels": ""
        },
        "messages": {
            "count": 1,
            "initial": 0,
            "replies": 0,
            "forward": 0,
            "follow_up": 0,
            "received": {
                "count": 0,
                "initial": 0,
                "replies": 0,
                "forward": 0,
                "follow_up": 0,
                "initial_replies": 0,
                "dayOfWeek": {
                    "Monday": 0,
                    "Tuesday": 0,
                    "Wednesday": 0,
                    "Thursday": 0,
                    "Friday": 0,
                    "Saturday": 0,
                    "Sunday": 0
                },
                "hourOfDay": {
                    "00:00": 0,
                    "01:00": 0,
                    "02:00": 0,
                    "03:00": 0,
                    "04:00": 0,
                    "05:00": 0,
                    "06:00": 0,
                    "07:00": 0,
                    "08:00": 0,
                    "09:00": 0,
                    "10:00": 0,
                    "11:00": 0,
                    "12:00": 0,
                    "13:00": 0,
                    "14:00": 0,
                    "15:00": 0,
                    "16:00": 0,
                    "17:00": 0,
                    "18:00": 0,
                    "19:00": 0,
                    "20:00": 0,
                    "21:00": 0,
                    "22:00": 0,
                    "23:00": 0
                },
                "avg_wait": "N/A",
                "avg_wait_raw": null,
                "avg_first_wait": "N/A",
                "avg_first_wait_raw": null
            },
            "sent": {
                "count": 1,
                "initial": 0,
                "replies": 0,
                "forward": 0,
                "follow_up": 0,
                "initial_replies": 0,
                "dayOfWeek": {
                    "Monday": 0,
                    "Tuesday": 0,
                    "Wednesday": 0,
                    "Thursday": 0,
                    "Friday": 0,
                    "Saturday": 0,
                    "Sunday": 0
                },
                "hourOfDay": {
                    "00:00": 0,
                    "01:00": 0,
                    "02:00": 0,
                    "03:00": 0,
                    "04:00": 0,
                    "05:00": 0,
                    "06:00": 0,
                    "07:00": 0,
                    "08:00": 0,
                    "09:00": 0,
                    "10:00": 0,
                    "11:00": 0,
                    "12:00": 0,
                    "13:00": 0,
                    "14:00": 0,
                    "15:00": 0,
                    "16:00": 0,
                    "17:00": 0,
                    "18:00": 0,
                    "19:00": 0,
                    "20:00": 0,
                    "21:00": 0,
                    "22:00": 0,
                    "23:00": 0
                }
            }
        },
        "overallTTR": {
            "friendly": "N/A",
            "raw": null,
            "friendly_no_business": "N/A",
            "raw_no_business": null,
            "deviation_friendly": "N/A",
            "deviation_raw": null,
            "deviation_friendly_no_business": "N/A",
            "deviation_raw_no_business": null,
            "median_friendly": "N/A",
            "median_raw": null,
            "median_friendly_no_business": "N/A",
            "median_raw_no_business": null,
            "consistency_score": "N/A",
            "consistency_score_no_business": "N/A",
            "percentileRanks": [],
            "percentileRanksRaw": [],
            "within_sla": null,
            "within_sla_percentage_friendly": "N/A",
            "sla_breach": null,
            "sla_breach_percentage_friendly": "N/A",
            "excluded_from_sla": 0,
            "excluded_from_sla_percentage_friendly": "N/A"
        },
        "initialTTR": {
            "friendly": "N/A",
            "raw": null,
            "friendly_no_business": "N/A",
            "raw_no_business": null,
            "deviation_friendly": "N/A",
            "deviation_raw": null,
            "deviation_friendly_no_business": "N/A",
            "deviation_raw_no_business": null,
            "median_friendly": "N/A",
            "median_raw": null,
            "median_friendly_no_business": "N/A",
            "median_raw_no_business": null,
            "consistency_score": "N/A",
            "consistency_score_no_business": "N/A",
            "percentileRanks": [],
            "percentileRanksRaw": [],
            "within_sla": 0,
            "within_sla_percentage_friendly": "N/A",
            "sla_breach": 0,
            "sla_breach_percentage_friendly": "N/A",
            "excluded_from_sla": 0,
            "excluded_from_sla_percentage_friendly": "N/A"
        },
        "overallTTF": {
            "friendly": "N/A",
            "raw": null,
            "friendly_no_business": "N/A",
            "raw_no_business": null
        },
        "overallTTC": {
            "friendly": "N/A",
            "raw": null,
            "friendly_no_business": "N/A",
            "raw_no_business": null,
            "percentileRanks": [],
            "percentileRanksRaw": [],
            "within_sla": 0,
            "within_sla_percentage_friendly": "N/A",
            "sla_breach": 0,
            "sla_breach_percentage_friendly": "N/A"
        },
        "dailyStats": []
    }
}
 

Request   

GET api/logs/conversations

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

from   string  optional  

The start date of your request in the format "YYYY-MM-DD". Must be less than or equal to "to". Example: 2020-01-01

to   string  optional  

The end date of your request in the format "YYYY-MM-DD". Must be greater than or equal to "from". Example: 2020-01-08

model   string  optional  

The ID, Name, email address or domain you want statistics for. Use the models endpoint to get a list. Example: My Company

model_type   string  optional  

Model Type of the model being queried. Use "Contact" for email address and domain. Example: Internal

exclude_cc   boolean  optional  

Should we exclude CC messages from the statistics. Example: false

model_com   string  optional  

Model Communicating With, same as Model, except now for who/what the Model is communicating with. Example: 1

model_type_com   string  optional  

Model Type of the model you are communicating with. Use "Contact" for email address and domain. Example: Contact Group

exclude_cc_com   boolean  optional  

Should we exclude CC messages from the statistics for the communicating with model. Example: false

exclusive   boolean  optional  

Should we only focus on statistics where exclusively Model and ModelCom were involved?. Example: false

search   string  optional  

Search a specific email subject line (warning this is very slow!).

label   string[]  optional  

Label, if your mail provider supports labels/categories, you can filter your results using them.

thread_type   string  optional  

A comma separated list (no spaces) of any combination of the following: inbound,outbound,internal. Example: inbound,outbound,internal

thread_status   string  optional  

A comma separated list (no spaces) of any combination of the following: internal,await-customer,closed,await-agent. Example: internal,await-customer,closed,await-agent

has_replies   string  optional  

A comma separated list (no spaces) of any combination of the following: hasReplies,hasForwards,hasNoRepliesOrForwards. Example: hasReplies,hasForwards,hasNoRepliesOrForwards

classification   string  optional  

A comma separated list (no spaces) of any combination of the following: calculating,first,reply,reply-all,forward,follow-up. Example: calculating,first,reply,reply-all,forward

messageType   string  optional  

A comma separated list (no spaces) of any combination of the following: inbound,outbound,internal. Example: inbound,outbound,internal

replies_over   integer  optional  

Limit results to conversations with first reply times over X minutes. Should not be used at same time as message_replies_over. Example: 15

message_replies_over   integer  optional  

Limit results to messages where the reply time was over X minutes. Should not be used at same time as replies_over. Example: 15

no_reply_for   integer  optional  

Limit results to messages that have not had a reply for at least X minutes. Example: 15

per_page   integer  optional  

For paginated results, how many results per page. Max 200. Example: 2

sort_by   string  optional  

Field Name to sort conversations (threads) by. Defaults to last_received_at_date_time. Example: last_received_at_date_time

direction   string  optional  

Direction in which to sort paginated results. Must be either asc or desc. Example: desc

page   integer  optional  

For paginated results, which page to get. Example: 1

Conversations - Find by subject or email

requires authentication

Find Conversation from a subject line or email address

Example request:
const url = new URL(
    "https://portal.timetoreply.com/api/logs/conversations/get-by-subject-or-email"
);

const params = {
    "search": "Support Query",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/logs/conversations/get-by-subject-or-email';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'search' => 'Support Query',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://portal.timetoreply.com/api/logs/conversations/get-by-subject-or-email?search=Support+Query" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
tracking-events: []
 

[]
 

Request   

GET api/logs/conversations/get-by-subject-or-email

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

search   string  optional  

Search a specific email subject line or email address. Example: Support Query

Conversations - Find

requires authentication

Entire Conversation from a single Message ID

Example request:
const url = new URL(
    "https://portal.timetoreply.com/api/logs/conversations/get-by-internet-message-id"
);

const params = {
    "internet_message_id": "[email protected]",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/logs/conversations/get-by-internet-message-id';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'internet_message_id' => '[email protected]',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://portal.timetoreply.com/api/logs/conversations/get-by-internet-message-id?internet_message_id=1601678270iYOoAwCjDD%40TnlYu0KwPhwXxhcTAeHFJMHlI.DrfT" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
tracking-events: []
 

{
    "id": 569,
    "init_agent_reply_time": 3745,
    "init_agent_action_time": 3745,
    "total_agent_reply_time": 17626,
    "last_received_at_date_time": "Feb 1st 2024 14:07:09",
    "thread_type": "outbound",
    "thread_status": "closed",
    "raw_init_agent_reply_time": 3745,
    "init_agent_reply_message_id": "[email protected]",
    "init_reply_agent_id": null,
    "time_to_close": 11116,
    "raw_time_to_close": 11116,
    "touches": 2,
    "nudges": 0,
    "friendly_initial_reply_time": "01h:02m:25s",
    "friendly_raw_initial_reply_time": "01h:02m:25s",
    "friendly_total_reply_time": "04h:53m:46s",
    "microsoft_conversations": [
        "YmJW4BTWG4RlR4CETC",
        "hMvcd7VYk2N5BYV6uG"
    ],
    "email_usernames": [
        "[email protected]",
        "[email protected]",
        "[email protected]",
        "[email protected]",
        "[email protected]",
        "[email protected]",
        "[email protected]"
    ],
    "email_usernames_from": [
        "[email protected]",
        "[email protected]"
    ],
    "email_usernames_reply_to": [],
    "email_usernames_senders": [
        "[email protected]",
        "[email protected]"
    ],
    "email_usernames_to": [
        "[email protected]",
        "[email protected]",
        "[email protected]"
    ],
    "email_usernames_received": [
        "[email protected]",
        "[email protected]",
        "[email protected]",
        "[email protected]",
        "[email protected]",
        "[email protected]",
        "[email protected]"
    ],
    "email_domains": [
        "mills.info",
        "veum.com",
        "timetoreply.com",
        "grady.com",
        "boyer.com",
        "purdy.com",
        "grimes.com"
    ],
    "date_times": [
        "2024-02-01 14:07:09",
        "2024-02-01 13:52:48",
        "2024-02-01 12:04:18",
        "2024-02-01 11:01:53"
    ],
    "message_classifications": [
        "follow-up",
        "reply-all",
        "first"
    ],
    "message_subjects": [
        "FW: productize plug-and-play functionalities",
        "RE: productize plug-and-play functionalities",
        "productize plug-and-play functionalities"
    ],
    "messages": [
        {
            "internet_message_id": "[email protected]",
            "date_time": "Feb 1st 2024 14:07:09",
            "timestamp": 1706796429,
            "subject": "FW: productize plug-and-play functionalities",
            "references": [
                "[email protected]",
                "1644430131",
                "[email protected]",
                "[email protected]"
            ],
            "replytime": 7371,
            "classification": "follow-up",
            "raw_replytime": 7371,
            "friendly_reply_time": "02h:02m:51s",
            "friendly_raw_reply_time": "02h:02m:51s",
            "email_domains": [
                "mills.info",
                "veum.com"
            ],
            "email_domains_from": [
                "mills.info"
            ],
            "email_domains_to": [
                "veum.com"
            ],
            "email_domains_reply_to": [],
            "email_domains_senders": [
                "mills.info"
            ],
            "email_domains_received": [
                "veum.com"
            ],
            "email_usernames": [
                "[email protected]",
                "[email protected]"
            ],
            "email_usernames_from": [
                "[email protected]"
            ],
            "email_usernames_to": [
                "[email protected]"
            ],
            "email_usernames_cc": [],
            "email_usernames_reply_to": [],
            "email_usernames_senders": [
                "[email protected]"
            ],
            "email_usernames_received": [
                "[email protected]"
            ],
            "is_initial_reply": false,
            "is_newest_message": true,
            "message_type": "other",
            "labels": [
                "UNREAD",
                "CATEGORY_PERSONAL",
                "CATEGORY_UPDATES",
                "CATEGORY_SOCIAL"
            ],
            "is_touch": false,
            "is_nudge": false,
            "touch_time": null,
            "reply_is_relevant": false,
            "is_closing_email": false,
            "is_included_in_stats": true,
            "reply_is_outlier": false,
            "agents_read_status": [],
            "friendly_touch_time": "N/A",
            "is_manually_excluded_from_sla_breach": false,
            "within_percentile_rank": null
        },
        {
            "internet_message_id": "[email protected]",
            "date_time": "Feb 1st 2024 13:52:48",
            "timestamp": 1706795568,
            "subject": "RE: productize plug-and-play functionalities",
            "references": [
                "[email protected]",
                "1644430131",
                "[email protected]"
            ],
            "replytime": 6510,
            "classification": "reply-all",
            "raw_replytime": 6510,
            "friendly_reply_time": "01h:48m:30s",
            "friendly_raw_reply_time": "01h:48m:30s",
            "email_domains": [
                "timetoreply.com",
                "mills.info",
                "veum.com",
                "grady.com",
                "boyer.com",
                "purdy.com",
                "grimes.com"
            ],
            "email_domains_from": [
                "timetoreply.com"
            ],
            "email_domains_to": [
                "mills.info",
                "veum.com"
            ],
            "email_domains_reply_to": [],
            "email_domains_senders": [
                "timetoreply.com"
            ],
            "email_domains_received": [
                "mills.info",
                "veum.com",
                "grady.com",
                "boyer.com",
                "purdy.com",
                "grimes.com"
            ],
            "email_usernames": [
                "[email protected]",
                "[email protected]",
                "[email protected]",
                "[email protected]",
                "[email protected]",
                "[email protected]",
                "[email protected]"
            ],
            "email_usernames_from": [
                "[email protected]"
            ],
            "email_usernames_to": [
                "[email protected]",
                "[email protected]"
            ],
            "email_usernames_cc": [
                "[email protected]",
                "[email protected]",
                "[email protected]",
                "[email protected]"
            ],
            "email_usernames_reply_to": [],
            "email_usernames_senders": [
                "[email protected]"
            ],
            "email_usernames_received": [
                "[email protected]",
                "[email protected]",
                "[email protected]",
                "[email protected]",
                "[email protected]",
                "[email protected]"
            ],
            "is_initial_reply": false,
            "is_newest_message": false,
            "message_type": "outbound",
            "labels": [],
            "is_touch": true,
            "is_nudge": false,
            "touch_time": 10255,
            "reply_is_relevant": false,
            "is_closing_email": false,
            "is_included_in_stats": true,
            "reply_is_outlier": false,
            "agents_read_status": [],
            "friendly_touch_time": "2h:50m",
            "is_manually_excluded_from_sla_breach": false,
            "within_percentile_rank": null
        },
        {
            "internet_message_id": "[email protected]",
            "date_time": "Feb 1st 2024 12:04:18",
            "timestamp": 1706789058,
            "subject": "RE: productize plug-and-play functionalities",
            "references": [
                "[email protected]",
                "1644430131"
            ],
            "replytime": 3745,
            "classification": "reply-all",
            "raw_replytime": 3745,
            "friendly_reply_time": "01h:02m:25s",
            "friendly_raw_reply_time": "01h:02m:25s",
            "email_domains": [
                "mills.info",
                "timetoreply.com",
                "veum.com",
                "grady.com",
                "boyer.com",
                "purdy.com",
                "grimes.com"
            ],
            "email_domains_from": [
                "mills.info"
            ],
            "email_domains_to": [
                "timetoreply.com",
                "veum.com"
            ],
            "email_domains_reply_to": [],
            "email_domains_senders": [
                "mills.info"
            ],
            "email_domains_received": [
                "timetoreply.com",
                "veum.com",
                "grady.com",
                "boyer.com",
                "purdy.com",
                "grimes.com"
            ],
            "email_usernames": [
                "[email protected]",
                "[email protected]",
                "[email protected]",
                "[email protected]",
                "[email protected]",
                "[email protected]",
                "[email protected]"
            ],
            "email_usernames_from": [
                "[email protected]"
            ],
            "email_usernames_to": [
                "[email protected]",
                "[email protected]"
            ],
            "email_usernames_cc": [
                "[email protected]",
                "[email protected]",
                "[email protected]",
                "[email protected]"
            ],
            "email_usernames_reply_to": [],
            "email_usernames_senders": [
                "[email protected]"
            ],
            "email_usernames_received": [
                "[email protected]",
                "[email protected]",
                "[email protected]",
                "[email protected]",
                "[email protected]",
                "[email protected]"
            ],
            "is_initial_reply": true,
            "is_newest_message": false,
            "message_type": "inbound",
            "labels": [
                "UNREAD",
                "Jewelry & Outdoors"
            ],
            "is_touch": false,
            "is_nudge": false,
            "touch_time": null,
            "reply_is_relevant": false,
            "is_closing_email": false,
            "is_included_in_stats": true,
            "reply_is_outlier": false,
            "agents_read_status": {
                "[email protected]": false
            },
            "friendly_touch_time": "N/A",
            "is_manually_excluded_from_sla_breach": false,
            "within_percentile_rank": null
        },
        {
            "internet_message_id": "1644430131",
            "date_time": "Feb 1st 2024 11:01:53",
            "timestamp": 1706785313,
            "subject": "productize plug-and-play functionalities",
            "references": [
                "[email protected]"
            ],
            "replytime": null,
            "classification": "first",
            "raw_replytime": null,
            "friendly_reply_time": "N/A",
            "friendly_raw_reply_time": "N/A",
            "email_domains": [
                "timetoreply.com",
                "veum.com",
                "mills.info",
                "grady.com",
                "boyer.com",
                "purdy.com",
                "grimes.com"
            ],
            "email_domains_from": [
                "timetoreply.com"
            ],
            "email_domains_to": [
                "veum.com",
                "mills.info"
            ],
            "email_domains_reply_to": [],
            "email_domains_senders": [
                "timetoreply.com"
            ],
            "email_domains_received": [
                "veum.com",
                "mills.info",
                "grady.com",
                "boyer.com",
                "purdy.com",
                "grimes.com"
            ],
            "email_usernames": [
                "[email protected]",
                "[email protected]",
                "[email protected]",
                "[email protected]",
                "[email protected]",
                "[email protected]",
                "[email protected]"
            ],
            "email_usernames_from": [
                "[email protected]"
            ],
            "email_usernames_to": [
                "[email protected]",
                "[email protected]"
            ],
            "email_usernames_cc": [
                "[email protected]",
                "[email protected]",
                "[email protected]",
                "[email protected]"
            ],
            "email_usernames_reply_to": [],
            "email_usernames_senders": [
                "[email protected]"
            ],
            "email_usernames_received": [
                "[email protected]",
                "[email protected]",
                "[email protected]",
                "[email protected]",
                "[email protected]",
                "[email protected]"
            ],
            "is_initial_reply": false,
            "is_newest_message": false,
            "message_type": "outbound",
            "labels": [
                "UNREAD",
                "SENT",
                "CATEGORY_SOCIAL"
            ],
            "is_touch": true,
            "is_nudge": false,
            "touch_time": null,
            "reply_is_relevant": false,
            "is_closing_email": false,
            "is_included_in_stats": true,
            "reply_is_outlier": false,
            "agents_read_status": [],
            "friendly_touch_time": "N/A",
            "is_manually_excluded_from_sla_breach": false,
            "within_percentile_rank": null
        }
    ],
    "labels": [
        "UNREAD",
        "CATEGORY_PERSONAL",
        "CATEGORY_UPDATES",
        "CATEGORY_SOCIAL",
        "Jewelry & Outdoors",
        "SENT"
    ],
    "has_contact_success": false,
    "contact_success_time": null,
    "contact_reply_time": null,
    "deal": null,
    "subject": "productize plug-and-play functionalities",
    "initial_reply_is_relevant": false,
    "initial_reply_is_included_in_stats": true,
    "initial_reply_is_outlier": false,
    "friendly_time_to_close": "3h:5m",
    "friendly_raw_time_to_close": "3h:5m",
    "is_manually_excluded_from_sla_breach": false,
    "customer_has_response": false,
    "within_percentile_rank": null
}
 

Request   

GET api/logs/conversations/get-by-internet-message-id

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

internet_message_id   string   

The internet message id of the message for which you want the entire conversation. Example: [email protected]

Conversations - Close

requires authentication

Endpoint For marking Conversations as closed.

Example request:
const url = new URL(
    "https://portal.timetoreply.com/api/logs/conversations/mark-closed"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "ids": [
        8,
        6,
        7,
        5,
        3,
        0,
        9
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/logs/conversations/mark-closed';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'ids' => [
                8,
                6,
                7,
                5,
                3,
                0,
                9,
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "https://portal.timetoreply.com/api/logs/conversations/mark-closed" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"ids\": [
        8,
        6,
        7,
        5,
        3,
        0,
        9
    ]
}"

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
tracking-events: []
 

{
    "ids": [
        3,
        5,
        6,
        7,
        8
    ]
}
 

Request   

POST api/logs/conversations/mark-closed

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

ids   integer[]   

An array of Conversation/Thread IDs to marked off as closed.

Conversations - Exclude from SLA Breach

requires authentication

Endpoint for manually excluding conversations (first reply times) from SLA Breach.

Example request:
const url = new URL(
    "https://portal.timetoreply.com/api/logs/conversations/exclude-from-sla-breach"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "ids": [
        8,
        6,
        7,
        5,
        3,
        0,
        9
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/logs/conversations/exclude-from-sla-breach';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'ids' => [
                8,
                6,
                7,
                5,
                3,
                0,
                9,
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "https://portal.timetoreply.com/api/logs/conversations/exclude-from-sla-breach" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"ids\": [
        8,
        6,
        7,
        5,
        3,
        0,
        9
    ]
}"

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
tracking-events: []
 

{
    "ids": [
        8,
        6,
        7,
        5,
        3,
        0,
        9
    ]
}
 

Request   

POST api/logs/conversations/exclude-from-sla-breach

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

ids   integer[]   

An array of Conversation/Thread IDs to excluded from SLA breaches.

Conversations - Remove exclude from SLA Breach

requires authentication

Endpoint for removing the SLA breach exclusions for conversations (first reply times).

Example request:
const url = new URL(
    "https://portal.timetoreply.com/api/logs/conversations/remove-exclude-from-sla-breach"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "ids": [
        8,
        6,
        7,
        5,
        3,
        0,
        9
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/logs/conversations/remove-exclude-from-sla-breach';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'ids' => [
                8,
                6,
                7,
                5,
                3,
                0,
                9,
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "https://portal.timetoreply.com/api/logs/conversations/remove-exclude-from-sla-breach" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"ids\": [
        8,
        6,
        7,
        5,
        3,
        0,
        9
    ]
}"

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
tracking-events: []
 

{
    "ids": []
}
 

Request   

POST api/logs/conversations/remove-exclude-from-sla-breach

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

ids   integer[]   

An array of Conversation/Thread IDs that should no longer be excluded from SLA breaches.

Messages

Messages - Report

requires authentication

Message Logs data

Example request:
const url = new URL(
    "https://portal.timetoreply.com/api/logs/messages"
);

const params = {
    "from": "2020-01-01",
    "to": "2020-01-08",
    "model": "My Company",
    "model_type": "Internal",
    "exclude_cc": "0",
    "model_com": "1",
    "model_type_com": "Contact Group",
    "exclude_cc_com": "0",
    "exclusive": "0",
    "label[0]": "INBOX",
    "thread_type": "inbound,outbound,internal",
    "thread_status": "internal,await-customer,closed,await-agent",
    "has_replies": "hasReplies,hasForwards,hasNoRepliesOrForwards",
    "classification": "calculating,first,reply,reply-all,forward",
    "messageType": "inbound,outbound,internal",
    "replies_over": "15",
    "message_replies_over": "15",
    "no_reply_for": "15",
    "per_page": "2",
    "sort_by": "date_time",
    "direction": "desc",
    "page": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/logs/messages';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'from' => '2020-01-01',
            'to' => '2020-01-08',
            'model' => 'My Company',
            'model_type' => 'Internal',
            'exclude_cc' => '0',
            'model_com' => '1',
            'model_type_com' => 'Contact Group',
            'exclude_cc_com' => '0',
            'exclusive' => '0',
            'label[0]' => 'INBOX',
            'thread_type' => 'inbound,outbound,internal',
            'thread_status' => 'internal,await-customer,closed,await-agent',
            'has_replies' => 'hasReplies,hasForwards,hasNoRepliesOrForwards',
            'classification' => 'calculating,first,reply,reply-all,forward',
            'messageType' => 'inbound,outbound,internal',
            'replies_over' => '15',
            'message_replies_over' => '15',
            'no_reply_for' => '15',
            'per_page' => '2',
            'sort_by' => 'date_time',
            'direction' => 'desc',
            'page' => '1',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://portal.timetoreply.com/api/logs/messages?from=2020-01-01&to=2020-01-08&model=My+Company&model_type=Internal&exclude_cc=&model_com=1&model_type_com=Contact+Group&exclude_cc_com=&exclusive=&label[]=INBOX&thread_type=inbound%2Coutbound%2Cinternal&thread_status=internal%2Cawait-customer%2Cclosed%2Cawait-agent&has_replies=hasReplies%2ChasForwards%2ChasNoRepliesOrForwards&classification=calculating%2Cfirst%2Creply%2Creply-all%2Cforward&messageType=inbound%2Coutbound%2Cinternal&replies_over=15&message_replies_over=15&no_reply_for=15&per_page=2&sort_by=date_time&direction=desc&page=1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
tracking-events: []
 

{
    "stats": {
        "threads": {
            "total": 0,
            "internal": 0,
            "inbound": 0,
            "outbound": 0,
            "sent_internally": 0,
            "await_customer": 0,
            "await_agent": 0,
            "closed": 0,
            "have_replies": 0,
            "have_replies_from_agents": 0,
            "have_no_replies_from_agents": 0,
            "completionRatio": {
                "ratio": 0,
                "numerator": 0,
                "denominator": 0
            },
            "handledRate": {
                "rate": 0,
                "numerator": 0,
                "denominator": 0
            },
            "labels": {
                "total": 0,
                "list": []
            },
            "messages_per_conversations_avg": "N/A",
            "messages_sent_per_conversations_avg": "N/A",
            "messages_received_per_conversations_avg": "N/A",
            "top_labels": ""
        },
        "messages": {
            "count": 1,
            "initial": 0,
            "replies": 0,
            "forward": 0,
            "follow_up": 0,
            "received": {
                "count": 0,
                "initial": 0,
                "replies": 0,
                "forward": 0,
                "follow_up": 0,
                "initial_replies": 0,
                "dayOfWeek": {
                    "Monday": 0,
                    "Tuesday": 0,
                    "Wednesday": 0,
                    "Thursday": 0,
                    "Friday": 0,
                    "Saturday": 0,
                    "Sunday": 0
                },
                "hourOfDay": {
                    "00:00": 0,
                    "01:00": 0,
                    "02:00": 0,
                    "03:00": 0,
                    "04:00": 0,
                    "05:00": 0,
                    "06:00": 0,
                    "07:00": 0,
                    "08:00": 0,
                    "09:00": 0,
                    "10:00": 0,
                    "11:00": 0,
                    "12:00": 0,
                    "13:00": 0,
                    "14:00": 0,
                    "15:00": 0,
                    "16:00": 0,
                    "17:00": 0,
                    "18:00": 0,
                    "19:00": 0,
                    "20:00": 0,
                    "21:00": 0,
                    "22:00": 0,
                    "23:00": 0
                },
                "avg_wait": "N/A",
                "avg_wait_raw": null,
                "avg_first_wait": "N/A",
                "avg_first_wait_raw": null
            },
            "sent": {
                "count": 1,
                "initial": 1,
                "replies": 0,
                "forward": 0,
                "follow_up": 0,
                "initial_replies": 0,
                "dayOfWeek": {
                    "Monday": 0,
                    "Tuesday": 0,
                    "Wednesday": 0,
                    "Thursday": 0,
                    "Friday": 0,
                    "Saturday": 0,
                    "Sunday": 0
                },
                "hourOfDay": {
                    "00:00": 0,
                    "01:00": 0,
                    "02:00": 0,
                    "03:00": 0,
                    "04:00": 0,
                    "05:00": 0,
                    "06:00": 0,
                    "07:00": 0,
                    "08:00": 0,
                    "09:00": 0,
                    "10:00": 0,
                    "11:00": 0,
                    "12:00": 0,
                    "13:00": 0,
                    "14:00": 0,
                    "15:00": 0,
                    "16:00": 0,
                    "17:00": 0,
                    "18:00": 0,
                    "19:00": 0,
                    "20:00": 0,
                    "21:00": 0,
                    "22:00": 0,
                    "23:00": 0
                }
            }
        },
        "overallTTR": {
            "friendly": "N/A",
            "raw": null,
            "friendly_no_business": "N/A",
            "raw_no_business": null,
            "deviation_friendly": "N/A",
            "deviation_raw": null,
            "deviation_friendly_no_business": "N/A",
            "deviation_raw_no_business": null,
            "median_friendly": "N/A",
            "median_raw": null,
            "median_friendly_no_business": "N/A",
            "median_raw_no_business": null,
            "consistency_score": "N/A",
            "consistency_score_no_business": "N/A",
            "percentileRanks": [],
            "percentileRanksRaw": [],
            "within_sla": null,
            "within_sla_percentage_friendly": "N/A",
            "sla_breach": null,
            "sla_breach_percentage_friendly": "N/A",
            "excluded_from_sla": 0,
            "excluded_from_sla_percentage_friendly": "N/A"
        },
        "initialTTR": {
            "friendly": "N/A",
            "raw": null,
            "friendly_no_business": "N/A",
            "raw_no_business": null,
            "deviation_friendly": "N/A",
            "deviation_raw": null,
            "deviation_friendly_no_business": "N/A",
            "deviation_raw_no_business": null,
            "median_friendly": "N/A",
            "median_raw": null,
            "median_friendly_no_business": "N/A",
            "median_raw_no_business": null,
            "consistency_score": "N/A",
            "consistency_score_no_business": "N/A",
            "percentileRanks": [],
            "percentileRanksRaw": [],
            "within_sla": 0,
            "within_sla_percentage_friendly": "N/A",
            "sla_breach": 0,
            "sla_breach_percentage_friendly": "N/A",
            "excluded_from_sla": 0,
            "excluded_from_sla_percentage_friendly": "N/A"
        },
        "overallTTF": {
            "friendly": "N/A",
            "raw": null,
            "friendly_no_business": "N/A",
            "raw_no_business": null
        },
        "overallTTC": {
            "friendly": "N/A",
            "raw": null,
            "friendly_no_business": "N/A",
            "raw_no_business": null,
            "percentileRanks": [],
            "percentileRanksRaw": [],
            "within_sla": 0,
            "within_sla_percentage_friendly": "N/A",
            "sla_breach": 0,
            "sla_breach_percentage_friendly": "N/A"
        },
        "dailyStats": []
    },
    "messages": {
        "current_page": 1,
        "data": [
            {
                "internet_message_id": "[email protected]",
                "date_time": "Feb 5th 2024 13:38:15",
                "timestamp": 1707140295,
                "subject": "iterate cross-media web-readiness",
                "references": null,
                "replytime": null,
                "classification": "first",
                "raw_replytime": null,
                "friendly_reply_time": "N/A",
                "friendly_raw_reply_time": "N/A",
                "email_domains": [
                    "timetoreply.com",
                    "vandervort.com",
                    "hills.com",
                    "fadel.com",
                    "price.com"
                ],
                "email_domains_from": [
                    "timetoreply.com"
                ],
                "email_domains_to": [
                    "vandervort.com",
                    "hills.com",
                    "fadel.com",
                    "price.com"
                ],
                "email_domains_reply_to": [],
                "email_domains_senders": [
                    "timetoreply.com"
                ],
                "email_domains_received": [
                    "vandervort.com",
                    "hills.com",
                    "fadel.com",
                    "price.com"
                ],
                "email_usernames": [
                    "[email protected]",
                    "[email protected]",
                    "[email protected]",
                    "[email protected]",
                    "[email protected]"
                ],
                "email_usernames_from": [
                    "[email protected]"
                ],
                "email_usernames_to": [
                    "[email protected]",
                    "[email protected]",
                    "[email protected]",
                    "[email protected]"
                ],
                "email_usernames_cc": [],
                "email_usernames_reply_to": [],
                "email_usernames_senders": [
                    "[email protected]"
                ],
                "email_usernames_received": [
                    "[email protected]",
                    "[email protected]",
                    "[email protected]",
                    "[email protected]"
                ],
                "is_initial_reply": false,
                "is_newest_message": false,
                "message_type": "outbound",
                "labels": [],
                "is_touch": true,
                "is_nudge": false,
                "touch_time": null,
                "reply_is_relevant": true,
                "is_closing_email": false,
                "is_included_in_stats": true,
                "reply_is_outlier": false,
                "agents_read_status": [],
                "friendly_touch_time": "N/A",
                "thread_id": 126,
                "thread_message_count": 5,
                "is_manually_excluded_from_sla_breach": false,
                "within_percentile_rank": null
            }
        ],
        "first_page_url": "https://portal.timetoreply.com/api/logs/messages?model=My%20Company&model_type=Internal&model_com=1&model_type_com=Contact%20Group&per_page=2&direction=desc&page=1",
        "from": 1,
        "last_page": 1,
        "last_page_url": "https://portal.timetoreply.com/api/logs/messages?model=My%20Company&model_type=Internal&model_com=1&model_type_com=Contact%20Group&per_page=2&direction=desc&page=1",
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "https://portal.timetoreply.com/api/logs/messages?model=My%20Company&model_type=Internal&model_com=1&model_type_com=Contact%20Group&per_page=2&direction=desc&page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "next_page_url": null,
        "path": "https://portal.timetoreply.com/api/logs/messages",
        "per_page": 2,
        "prev_page_url": null,
        "to": 1,
        "total": 1
    }
}
 

Request   

GET api/logs/messages

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

from   string  optional  

The start date of your request in the format "YYYY-MM-DD". Must be less than or equal to "to". Example: 2020-01-01

to   string  optional  

The end date of your request in the format "YYYY-MM-DD". Must be greater than or equal to "from". Example: 2020-01-08

model   string  optional  

The ID, Name, email address or domain you want statistics for. Use the models endpoint to get a list. Example: My Company

model_type   string  optional  

Model Type of the model being queried. Use "Contact" for email address and domain. Example: Internal

exclude_cc   boolean  optional  

Should we exclude CC messages from the statistics. Example: false

model_com   string  optional  

Model Communicating With, same as Model, except now for who/what the Model is communicating with. Example: 1

model_type_com   string  optional  

Model Type of the model you are communicating with. Use "Contact" for email address and domain. Example: Contact Group

exclude_cc_com   boolean  optional  

Should we exclude CC messages from the statistics for the communicating with model. Example: false

exclusive   boolean  optional  

Should we only focus on statistics where exclusively Model and ModelCom were involved?. Example: false

search   string  optional  

Search a specific email subject line (warning this is very slow!).

label   string[]  optional  

Label, if your mail provider supports labels/categories, you can filter your results using them.

thread_type   string  optional  

A comma separated list (no spaces) of any combination of the following: inbound,outbound,internal. Example: inbound,outbound,internal

thread_status   string  optional  

A comma separated list (no spaces) of any combination of the following: internal,await-customer,closed,await-agent. Example: internal,await-customer,closed,await-agent

has_replies   string  optional  

A comma separated list (no spaces) of any combination of the following: hasReplies,hasForwards,hasNoRepliesOrForwards. Example: hasReplies,hasForwards,hasNoRepliesOrForwards

classification   string  optional  

A comma separated list (no spaces) of any combination of the following: calculating,first,reply,reply-all,forward,follow-up. Example: calculating,first,reply,reply-all,forward

messageType   string  optional  

A comma separated list (no spaces) of any combination of the following: inbound,outbound,internal. Example: inbound,outbound,internal

replies_over   integer  optional  

Limit results to conversations with first reply times over X minutes. Should not be used at same time as message_replies_over. Example: 15

message_replies_over   integer  optional  

Limit results to messages where the reply time was over X minutes. Should not be used at same time as replies_over. Example: 15

no_reply_for   integer  optional  

Limit results to messages that have not had a reply for at least X minutes. Example: 15

per_page   integer  optional  

For paginated results, how many results per page. Max 200. Example: 2

sort_by   string  optional  

Field Name to sort messages by. Defaults to date_time. Example: date_time

direction   string  optional  

Direction in which to sort paginated results. Must be either asc or desc. Example: desc

page   integer  optional  

For paginated results, which page to get. Example: 1

Messages - Exclude from SLA Breach

requires authentication

Endpoint for manually excluding messages (reply times) from SLA Breach.

Example request:
const url = new URL(
    "https://portal.timetoreply.com/api/logs/messages/exclude-from-sla-breach"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "ids": [
        "[email protected]",
        "[email protected]"
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/logs/messages/exclude-from-sla-breach';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'ids' => [
                '[email protected]',
                '[email protected]',
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "https://portal.timetoreply.com/api/logs/messages/exclude-from-sla-breach" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"ids\": [
        \"[email protected]\",
        \"[email protected]\"
    ]
}"

Example response (200):


{
    "ids": [
        "[email protected]",
        "[email protected]"
    ]
}
 

Request   

POST api/logs/messages/exclude-from-sla-breach

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

ids   string[]   

An array of Internet Message IDs to excluded from SLA breaches.

Messages - Remove exclude from SLA Breach

requires authentication

Endpoint for removing the SLA breach exclusions for messages (reply times).

Example request:
const url = new URL(
    "https://portal.timetoreply.com/api/logs/messages/remove-exclude-from-sla-breach"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "ids": [
        "[email protected]",
        "[email protected]"
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/logs/messages/remove-exclude-from-sla-breach';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'ids' => [
                '[email protected]',
                '[email protected]',
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "https://portal.timetoreply.com/api/logs/messages/remove-exclude-from-sla-breach" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"ids\": [
        \"[email protected]\",
        \"[email protected]\"
    ]
}"

Example response (200):


{
    "ids": [
        "[email protected]",
        "[email protected]"
    ]
}
 

Request   

POST api/logs/messages/remove-exclude-from-sla-breach

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

ids   string[]   

An array of Internet Message IDs that should no longer be excluded from SLA breaches.

Stats

Stats - Breakdown

requires authentication

Get the conversations or emails that make up a given statistic.

Example request:
const url = new URL(
    "https://portal.timetoreply.com/api/logs/stat-breakdown"
);

const params = {
    "stat": "threads.total",
    "from": "2020-01-01",
    "to": "2020-01-08",
    "model": "My Company",
    "model_type": "Internal",
    "exclude_cc": "0",
    "model_com": "1",
    "model_type_com": "Contact Group",
    "exclude_cc_com": "0",
    "exclusive": "0",
    "label[0]": "INBOX",
    "thread_type": "inbound,outbound,internal",
    "thread_status": "internal,await-customer,closed,await-agent",
    "has_replies": "hasReplies,hasForwards,hasNoRepliesOrForwards",
    "classification": "calculating,first,reply,reply-all,forward",
    "messageType": "inbound,outbound,internal",
    "replies_over": "15",
    "message_replies_over": "15",
    "no_reply_for": "15",
    "per_page": "2",
    "sort_by": "last_received_at_date_time",
    "direction": "desc",
    "page": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/logs/stat-breakdown';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'stat' => 'threads.total',
            'from' => '2020-01-01',
            'to' => '2020-01-08',
            'model' => 'My Company',
            'model_type' => 'Internal',
            'exclude_cc' => '0',
            'model_com' => '1',
            'model_type_com' => 'Contact Group',
            'exclude_cc_com' => '0',
            'exclusive' => '0',
            'label[0]' => 'INBOX',
            'thread_type' => 'inbound,outbound,internal',
            'thread_status' => 'internal,await-customer,closed,await-agent',
            'has_replies' => 'hasReplies,hasForwards,hasNoRepliesOrForwards',
            'classification' => 'calculating,first,reply,reply-all,forward',
            'messageType' => 'inbound,outbound,internal',
            'replies_over' => '15',
            'message_replies_over' => '15',
            'no_reply_for' => '15',
            'per_page' => '2',
            'sort_by' => 'last_received_at_date_time',
            'direction' => 'desc',
            'page' => '1',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://portal.timetoreply.com/api/logs/stat-breakdown?stat=threads.total&from=2020-01-01&to=2020-01-08&model=My+Company&model_type=Internal&exclude_cc=&model_com=1&model_type_com=Contact+Group&exclude_cc_com=&exclusive=&label[]=INBOX&thread_type=inbound%2Coutbound%2Cinternal&thread_status=internal%2Cawait-customer%2Cclosed%2Cawait-agent&has_replies=hasReplies%2ChasForwards%2ChasNoRepliesOrForwards&classification=calculating%2Cfirst%2Creply%2Creply-all%2Cforward&messageType=inbound%2Coutbound%2Cinternal&replies_over=15&message_replies_over=15&no_reply_for=15&per_page=2&sort_by=last_received_at_date_time&direction=desc&page=1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
tracking-events: []
 

{
    "data": {
        "current_page": 1,
        "data": [
            {
                "id": 126,
                "init_agent_reply_time": null,
                "init_agent_action_time": 684,
                "total_agent_reply_time": 78530,
                "last_received_at_date_time": "Feb 6th 2024 11:27:05",
                "thread_type": "outbound",
                "thread_status": "await-agent",
                "raw_init_agent_reply_time": null,
                "init_agent_reply_message_id": null,
                "init_reply_agent_id": null,
                "time_to_close": null,
                "raw_time_to_close": null,
                "touches": 1,
                "nudges": 0,
                "friendly_initial_reply_time": "Pending",
                "friendly_raw_initial_reply_time": "Pending",
                "friendly_total_reply_time": "21h:48m:50s",
                "microsoft_conversations": [
                    "45YuWwxk78F0MNxvbu"
                ],
                "email_usernames": [
                    "[email protected]",
                    "[email protected]",
                    "[email protected]",
                    "[email protected]",
                    "[email protected]"
                ],
                "email_usernames_from": [
                    "[email protected]",
                    "[email protected]",
                    "[email protected]"
                ],
                "email_usernames_reply_to": [],
                "email_usernames_senders": [
                    "[email protected]",
                    "[email protected]",
                    "[email protected]"
                ],
                "email_usernames_to": [
                    "[email protected]",
                    "[email protected]",
                    "[email protected]",
                    "[email protected]"
                ],
                "email_usernames_received": [
                    "[email protected]",
                    "[email protected]",
                    "[email protected]",
                    "[email protected]"
                ],
                "email_domains": [
                    "hills.com",
                    "price.com",
                    "timetoreply.com",
                    "vandervort.com",
                    "fadel.com"
                ],
                "date_times": [
                    "2024-02-06 11:27:05",
                    "2024-02-05 16:28:14",
                    "2024-02-05 15:24:43",
                    "2024-02-05 13:49:39",
                    "2024-02-05 13:38:15"
                ],
                "message_classifications": [
                    "reply",
                    "forward",
                    "first"
                ],
                "message_subjects": [
                    "RE: iterate cross-media web-readiness",
                    "FW: iterate cross-media web-readiness",
                    "iterate cross-media web-readiness"
                ],
                "messages": [
                    {
                        "internet_message_id": "[email protected]",
                        "date_time": "Feb 6th 2024 11:27:05",
                        "timestamp": 1707218825,
                        "subject": "RE: iterate cross-media web-readiness (Excluded from statistics due to applied filters)",
                        "references": [
                            "[email protected]",
                            "[email protected]",
                            "[email protected]",
                            "[email protected]"
                        ],
                        "replytime": 68331,
                        "classification": "reply",
                        "raw_replytime": 68331,
                        "friendly_reply_time": "18h:58m:51s",
                        "friendly_raw_reply_time": "18h:58m:51s",
                        "email_domains": [
                            "hills.com",
                            "price.com"
                        ],
                        "email_domains_from": [
                            "hills.com"
                        ],
                        "email_domains_to": [
                            "price.com"
                        ],
                        "email_domains_reply_to": [],
                        "email_domains_senders": [
                            "hills.com"
                        ],
                        "email_domains_received": [
                            "price.com"
                        ],
                        "email_usernames": [
                            "[email protected]",
                            "[email protected]"
                        ],
                        "email_usernames_from": [
                            "[email protected]"
                        ],
                        "email_usernames_to": [
                            "[email protected]"
                        ],
                        "email_usernames_cc": [],
                        "email_usernames_reply_to": [],
                        "email_usernames_senders": [
                            "[email protected]"
                        ],
                        "email_usernames_received": [
                            "[email protected]"
                        ],
                        "is_initial_reply": false,
                        "is_newest_message": true,
                        "message_type": "other",
                        "labels": [
                            "UNREAD",
                            "CATEGORY_PERSONAL",
                            "STARRED",
                            "IMPORTANT"
                        ],
                        "is_touch": false,
                        "is_nudge": false,
                        "touch_time": null,
                        "reply_is_relevant": false,
                        "is_closing_email": false,
                        "is_included_in_stats": false,
                        "reply_is_outlier": false,
                        "agents_read_status": [],
                        "friendly_touch_time": "N/A",
                        "is_manually_excluded_from_sla_breach": false,
                        "within_percentile_rank": null
                    },
                    {
                        "internet_message_id": "[email protected]",
                        "date_time": "Feb 5th 2024 16:28:14",
                        "timestamp": 1707150494,
                        "subject": "RE: iterate cross-media web-readiness (Excluded from statistics due to applied filters)",
                        "references": [
                            "[email protected]",
                            "[email protected]",
                            "[email protected]"
                        ],
                        "replytime": 3811,
                        "classification": "reply",
                        "raw_replytime": 3811,
                        "friendly_reply_time": "01h:03m:31s",
                        "friendly_raw_reply_time": "01h:03m:31s",
                        "email_domains": [
                            "price.com",
                            "hills.com"
                        ],
                        "email_domains_from": [
                            "price.com"
                        ],
                        "email_domains_to": [
                            "hills.com"
                        ],
                        "email_domains_reply_to": [],
                        "email_domains_senders": [
                            "price.com"
                        ],
                        "email_domains_received": [
                            "hills.com"
                        ],
                        "email_usernames": [
                            "[email protected]",
                            "[email protected]"
                        ],
                        "email_usernames_from": [
                            "[email protected]"
                        ],
                        "email_usernames_to": [
                            "[email protected]"
                        ],
                        "email_usernames_cc": [],
                        "email_usernames_reply_to": [],
                        "email_usernames_senders": [
                            "[email protected]"
                        ],
                        "email_usernames_received": [
                            "[email protected]"
                        ],
                        "is_initial_reply": false,
                        "is_newest_message": false,
                        "message_type": "other",
                        "labels": [
                            "CATEGORY_PROMOTIONS",
                            "SENT",
                            "INBOX"
                        ],
                        "is_touch": false,
                        "is_nudge": false,
                        "touch_time": null,
                        "reply_is_relevant": false,
                        "is_closing_email": false,
                        "is_included_in_stats": false,
                        "reply_is_outlier": false,
                        "agents_read_status": [],
                        "friendly_touch_time": "N/A",
                        "is_manually_excluded_from_sla_breach": false,
                        "within_percentile_rank": null
                    },
                    {
                        "internet_message_id": "[email protected]",
                        "date_time": "Feb 5th 2024 15:24:43",
                        "timestamp": 1707146683,
                        "subject": "RE: iterate cross-media web-readiness (Excluded from statistics due to applied filters)",
                        "references": [
                            "[email protected]",
                            "[email protected]"
                        ],
                        "replytime": 5704,
                        "classification": "reply",
                        "raw_replytime": 5704,
                        "friendly_reply_time": "01h:35m:04s",
                        "friendly_raw_reply_time": "01h:35m:04s",
                        "email_domains": [
                            "hills.com",
                            "price.com"
                        ],
                        "email_domains_from": [
                            "hills.com"
                        ],
                        "email_domains_to": [
                            "price.com"
                        ],
                        "email_domains_reply_to": [],
                        "email_domains_senders": [
                            "hills.com"
                        ],
                        "email_domains_received": [
                            "price.com"
                        ],
                        "email_usernames": [
                            "[email protected]",
                            "[email protected]"
                        ],
                        "email_usernames_from": [
                            "[email protected]"
                        ],
                        "email_usernames_to": [
                            "[email protected]"
                        ],
                        "email_usernames_cc": [],
                        "email_usernames_reply_to": [],
                        "email_usernames_senders": [
                            "[email protected]"
                        ],
                        "email_usernames_received": [
                            "[email protected]"
                        ],
                        "is_initial_reply": false,
                        "is_newest_message": false,
                        "message_type": "other",
                        "labels": [],
                        "is_touch": false,
                        "is_nudge": false,
                        "touch_time": null,
                        "reply_is_relevant": false,
                        "is_closing_email": false,
                        "is_included_in_stats": false,
                        "reply_is_outlier": false,
                        "agents_read_status": [],
                        "friendly_touch_time": "N/A",
                        "is_manually_excluded_from_sla_breach": false,
                        "within_percentile_rank": null
                    },
                    {
                        "internet_message_id": "[email protected]",
                        "date_time": "Feb 5th 2024 13:49:39",
                        "timestamp": 1707140979,
                        "subject": "FW: iterate cross-media web-readiness (Excluded from statistics due to applied filters)",
                        "references": [
                            "[email protected]"
                        ],
                        "replytime": 684,
                        "classification": "forward",
                        "raw_replytime": 684,
                        "friendly_reply_time": "11m:24s",
                        "friendly_raw_reply_time": "11m:24s",
                        "email_domains": [
                            "price.com",
                            "hills.com"
                        ],
                        "email_domains_from": [
                            "price.com"
                        ],
                        "email_domains_to": [
                            "hills.com"
                        ],
                        "email_domains_reply_to": [],
                        "email_domains_senders": [
                            "price.com"
                        ],
                        "email_domains_received": [
                            "hills.com"
                        ],
                        "email_usernames": [
                            "[email protected]",
                            "[email protected]"
                        ],
                        "email_usernames_from": [
                            "[email protected]"
                        ],
                        "email_usernames_to": [
                            "[email protected]"
                        ],
                        "email_usernames_cc": [],
                        "email_usernames_reply_to": [],
                        "email_usernames_senders": [
                            "[email protected]"
                        ],
                        "email_usernames_received": [
                            "[email protected]"
                        ],
                        "is_initial_reply": false,
                        "is_newest_message": false,
                        "message_type": "other",
                        "labels": [
                            "UNREAD"
                        ],
                        "is_touch": false,
                        "is_nudge": false,
                        "touch_time": null,
                        "reply_is_relevant": false,
                        "is_closing_email": false,
                        "is_included_in_stats": false,
                        "reply_is_outlier": false,
                        "agents_read_status": [],
                        "friendly_touch_time": "N/A",
                        "is_manually_excluded_from_sla_breach": false,
                        "within_percentile_rank": null
                    },
                    {
                        "internet_message_id": "[email protected]",
                        "date_time": "Feb 5th 2024 13:38:15",
                        "timestamp": 1707140295,
                        "subject": "iterate cross-media web-readiness",
                        "references": null,
                        "replytime": null,
                        "classification": "first",
                        "raw_replytime": null,
                        "friendly_reply_time": "N/A",
                        "friendly_raw_reply_time": "N/A",
                        "email_domains": [
                            "timetoreply.com",
                            "vandervort.com",
                            "hills.com",
                            "fadel.com",
                            "price.com"
                        ],
                        "email_domains_from": [
                            "timetoreply.com"
                        ],
                        "email_domains_to": [
                            "vandervort.com",
                            "hills.com",
                            "fadel.com",
                            "price.com"
                        ],
                        "email_domains_reply_to": [],
                        "email_domains_senders": [
                            "timetoreply.com"
                        ],
                        "email_domains_received": [
                            "vandervort.com",
                            "hills.com",
                            "fadel.com",
                            "price.com"
                        ],
                        "email_usernames": [
                            "[email protected]",
                            "[email protected]",
                            "[email protected]",
                            "[email protected]",
                            "[email protected]"
                        ],
                        "email_usernames_from": [
                            "[email protected]"
                        ],
                        "email_usernames_to": [
                            "[email protected]",
                            "[email protected]",
                            "[email protected]",
                            "[email protected]"
                        ],
                        "email_usernames_cc": [],
                        "email_usernames_reply_to": [],
                        "email_usernames_senders": [
                            "[email protected]"
                        ],
                        "email_usernames_received": [
                            "[email protected]",
                            "[email protected]",
                            "[email protected]",
                            "[email protected]"
                        ],
                        "is_initial_reply": false,
                        "is_newest_message": false,
                        "message_type": "outbound",
                        "labels": [],
                        "is_touch": true,
                        "is_nudge": false,
                        "touch_time": null,
                        "reply_is_relevant": true,
                        "is_closing_email": false,
                        "is_included_in_stats": true,
                        "reply_is_outlier": false,
                        "agents_read_status": [],
                        "friendly_touch_time": "N/A",
                        "is_manually_excluded_from_sla_breach": false,
                        "within_percentile_rank": null
                    }
                ],
                "labels": [
                    "UNREAD",
                    "CATEGORY_PERSONAL",
                    "STARRED",
                    "IMPORTANT",
                    "CATEGORY_PROMOTIONS",
                    "SENT",
                    "INBOX"
                ],
                "has_contact_success": false,
                "contact_success_time": null,
                "contact_reply_time": null,
                "deal": {
                    "id": 15,
                    "deal_stage": 11,
                    "deal_value": 1635,
                    "owner": 3,
                    "name": "Practical Bronze Pants"
                },
                "subject": "iterate cross-media web-readiness",
                "initial_reply_is_relevant": true,
                "initial_reply_is_included_in_stats": true,
                "initial_reply_is_outlier": false,
                "friendly_time_to_close": "N/A",
                "friendly_raw_time_to_close": "N/A",
                "is_manually_excluded_from_sla_breach": false,
                "customer_has_response": false,
                "within_percentile_rank": null
            }
        ],
        "first_page_url": "https://portal.timetoreply.com/api/logs/stat-breakdown?stat=threads.total&model=My%20Company&model_type=Internal&model_com=1&model_type_com=Contact%20Group&per_page=2&direction=desc&page=1",
        "from": 1,
        "last_page": 1,
        "last_page_url": "https://portal.timetoreply.com/api/logs/stat-breakdown?stat=threads.total&model=My%20Company&model_type=Internal&model_com=1&model_type_com=Contact%20Group&per_page=2&direction=desc&page=1",
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "https://portal.timetoreply.com/api/logs/stat-breakdown?stat=threads.total&model=My%20Company&model_type=Internal&model_com=1&model_type_com=Contact%20Group&per_page=2&direction=desc&page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "next_page_url": null,
        "path": "https://portal.timetoreply.com/api/logs/stat-breakdown",
        "per_page": 2,
        "prev_page_url": null,
        "to": 1,
        "total": 1
    },
    "type": "threads",
    "show_column": null,
    "friendly_name": "Total Conversations",
    "explainer": "All conversations."
}
 

Request   

GET api/logs/stat-breakdown

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

stat   string  optional  

The stat to get the breakdown for. Example: threads.total

from   string  optional  

The start date of your request in the format "YYYY-MM-DD". Must be less than or equal to "to". Example: 2020-01-01

to   string  optional  

The end date of your request in the format "YYYY-MM-DD". Must be greater than or equal to "from". Example: 2020-01-08

model   string  optional  

The ID, Name, email address or domain you want statistics for. Use the models endpoint to get a list. Example: My Company

model_type   string  optional  

Model Type of the model being queried. Use "Contact" for email address and domain. Example: Internal

exclude_cc   boolean  optional  

Should we exclude CC messages from the statistics. Example: false

model_com   string  optional  

Model Communicating With, same as Model, except now for who/what the Model is communicating with. Example: 1

model_type_com   string  optional  

Model Type of the model you are communicating with. Use "Contact" for email address and domain. Example: Contact Group

exclude_cc_com   boolean  optional  

Should we exclude CC messages from the statistics for the communicating with model. Example: false

exclusive   boolean  optional  

Should we only focus on statistics where exclusively Model and ModelCom were involved?. Example: false

search   string  optional  

Search a specific email subject line (warning this is very slow!).

label   string[]  optional  

Label, if your mail provider supports labels/categories, you can filter your results using them.

thread_type   string  optional  

A comma separated list (no spaces) of any combination of the following: inbound,outbound,internal. Example: inbound,outbound,internal

thread_status   string  optional  

A comma separated list (no spaces) of any combination of the following: internal,await-customer,closed,await-agent. Example: internal,await-customer,closed,await-agent

has_replies   string  optional  

A comma separated list (no spaces) of any combination of the following: hasReplies,hasForwards,hasNoRepliesOrForwards. Example: hasReplies,hasForwards,hasNoRepliesOrForwards

classification   string  optional  

A comma separated list (no spaces) of any combination of the following: calculating,first,reply,reply-all,forward,follow-up. Example: calculating,first,reply,reply-all,forward

messageType   string  optional  

A comma separated list (no spaces) of any combination of the following: inbound,outbound,internal. Example: inbound,outbound,internal

replies_over   integer  optional  

Limit results to conversations with first reply times over X minutes. Should not be used at same time as message_replies_over. Example: 15

message_replies_over   integer  optional  

Limit results to messages where the reply time was over X minutes. Should not be used at same time as replies_over. Example: 15

no_reply_for   integer  optional  

Limit results to messages that have not had a reply for at least X minutes. Example: 15

per_page   integer  optional  

For paginated results, how many results per page. Max 200. Example: 2

sort_by   string  optional  

Field Name to sort conversations (threads) by. Defaults to last_received_at_date_time. Example: last_received_at_date_time

direction   string  optional  

Direction in which to sort paginated results. Must be either asc or desc. Example: desc

page   integer  optional  

For paginated results, which page to get. Example: 1

Entities

All

requires authentication

Searches your company entities

Example request:
const url = new URL(
    "https://portal.timetoreply.com/api/entities/search"
);

const params = {
    "per_page": "2",
    "page": "1",
    "search": "Top Revenue",
    "type": "all",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/entities/search';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'per_page' => '2',
            'page' => '1',
            'search' => 'Top Revenue',
            'type' => 'all',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://portal.timetoreply.com/api/entities/search?per_page=2&page=1&search=Top+Revenue&type=all" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
tracking-events: []
 

{
    "current_page": 1,
    "data": [
        {
            "id": 1,
            "name": "Top Revenue Customers",
            "email_usernames": [
                "[email protected]",
                "[email protected]"
            ],
            "customer_domains": [
                "cormier.com",
                "hills.com"
            ],
            "model_type": "Contact Group",
            "icon": "user-friends"
        },
        {
            "id": 1,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        }
    ],
    "first_page_url": "https://portal.timetoreply.com/api/entities/search?per_page=2&search=Top%20Revenue&type=all&page=1",
    "from": 1,
    "last_page": 1,
    "last_page_url": "https://portal.timetoreply.com/api/entities/search?per_page=2&search=Top%20Revenue&type=all&page=1",
    "links": [
        {
            "url": null,
            "label": "« Previous",
            "active": false
        },
        {
            "url": "https://portal.timetoreply.com/api/entities/search?per_page=2&search=Top%20Revenue&type=all&page=1",
            "label": "1",
            "active": true
        },
        {
            "url": null,
            "label": "Next »",
            "active": false
        }
    ],
    "next_page_url": null,
    "path": "https://portal.timetoreply.com/api/entities/search",
    "per_page": 2,
    "prev_page_url": null,
    "to": 2,
    "total": 2
}
 

Mailboxes

Mailboxes - List

requires authentication

List all mailboxes

Example request:
const url = new URL(
    "https://portal.timetoreply.com/api/entities/agents"
);

const params = {
    "sort_by": "name",
    "direction": "asc",
    "per_page": "2",
    "page": "1",
    "product_type": "success",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/entities/agents';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'sort_by' => 'name',
            'direction' => 'asc',
            'per_page' => '2',
            'page' => '1',
            'product_type' => 'success',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://portal.timetoreply.com/api/entities/agents?sort_by=name&direction=asc&per_page=2&page=1&product_type=success" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
tracking-events: []
 

{
    "current_page": 1,
    "data": [
        {
            "id": 1,
            "company_id": 1,
            "company_name": "timetoreply",
            "name": "Kareem Bogisich",
            "email": "[email protected]",
            "is_bulk_linked": false,
            "main_type": "Google",
            "active": true,
            "created_at": "2024-02-02 12:27:13",
            "email_usernames": [
                "[email protected]"
            ],
            "time_zone": {
                "id": 29,
                "php_timezone": "Europe/London",
                "friendly_name": "Greenwich Mean Time =>  Dublin, Edinburgh, Lisbon, London"
            },
            "newest_message_date": "2024-02-02 17:38:54",
            "ingestion_started_date": "2023-08-26 12:23:38",
            "ingestion_completed_date": "2024-02-09 12:27:30",
            "ingestion_duration": "4008h:3m",
            "ingestion_duration_seconds": 14429032,
            "user_permissions": [
                7
            ],
            "search_string": "Kareem Bogisich [email protected]",
            "leave_days": [],
            "work_days": [],
            "business_hours": [],
            "product_type": "success",
            "is_user": true,
            "last_used_addon": "2023-12-23 12:28:44",
            "optimiser_installed": false
        },
        {
            "id": 3,
            "company_id": 1,
            "company_name": "timetoreply",
            "name": "Fred Heidenreich",
            "email": "[email protected]",
            "is_bulk_linked": false,
            "main_type": "Google",
            "active": true,
            "created_at": "2024-02-02 12:27:13",
            "email_usernames": [
                "[email protected]"
            ],
            "time_zone": {
                "id": 29,
                "php_timezone": "Europe/London",
                "friendly_name": "Greenwich Mean Time =>  Dublin, Edinburgh, Lisbon, London"
            },
            "newest_message_date": null,
            "ingestion_started_date": "2023-04-06 17:43:52",
            "ingestion_completed_date": "2023-02-18 21:36:12",
            "ingestion_duration": "In Progress",
            "ingestion_duration_seconds": null,
            "user_permissions": [],
            "search_string": "Fred Heidenreich [email protected]",
            "leave_days": [],
            "work_days": [],
            "business_hours": [],
            "product_type": "success",
            "is_user": true,
            "last_used_addon": null,
            "optimiser_installed": false
        }
    ],
    "first_page_url": "https://portal.timetoreply.com/api/entities/agents?direction=asc&per_page=2&product_type=success&page=1",
    "from": 1,
    "last_page": 2,
    "last_page_url": "https://portal.timetoreply.com/api/entities/agents?direction=asc&per_page=2&product_type=success&page=2",
    "links": [
        {
            "url": null,
            "label": "« Previous",
            "active": false
        },
        {
            "url": "https://portal.timetoreply.com/api/entities/agents?direction=asc&per_page=2&product_type=success&page=1",
            "label": "1",
            "active": true
        },
        {
            "url": "https://portal.timetoreply.com/api/entities/agents?direction=asc&per_page=2&product_type=success&page=2",
            "label": "2",
            "active": false
        },
        {
            "url": "https://portal.timetoreply.com/api/entities/agents?direction=asc&per_page=2&product_type=success&page=2",
            "label": "Next »",
            "active": false
        }
    ],
    "next_page_url": "https://portal.timetoreply.com/api/entities/agents?direction=asc&per_page=2&product_type=success&page=2",
    "path": "https://portal.timetoreply.com/api/entities/agents",
    "per_page": 2,
    "prev_page_url": null,
    "to": 2,
    "total": 3
}
 

Request   

GET api/entities/agents

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

sort_by   string  optional  

The field to sort the mailboxes by. Example: name

direction   string  optional  

Sort asc or desc. Example: asc

per_page   number  optional  

The number of mailboxes to show per page. Example: 2

page   number  optional  

The page number. Example: 1

search   string  optional  

Optional search string.

product_type   string  optional  

Optional product type filter. Example: success

Mailboxes - Invite

requires authentication

Create a mailbox invitation

Example request:
const url = new URL(
    "https://portal.timetoreply.com/api/entities/agents/invite"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Peter Rabbit",
    "type": 1,
    "email": "[email protected]",
    "message": "Hey Pete, please accept this invite."
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/entities/agents/invite';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'Peter Rabbit',
            'type' => 1,
            'email' => '[email protected]',
            'message' => 'Hey Pete, please accept this invite.',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "https://portal.timetoreply.com/api/entities/agents/invite" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Peter Rabbit\",
    \"type\": 1,
    \"email\": \"[email protected]\",
    \"message\": \"Hey Pete, please accept this invite.\"
}"

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
tracking-events: []
 

{
    "success": true,
    "authURL": "https://portal.timetoreply.com/authenticate/2?expires=1707654786&signature=904b9d9c74089203cfb885280b6636409a9b1e50bf3cda161665332f33912741",
    "id": 2
}
 

Request   

POST api/entities/agents/invite

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

name   string   

The name of the Mailbox user. Example: Peter Rabbit

type   integer   

The type of Mailbox (1 = Gmail, 2 = O365, 5 = Mimecast). Example: 1

email   string   

The email address of the Mailbox. Example: [email protected]

message   string  optional  

A personalised message to send to the mailbox during invitation. Example: Hey Pete, please accept this invite.

Mailboxes - O365 - List

requires authentication

Load potential O365 Mailboxes

Example request:
const url = new URL(
    "https://portal.timetoreply.com/api/entities/agents/microsoft/load-bulk-agents"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/entities/agents/microsoft/load-bulk-agents';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://portal.timetoreply.com/api/entities/agents/microsoft/load-bulk-agents" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Example response (200):


{
    "name": "Peter Rabbit",
    "id": "12345abcd",
    "mail": "[email protected]",
    "userPrincipalName": "[email protected]"
}
 

Request   

GET api/entities/agents/microsoft/load-bulk-agents

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Mailboxes - O365 - Search

requires authentication

Search potential O365 Mailboxes

Example request:
const url = new URL(
    "https://portal.timetoreply.com/api/entities/agents/microsoft/search-bulk-agents"
);

const params = {
    "search": "peter",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/entities/agents/microsoft/search-bulk-agents';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'search' => 'peter',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://portal.timetoreply.com/api/entities/agents/microsoft/search-bulk-agents?search=peter" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Example response (200):


{
    "name": "Peter Rabbit",
    "id": "12345abcd",
    "mail": "[email protected]",
    "userPrincipalName": "[email protected]"
}
 

Request   

GET api/entities/agents/microsoft/search-bulk-agents

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

search   string   

The search term to use. This will search for mailboxes beginning with the search string. Example: peter

Mailboxes - O365 - Bulk Add

requires authentication

Store a list of O365 Mailboxes

Example request:
const url = new URL(
    "https://portal.timetoreply.com/api/entities/agents/microsoft/select-bulk"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "users": [
        {
            "id": "12345-12345-12345",
            "email": "[email protected]",
            "name": "Peter Rabbit",
            "userPrincipalName": "[email protected]"
        }
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/entities/agents/microsoft/select-bulk';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'users' => [
                [
                    'id' => '12345-12345-12345',
                    'email' => '[email protected]',
                    'name' => 'Peter Rabbit',
                    'userPrincipalName' => '[email protected]',
                ],
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "https://portal.timetoreply.com/api/entities/agents/microsoft/select-bulk" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"users\": [
        {
            \"id\": \"12345-12345-12345\",
            \"email\": \"[email protected]\",
            \"name\": \"Peter Rabbit\",
            \"userPrincipalName\": \"[email protected]\"
        }
    ]
}"

Example response (200):


{
    "total": 4,
    "maxAgents": 100,
    "limitAgents": true
}
 

Request   

POST api/entities/agents/microsoft/select-bulk

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

users   object[]   

An array of O365 "user" objects.

id   string   

The O365 user ID. Example: 12345-12345-12345

email   string   

The O365 user Email. Example: [email protected]

name   string   

The O365 user's name. Example: Peter Rabbit

userPrincipalName   string   

The O365 User Principal Name. Example: [email protected]

Mailboxes - Gmail - List

requires authentication

Load potential Gmail mailboxes

Example request:
const url = new URL(
    "https://portal.timetoreply.com/api/entities/agents/gmail/load-bulk-agents"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/entities/agents/gmail/load-bulk-agents';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://portal.timetoreply.com/api/entities/agents/gmail/load-bulk-agents" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Example response (200):


{
    "users": [
        {
            "name": "Peter Rabbit",
            "email": "[email protected]",
            "id": "12345abcd",
            "userPrincipalName": "[email protected]"
        }
    ],
    "nextPageToken": "next_page_token_string"
}
 

Request   

GET api/entities/agents/gmail/load-bulk-agents

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Mailboxes - Gmail - Bulk Add

requires authentication

Add multiple mailboxes at once

Example request:
const url = new URL(
    "https://portal.timetoreply.com/api/entities/agents/gmail/select-bulk"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "users": [
        {
            "email": "[email protected]",
            "name": "Peter Rabbit"
        }
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/entities/agents/gmail/select-bulk';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'users' => [
                [
                    'email' => '[email protected]',
                    'name' => 'Peter Rabbit',
                ],
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "https://portal.timetoreply.com/api/entities/agents/gmail/select-bulk" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"users\": [
        {
            \"email\": \"[email protected]\",
            \"name\": \"Peter Rabbit\"
        }
    ]
}"

Example response (200):


{
    "success": [
        "[email protected]"
    ],
    "fail": []
}
 

Request   

POST api/entities/agents/gmail/select-bulk

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

users   object[]  optional  

an array of gmail "user" objects with fields email and name.

email   string   

The email address of the mailbox to add. Example: [email protected]

name   string   

The name of the mailbox to add. Example: Peter Rabbit

Mailboxes - EWS - Update