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

requires authentication

Update EWS Mailbox

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

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

let body = {
    "host": "outlook.office365.com\/EWS\/Exchange.asmx",
    "version": "Exchange2013",
    "username": "[email protected]",
    "password": "secret"
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/entities/agents/1/ews';
$response = $client->patch(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'host' => 'outlook.office365.com/EWS/Exchange.asmx',
            'version' => 'Exchange2013',
            'username' => '[email protected]',
            'password' => 'secret',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request PATCH \
    "https://portal.timetoreply.com/api/entities/agents/1/ews" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"host\": \"outlook.office365.com\\/EWS\\/Exchange.asmx\",
    \"version\": \"Exchange2013\",
    \"username\": \"[email protected]\",
    \"password\": \"secret\"
}"

Example response (200):


{
    "status": "Agent EWS credentials updated successfully."
}
 

Request   

PATCH api/entities/agents/{agent_id}/ews

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

agent_id   integer   

The ID of the agent/mailbox to update. Example: 1

Body Parameters

host   string   

The EWS Host. Example: outlook.office365.com/EWS/Exchange.asmx

version   string   

The EWS host version. Example: Exchange2013

username   string   

The EWS username. Example: [email protected]

password   string   

The EWS password. Example: secret

Mailboxes - Delete

requires authentication

Delete a mailbox

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

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

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/entities/agents/1';
$response = $client->delete(
    $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 DELETE \
    "https://portal.timetoreply.com/api/entities/agents/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Example response (200):


{
    "status": "Agent deletion complete."
}
 

Request   

DELETE api/entities/agents/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the agent. Example: 1

agent_id   integer   

The ID of the mailbox to delete. Example: 1

Mailboxes - Delete Multiple

requires authentication

Delete multiple mailboxes

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

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

let body = {
    "ids": [
        1,
        2,
        3
    ]
};

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/delete-multiple';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'ids' => [
                1,
                2,
                3,
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "https://portal.timetoreply.com/api/entities/agents/delete-multiple" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"ids\": [
        1,
        2,
        3
    ]
}"

Example response (200):


{
    "status": "Mailbox deletion complete."
}
 

Request   

POST api/entities/agents/delete-multiple

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

ids   integer[]   

The IDs of the mailboxes to delete.

Mailboxes - Re-authenticate

requires authentication

Send a re-authentication request to a mailbox.

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

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/1/re-auth';
$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/1/re-auth" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Example response (200):


{
    "status": "We've sent the Re-Authentication email to John Doe. Please ask them to check their email and SPAM box"
}
 

Request   

GET api/entities/agents/{agent_id}/re-auth

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

agent_id   integer   

The ID of the mailbox to send a re-authentication request to. Example: 1

Mailboxes - Update

requires authentication

Update a mailbox

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

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

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

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

Example response (200):


{
    "status": "Mailbox updated successfully."
}
 

Request   

PATCH api/entities/agents/{id}/update

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the agent. Example: 1

agent_id   integer   

The ID of the mailbox to update. Example: 1

Body Parameters

name   string   

The name of the mailbox. Example: Peter Rabbit

timeZone   integer   

The ID of the TimeZone for the mailbox. Example: 1

aliases   string[]  optional  

An array of email aliases for the mailbox.

Mailboxes - Search all

requires authentication

Searches all mailboxes for a given string including in Gmail, O365 if authenticated using admin credentials.

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

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/search-all-company-mailboxes';
$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/search-all-company-mailboxes" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Example response (200):


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

Request   

GET api/entities/agents/search-all-company-mailboxes

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Mailboxes - Invite As Users

requires authentication

Invite a selection of mailboxes as users

Example request:
const url = new URL(
    "https://portal.timetoreply.com/api/tools/users/invite-as-users"
);

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

let body = {
    "ids": [
        1
    ]
};

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

Example response (202):

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

[]
 

Request   

POST api/tools/users/invite-as-users

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

ids   integer[]   

The IDs of the agents/mailboxes to invite as a user.

Authentication Invites

Authentication Invites - Remind

requires authentication

Remind A Mailbox about an Authentication Invitation

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

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

fetch(url, {
    method: "PATCH",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/entities/agents/remind/1';
$response = $client->patch(
    $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 PATCH \
    "https://portal.timetoreply.com/api/entities/agents/remind/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: []
 

{
    "status": "Please check the inbox (and spam folder) of the mailbox you just added. Click on the link in the email to grant access to timetoreply so that we can start measuring your email reply times."
}
 

Request   

PATCH api/entities/agents/remind/{authentication_invite_id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

authentication_invite_id   integer   

The ID of the Authentication invite. Example: 1

Authentication Invites - Delete

requires authentication

Delete an Authentication Invitation

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

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

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/entities/agents/invite/1';
$response = $client->delete(
    $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 DELETE \
    "https://portal.timetoreply.com/api/entities/agents/invite/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Example response (200):


{
    "status": "Authentication invite deleted."
}
 

Request   

DELETE api/entities/agents/invite/{authentication_invite_id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

authentication_invite_id   integer   

The ID of the Authentication invite. Example: 1

Contacts

Contacts - List

requires authentication

Get all existing contacts.

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

const params = {
    "sort_by": "name",
    "direction": "asc",
    "per_page": "25",
    "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/entities/contacts';
$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' => '25',
            'page' => '1',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://portal.timetoreply.com/api/entities/contacts?sort_by=name&direction=asc&per_page=25&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": 2626,
                "company_id": 1,
                "name": "[email protected]",
                "type": "email",
                "crm_type": null,
                "search_string": "[email protected]",
                "is_lead": false
            },
            {
                "id": 2261,
                "company_id": 1,
                "name": "[email protected]",
                "type": "email",
                "crm_type": null,
                "search_string": "[email protected]",
                "is_lead": false
            }
        ],
        "first_page_url": "https://portal.timetoreply.com/api/entities/contacts?direction=asc&per_page=2&page=1",
        "from": 1,
        "last_page": 452,
        "last_page_url": "https://portal.timetoreply.com/api/entities/contacts?direction=asc&per_page=2&page=452",
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "https://portal.timetoreply.com/api/entities/contacts?direction=asc&per_page=2&page=1",
                "label": "1",
                "active": true
            },
            {
                "url": "https://portal.timetoreply.com/api/entities/contacts?direction=asc&per_page=2&page=2",
                "label": "2",
                "active": false
            },
            {
                "url": "https://portal.timetoreply.com/api/entities/contacts?direction=asc&per_page=2&page=3",
                "label": "3",
                "active": false
            },
            {
                "url": "https://portal.timetoreply.com/api/entities/contacts?direction=asc&per_page=2&page=4",
                "label": "4",
                "active": false
            },
            {
                "url": "https://portal.timetoreply.com/api/entities/contacts?direction=asc&per_page=2&page=5",
                "label": "5",
                "active": false
            },
            {
                "url": "https://portal.timetoreply.com/api/entities/contacts?direction=asc&per_page=2&page=6",
                "label": "6",
                "active": false
            },
            {
                "url": "https://portal.timetoreply.com/api/entities/contacts?direction=asc&per_page=2&page=7",
                "label": "7",
                "active": false
            },
            {
                "url": "https://portal.timetoreply.com/api/entities/contacts?direction=asc&per_page=2&page=8",
                "label": "8",
                "active": false
            },
            {
                "url": "https://portal.timetoreply.com/api/entities/contacts?direction=asc&per_page=2&page=9",
                "label": "9",
                "active": false
            },
            {
                "url": "https://portal.timetoreply.com/api/entities/contacts?direction=asc&per_page=2&page=10",
                "label": "10",
                "active": false
            },
            {
                "url": null,
                "label": "...",
                "active": false
            },
            {
                "url": "https://portal.timetoreply.com/api/entities/contacts?direction=asc&per_page=2&page=451",
                "label": "451",
                "active": false
            },
            {
                "url": "https://portal.timetoreply.com/api/entities/contacts?direction=asc&per_page=2&page=452",
                "label": "452",
                "active": false
            },
            {
                "url": "https://portal.timetoreply.com/api/entities/contacts?direction=asc&per_page=2&page=2",
                "label": "Next »",
                "active": false
            }
        ],
        "next_page_url": "https://portal.timetoreply.com/api/entities/contacts?direction=asc&per_page=2&page=2",
        "path": "https://portal.timetoreply.com/api/entities/contacts",
        "per_page": 2,
        "prev_page_url": null,
        "to": 2,
        "total": 904
    },
    "filters": {
        "search": null,
        "sort_by": "name",
        "sort_direction": "asc",
        "per_page": 2,
        "page": 1
    }
}
 

Request   

GET api/entities/contacts

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 customers by. Example: name

direction   string  optional  

Sort asc or desc. Example: asc

per_page   integer  optional  

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

page   integer  optional  

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

search   string  optional  

Optional search string.

Contacts - Store

requires authentication

Store a new contact

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

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

let body = {
    "name": "[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/contacts';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => '[email protected]',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "https://portal.timetoreply.com/api/entities/contacts" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"[email protected]\"
}"

Example response (200):

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

{
    "id": 2905,
    "name": "[email protected]",
    "email_usernames": [
        "[email protected]"
    ],
    "model_type": "Contact",
    "icon": "user",
    "is_lead": false
}
 

Request   

POST api/entities/contacts

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

name   string  optional  

The email address or domain of the Contact. Example: [email protected]

Contacts - Update

requires authentication

Update an existing contact

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

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

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

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

Example response (200):


{
    "id": 1,
    "name": "[email protected]",
    "email_usernames": [
        "[email protected]"
    ],
    "model_type": "Contact",
    "icon": "user",
    "is_lead": false
}
 

Request   

PUT api/entities/contacts/{id}

PATCH api/entities/contacts/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the contact. Example: 1

contact_id   string   

The ID of the contact. Example: 1

Body Parameters

name   string  optional  

The email address or domain of the Contact. Example: [email protected]

Contacts - Delete

requires authentication

Delete a contact

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

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

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/entities/contacts/1';
$response = $client->delete(
    $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 DELETE \
    "https://portal.timetoreply.com/api/entities/contacts/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Example response (200):


{
    "status": "Contact deleted."
}
 

Request   

DELETE api/entities/contacts/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the contact. Example: 1

contact_id   integer   

The ID of the contact to Delete. Example: 1

Contacts - Delete multi

requires authentication

Delete multiple contacts

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

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

let body = {
    "ids": [
        1,
        2
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/entities/contacts/delete-multiple';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'ids' => [
                1,
                2,
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "https://portal.timetoreply.com/api/entities/contacts/delete-multiple" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"ids\": [
        1,
        2
    ]
}"

Example response (200):


{
    "status": "Contacts deleted."
}
 

Request   

POST api/entities/contacts/delete-multiple

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

ids   integer[]   

The IDs of the contacts to Delete.

Contacts - Search for possible leads

requires authentication

Searches through your conversations to find possible leads.

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

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/contacts/search-possible-leads';
$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/contacts/search-possible-leads" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Example response (200):


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

Request   

GET api/entities/contacts/search-possible-leads

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Contacts - Store multiple

requires authentication

Stores multiple email addresses as contacts/leads

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

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

let body = {
    "customers": [
        {
            "name": "[email protected]",
            "is_lead": true
        }
    ]
};

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

Example response (200):

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

[
    {
        "company_id": 1,
        "name": "[email protected]",
        "type": "email",
        "is_lead": true,
        "id": 2906
    }
]
 

Request   

POST api/entities/contacts/create-multi

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

customers   object[]   

The array of customers to create.

name   string   

The email or domain of the customer. Example: [email protected]

is_lead   boolean   

Whether the customer is a lead or not. Example: true

Contact Groups

Contact Groups - List

requires authentication

List all Contact Groups

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

const params = {
    "sort_by": "name",
    "direction": "asc",
    "per_page": "15",
    "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/entities/contact-groups';
$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' => '15',
            'page' => '1',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://portal.timetoreply.com/api/entities/contact-groups?sort_by=name&direction=asc&per_page=15&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: []
 

{
    "current_page": 1,
    "data": [
        {
            "id": 1,
            "company_id": 1,
            "name": "Top Revenue Customers",
            "crm_type": null,
            "customer_emails": [
                "[email protected]",
                "[email protected]"
            ],
            "customer_domains": [
                "cormier.com",
                "hills.com"
            ],
            "user_permissions": [
                7
            ],
            "search_string": "Top Revenue Customers [email protected] [email protected] cormier.com hills.com"
        },
        {
            "id": 2,
            "company_id": 1,
            "name": "Hubspot Customer Group",
            "crm_type": "hubspot",
            "customer_emails": [
                "[email protected]",
                "[email protected]"
            ],
            "customer_domains": [
                "mcglynn.com",
                "sanford.biz"
            ],
            "user_permissions": [],
            "search_string": "Hubspot Customer Group [email protected] [email protected] mcglynn.com sanford.biz"
        }
    ],
    "first_page_url": "https://portal.timetoreply.com/api/entities/contact-groups?direction=asc&per_page=2&page=1",
    "from": 1,
    "last_page": 4,
    "last_page_url": "https://portal.timetoreply.com/api/entities/contact-groups?direction=asc&per_page=2&page=4",
    "links": [
        {
            "url": null,
            "label": "« Previous",
            "active": false
        },
        {
            "url": "https://portal.timetoreply.com/api/entities/contact-groups?direction=asc&per_page=2&page=1",
            "label": "1",
            "active": true
        },
        {
            "url": "https://portal.timetoreply.com/api/entities/contact-groups?direction=asc&per_page=2&page=2",
            "label": "2",
            "active": false
        },
        {
            "url": "https://portal.timetoreply.com/api/entities/contact-groups?direction=asc&per_page=2&page=3",
            "label": "3",
            "active": false
        },
        {
            "url": "https://portal.timetoreply.com/api/entities/contact-groups?direction=asc&per_page=2&page=4",
            "label": "4",
            "active": false
        },
        {
            "url": "https://portal.timetoreply.com/api/entities/contact-groups?direction=asc&per_page=2&page=2",
            "label": "Next »",
            "active": false
        }
    ],
    "next_page_url": "https://portal.timetoreply.com/api/entities/contact-groups?direction=asc&per_page=2&page=2",
    "path": "https://portal.timetoreply.com/api/entities/contact-groups",
    "per_page": 2,
    "prev_page_url": null,
    "to": 2,
    "total": 7
}
 

Request   

GET api/entities/contact-groups

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 contact groups to show per page. Example: 15

page   number  optional  

The page number. Example: 1

search   string  optional  

Optional search string.

Contact Groups - Store

requires authentication

Store a Contact Group

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

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

let body = {
    "name": "Most important contacts",
    "emails": [
        "[email protected]"
    ],
    "domains": [
        "example.com"
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/entities/contact-groups';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'Most important contacts',
            'emails' => [
                '[email protected]',
            ],
            'domains' => [
                'example.com',
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "https://portal.timetoreply.com/api/entities/contact-groups" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Most important contacts\",
    \"emails\": [
        \"[email protected]\"
    ],
    \"domains\": [
        \"example.com\"
    ]
}"

Example response (200):

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

{
    "id": 48,
    "name": "Most important contacts",
    "members": {
        "emails": [
            "[email protected]"
        ],
        "domains": [
            "example.com"
        ]
    }
}
 

Request   

POST api/entities/contact-groups

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

name   string   

The name of the Contact Group. Example: Most important contacts

emails   string[]  optional  

An array of contact email addresses.

domains   string[]  optional  

An array of contact domains.

upload   file  optional  

A CSV of contact domains and/or emails.

Contact Groups - Show

requires authentication

Show a single Contact Group

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

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/contact-groups/1';
$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/contact-groups/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: []
 

{
    "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/entities/contact-groups/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the contact group. Example: 1

contact_group_id   integer   

The ID of the contact group. Example: 1

Contact Groups - Update

requires authentication

Update a Contact Group

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

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

let body = {
    "name": "Most important contacts updated",
    "emails": [
        "[email protected]"
    ],
    "domains": [
        "example.com"
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/entities/contact-groups/1';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'Most important contacts updated',
            'emails' => [
                '[email protected]',
            ],
            'domains' => [
                'example.com',
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request PUT \
    "https://portal.timetoreply.com/api/entities/contact-groups/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Most important contacts updated\",
    \"emails\": [
        \"[email protected]\"
    ],
    \"domains\": [
        \"example.com\"
    ]
}"

Example response (200):


[
    {
        "id": 1,
        "name": "Most important contacts updated",
        "members": {
            "emails": [
                "[email protected]"
            ],
            "domains": [
                "example.com"
            ]
        }
    }
]
 

Request   

PUT api/entities/contact-groups/{id}

PATCH api/entities/contact-groups/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the contact group. Example: 1

contact_group_id   integer   

The ID of the Contact Group to update. Example: 1

Body Parameters

name   string   

The name of the Contact Group. Example: Most important contacts updated

emails   string[]  optional  

An array of contact email addresses.

domains   string[]  optional  

An array of contact domains.

upload   file  optional  

A CSV of contact domains and/or emails.

Contact Groups - Delete

requires authentication

Delete a Contact Group

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

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

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/entities/contact-groups/1';
$response = $client->delete(
    $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 DELETE \
    "https://portal.timetoreply.com/api/entities/contact-groups/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Example response (200):


{
    "status": "Contact group deleted."
}
 

Request   

DELETE api/entities/contact-groups/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the contact group. Example: 1

contact_group_id   integer   

The ID of the contact group. Example: 1

Contact Groups - Add Email

requires authentication

Add An Email To A Contact Group

Example request:
const url = new URL(
    "https://portal.timetoreply.com/api/entities/contact-groups/1/pushEmail"
);

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

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

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/entities/contact-groups/1/pushEmail';
$response = $client->patch(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'email' => '[email protected]',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request PATCH \
    "https://portal.timetoreply.com/api/entities/contact-groups/1/pushEmail" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"[email protected]\"
}"

Example response (200):

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

{
    "id": 1,
    "name": "Top Revenue Customers",
    "members": {
        "emails": [
            "[email protected]",
            "[email protected]",
            "[email protected]"
        ],
        "domains": [
            "cormier.com",
            "hills.com"
        ]
    }
}
 

Request   

PATCH api/entities/contact-groups/{contact_group_id}/pushEmail

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

contact_group_id   integer   

The ID of the contact group. Example: 1

Body Parameters

email   string   

The email you would like to add. Example: [email protected]

Contact Groups - Delete Email

requires authentication

Remove An Email From A Contact Group

Example request:
const url = new URL(
    "https://portal.timetoreply.com/api/entities/contact-groups/1/removeEmail"
);

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

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

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/entities/contact-groups/1/removeEmail';
$response = $client->patch(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'email' => '[email protected]',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request PATCH \
    "https://portal.timetoreply.com/api/entities/contact-groups/1/removeEmail" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"[email protected]\"
}"

Example response (200):


[
    {
        "id": 1,
        "name": "Most important contacts",
        "members": {
            "emails": [
                "[email protected]"
            ],
            "domains": [
                "example.com"
            ]
        }
    }
]
 

Request   

PATCH api/entities/contact-groups/{contact_group_id}/removeEmail

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

contact_group_id   integer   

The ID of the contact group. Example: 1

Body Parameters

email   string   

The email you would like to remove. Example: [email protected]

Contact Groups - Remove Members

requires authentication

Remove An Email From A Contact Group

Example request:
const url = new URL(
    "https://portal.timetoreply.com/api/entities/contact-groups/1/removeMembers"
);

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

let body = {
    "membersToRemove": [
        "[email protected]",
        "example.net"
    ]
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/entities/contact-groups/1/removeMembers';
$response = $client->patch(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'membersToRemove' => [
                '[email protected]',
                'example.net',
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request PATCH \
    "https://portal.timetoreply.com/api/entities/contact-groups/1/removeMembers" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"membersToRemove\": [
        \"[email protected]\",
        \"example.net\"
    ]
}"

Example response (200):


[
    {
        "id": 1,
        "name": "Most important contacts",
        "members": {
            "emails": [
                "[email protected]"
            ],
            "domains": [
                "example.com"
            ]
        }
    }
]
 

Request   

PATCH api/entities/contact-groups/{contact_group_id}/removeMembers

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

contact_group_id   integer   

The ID of the contact group. Example: 1

Body Parameters

membersToRemove   string[]   

The emails/domains you would like to remove.

Contact Groups - Add Domain

requires authentication

Add A Domain To A Contact Group

Example request:
const url = new URL(
    "https://portal.timetoreply.com/api/entities/contact-groups/1/pushDomain"
);

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

let body = {
    "domain": "example.com"
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/entities/contact-groups/1/pushDomain';
$response = $client->patch(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'domain' => 'example.com',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request PATCH \
    "https://portal.timetoreply.com/api/entities/contact-groups/1/pushDomain" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"domain\": \"example.com\"
}"

Example response (200):

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

{
    "id": 1,
    "name": "Top Revenue Customers",
    "members": {
        "emails": [
            "[email protected]",
            "[email protected]"
        ],
        "domains": [
            "cormier.com",
            "hills.com",
            "example.com"
        ]
    }
}
 

Request   

PATCH api/entities/contact-groups/{contact_group_id}/pushDomain

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

contact_group_id   integer   

The ID of the contact group. Example: 1

Body Parameters

domain   string   

The domain you would like to add. Example: example.com

Contact Groups - Delete Domain

requires authentication

Remove A Domain From A Contact Group

Example request:
const url = new URL(
    "https://portal.timetoreply.com/api/entities/contact-groups/1/removeDomain"
);

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

let body = {
    "domain": "example.com"
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/entities/contact-groups/1/removeDomain';
$response = $client->patch(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'domain' => 'example.com',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request PATCH \
    "https://portal.timetoreply.com/api/entities/contact-groups/1/removeDomain" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"domain\": \"example.com\"
}"

Example response (200):


[
    {
        "id": 1,
        "name": "Most important contacts",
        "members": {
            "emails": [
                "[email protected]"
            ],
            "domains": [
                "example.net"
            ]
        }
    }
]
 

Request   

PATCH api/entities/contact-groups/{contact_group_id}/removeDomain

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

contact_group_id   integer   

The ID of the contact group. Example: 1

Body Parameters

domain   string   

The domain you would like to remove. Example: example.com

Group Mailboxes

Group Mailboxes - List

requires authentication

Show all Group Mailboxes

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

const params = {
    "per_page": "25",
    "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/entities/group-mailboxes';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'per_page' => '25',
            'page' => '1',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://portal.timetoreply.com/api/entities/group-mailboxes?per_page=25&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: []
 

{
    "current_page": 1,
    "data": [
        {
            "id": 1,
            "name": "US Support",
            "email_usernames": [
                "[email protected]",
                "[email protected]",
                "[email protected]",
                "[email protected]"
            ],
            "model_type": "Group Mailbox",
            "icon": "users"
        },
        {
            "id": 2,
            "name": "EU Support",
            "email_usernames": [
                "[email protected]",
                "[email protected]",
                "[email protected]",
                "[email protected]"
            ],
            "model_type": "Group Mailbox",
            "icon": "users"
        }
    ],
    "first_page_url": "https://portal.timetoreply.com/api/entities/group-mailboxes?per_page=2&page=1",
    "from": 1,
    "last_page": 1,
    "last_page_url": "https://portal.timetoreply.com/api/entities/group-mailboxes?per_page=2&page=1",
    "links": [
        {
            "url": null,
            "label": "« Previous",
            "active": false
        },
        {
            "url": "https://portal.timetoreply.com/api/entities/group-mailboxes?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/entities/group-mailboxes",
    "per_page": 2,
    "prev_page_url": null,
    "to": 2,
    "total": 2
}
 

Request   

GET api/entities/group-mailboxes

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

per_page   integer  optional  

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

page   integer  optional  

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

Group Mailboxes - Store

requires authentication

Store a Group Mailbox

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

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

let body = {
    "name": "Sales Mailbox",
    "groupMailboxAddress": "[email protected]",
    "aliases": [
        "[email protected]"
    ],
    "first_reply_time_goal": 60,
    "overall_reply_time_goal": 120,
    "time_to_close_goal": 180
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/entities/group-mailboxes';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'Sales Mailbox',
            'groupMailboxAddress' => '[email protected]',
            'aliases' => [
                '[email protected]',
            ],
            'first_reply_time_goal' => 60,
            'overall_reply_time_goal' => 120,
            'time_to_close_goal' => 180,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "https://portal.timetoreply.com/api/entities/group-mailboxes" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Sales Mailbox\",
    \"groupMailboxAddress\": \"[email protected]\",
    \"aliases\": [
        \"[email protected]\"
    ],
    \"first_reply_time_goal\": 60,
    \"overall_reply_time_goal\": 120,
    \"time_to_close_goal\": 180
}"

Example response (200):

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

{
    "id": 45,
    "company_id": 1,
    "name": "Sales Mailbox",
    "first_reply_time_goal": 3600,
    "overall_reply_time_goal": 7200,
    "time_to_close_goal": 10800,
    "created_at": "2024-02-09 12:33:06",
    "updated_at": "2024-02-09 12:33:06",
    "product_type": "success",
    "members": {
        "current_page": 1,
        "data": [],
        "first_page_url": "https://portal.timetoreply.com/api/entities/group-mailboxes?per_page=2&page=1",
        "from": null,
        "last_page": 1,
        "last_page_url": "https://portal.timetoreply.com/api/entities/group-mailboxes?per_page=2&page=1",
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "https://portal.timetoreply.com/api/entities/group-mailboxes?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/entities/group-mailboxes",
        "per_page": 2,
        "prev_page_url": null,
        "to": null,
        "total": 0
    },
    "model_type": "Group Mailbox",
    "group_mailbox_address": "[email protected]",
    "email_usernames": [
        "[email protected]",
        "[email protected]"
    ],
    "pending_invites": []
}
 

Request   

POST api/entities/group-mailboxes

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

name   string   

The name of the Group Mailbox. Example: Sales Mailbox

groupMailboxAddress   string   

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

aliases   string[]  optional  

An email alias for the Group Mailbox.

first_reply_time_goal   integer  optional  

The first reply time goal in minutes. Example: 60

overall_reply_time_goal   integer  optional  

The overall reply time goal in minutes. Example: 120

time_to_close_goal   integer  optional  

The time to close goal in minutes. Example: 180

Group Mailboxes - Show

requires authentication

Show a single Group Mailbox

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

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/group-mailboxes/1';
$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/group-mailboxes/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: []
 

{
    "id": 1,
    "name": "US Support",
    "email_usernames": [
        "[email protected]",
        "[email protected]",
        "[email protected]",
        "[email protected]"
    ],
    "model_type": "Group Mailbox",
    "icon": "users"
}
 

Request   

GET api/entities/group-mailboxes/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the group mailbox. Example: 1

group_mailbox_id   integer   

The ID of the Group Mailbox. Example: 1

Group Mailboxes - Update

requires authentication

Update a Group Mailbox

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

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

let body = {
    "name": "Sales Mailbox",
    "groupMailboxAddress": "[email protected]",
    "aliases": [
        "[email protected]"
    ],
    "first_reply_time_goal": 60,
    "overall_reply_time_goal": 120,
    "time_to_close_goal": 180
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/entities/group-mailboxes/1';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'Sales Mailbox',
            'groupMailboxAddress' => '[email protected]',
            'aliases' => [
                '[email protected]',
            ],
            'first_reply_time_goal' => 60,
            'overall_reply_time_goal' => 120,
            'time_to_close_goal' => 180,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request PUT \
    "https://portal.timetoreply.com/api/entities/group-mailboxes/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Sales Mailbox\",
    \"groupMailboxAddress\": \"[email protected]\",
    \"aliases\": [
        \"[email protected]\"
    ],
    \"first_reply_time_goal\": 60,
    \"overall_reply_time_goal\": 120,
    \"time_to_close_goal\": 180
}"

Example response (200):


{
    "id": 1,
    "company_id": 1,
    "name": "Sales Mailbox",
    "first_reply_time_goal": 1800,
    "overall_reply_time_goal": 3600,
    "time_to_close_goal": 7200,
    "created_at": "2024-01-01 00:00:00",
    "updated_at": "2024-01-01 00:00:00",
    "product_type": "success",
    "members": {
        "current_page": 1,
        "data": [
            {
                "email": "[email protected]",
                "type": 1,
                "existing": true
            }
        ],
        "first_page_url": "https://portal.timetoreply.com/api/entities/group-mailboxes/1?page=1",
        "from": 1,
        "last_page": 1,
        "last_page_url": "https://portal.timetoreply.com/api/entities/group-mailboxes/1?page=1",
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "https://portal.timetoreply.com/api/entities/group-mailboxes/1?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "next_page_url": null,
        "path": "https://portal.timetoreply.com/api/entities/group-mailboxes/1",
        "per_page": 25,
        "prev_page_url": null,
        "to": 1,
        "total": 1
    },
    "model_type": "Group Mailbox",
    "group_mailbox_address": "[email protected]",
    "email_usernames": [
        "[email protected]"
    ],
    "pending_invites": []
}
 

Request   

PUT api/entities/group-mailboxes/{id}

PATCH api/entities/group-mailboxes/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the group mailbox. Example: 1

group_mailbox_id   integer   

The ID of the Group Mailbox to update. Example: 1

Body Parameters

name   string   

The name of the Group Mailbox. Example: Sales Mailbox

groupMailboxAddress   string   

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

aliases   string[]  optional  

An array of email alias' for the Group Mailbox.

first_reply_time_goal   integer  optional  

The first reply time goal in minutes. Example: 60

overall_reply_time_goal   integer  optional  

The overall reply time goal in minutes. Example: 120

time_to_close_goal   integer  optional  

The time to close goal in minutes. Example: 180

Group Mailboxes - Delete

requires authentication

Delete a Group Mailbox

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

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

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/entities/group-mailboxes/1';
$response = $client->delete(
    $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 DELETE \
    "https://portal.timetoreply.com/api/entities/group-mailboxes/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Example response (200):


{
    "status": "Group Mailbox deleted."
}
 

Request   

DELETE api/entities/group-mailboxes/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the group mailbox. Example: 1

group_mailbox_id   integer   

The ID of the Group Mailbox. Example: 1

Group Mailbox Members - List

requires authentication

Show members of a Group Mailbox

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

const params = {
    "sort_by": "name",
    "direction": "asc",
    "per_page": "2",
    "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/entities/group-mailboxes/1/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',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://portal.timetoreply.com/api/entities/group-mailboxes/1/agents?sort_by=name&direction=asc&per_page=2&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: []
 

{
    "current_page": 1,
    "data": [
        {
            "email": "[email protected]",
            "type": 1,
            "existing": true
        },
        {
            "email": "[email protected]",
            "type": 1,
            "existing": true
        }
    ],
    "first_page_url": "https://portal.timetoreply.com/api/entities/group-mailboxes/1/agents?direction=asc&per_page=2&page=1",
    "from": 1,
    "last_page": 2,
    "last_page_url": "https://portal.timetoreply.com/api/entities/group-mailboxes/1/agents?direction=asc&per_page=2&page=2",
    "links": [
        {
            "url": null,
            "label": "« Previous",
            "active": false
        },
        {
            "url": "https://portal.timetoreply.com/api/entities/group-mailboxes/1/agents?direction=asc&per_page=2&page=1",
            "label": "1",
            "active": true
        },
        {
            "url": "https://portal.timetoreply.com/api/entities/group-mailboxes/1/agents?direction=asc&per_page=2&page=2",
            "label": "2",
            "active": false
        },
        {
            "url": "https://portal.timetoreply.com/api/entities/group-mailboxes/1/agents?direction=asc&per_page=2&page=2",
            "label": "Next »",
            "active": false
        }
    ],
    "next_page_url": "https://portal.timetoreply.com/api/entities/group-mailboxes/1/agents?direction=asc&per_page=2&page=2",
    "path": "https://portal.timetoreply.com/api/entities/group-mailboxes/1/agents",
    "per_page": 2,
    "prev_page_url": null,
    "to": 2,
    "total": 3
}
 

Request   

GET api/entities/group-mailboxes/{group_mailbox_id}/agents

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

group_mailbox_id   integer   

The ID of the Group Mailbox to get Members of. Example: 1

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

Group Mailbox Members - Store

requires authentication

Add a member to a Group Mailbox

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

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

let body = {
    "ids": [
        1
    ]
};

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

Example response (200):

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

{
    "current_page": 1,
    "data": [
        {
            "email": "[email protected]",
            "type": 1,
            "existing": true
        },
        {
            "email": "[email protected]",
            "type": 1,
            "existing": true
        },
        {
            "email": "[email protected]",
            "type": 1,
            "existing": true
        }
    ],
    "first_page_url": "https://portal.timetoreply.com/api/entities/group-mailboxes/1/agents?per_page=2&page=1",
    "from": 1,
    "last_page": 1,
    "last_page_url": "https://portal.timetoreply.com/api/entities/group-mailboxes/1/agents?per_page=2&page=1",
    "links": [
        {
            "url": null,
            "label": "« Previous",
            "active": false
        },
        {
            "url": "https://portal.timetoreply.com/api/entities/group-mailboxes/1/agents?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/entities/group-mailboxes/1/agents",
    "per_page": 25,
    "prev_page_url": null,
    "to": 3,
    "total": 3,
    "failed": []
}
 

Request   

POST api/entities/group-mailboxes/{group_mailbox_id}/agents

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

group_mailbox_id   integer   

The ID of the Group Mailbox. Example: 1

Body Parameters

ids   integer[]   

An array of Mailbox IDs to add as a Group Mailbox Member.

Group Mailbox Members - Delete

requires authentication

Remove a member from a Group Mailbox

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

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

let body = {
    "ids": [
        1
    ]
};

fetch(url, {
    method: "DELETE",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/entities/group-mailboxes/1/agents';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'ids' => [
                1,
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request DELETE \
    "https://portal.timetoreply.com/api/entities/group-mailboxes/1/agents" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"ids\": [
        1
    ]
}"

Example response (200):

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

{
    "current_page": 1,
    "data": [
        {
            "email": "[email protected]",
            "type": 1,
            "existing": true
        },
        {
            "email": "[email protected]",
            "type": 1,
            "existing": true
        }
    ],
    "first_page_url": "https://portal.timetoreply.com/api/entities/group-mailboxes/1/agents?per_page=2&page=1",
    "from": 1,
    "last_page": 1,
    "last_page_url": "https://portal.timetoreply.com/api/entities/group-mailboxes/1/agents?per_page=2&page=1",
    "links": [
        {
            "url": null,
            "label": "« Previous",
            "active": false
        },
        {
            "url": "https://portal.timetoreply.com/api/entities/group-mailboxes/1/agents?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/entities/group-mailboxes/1/agents",
    "per_page": 25,
    "prev_page_url": null,
    "to": 2,
    "total": 2,
    "failed": []
}
 

Request   

DELETE api/entities/group-mailboxes/{group_mailbox_id}/agents

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

group_mailbox_id   integer   

The ID of the Group Mailbox. Example: 1

Body Parameters

ids   integer[]   

An array of Mailbox IDs to remove as a Group Mailbox Member.

Teams

Teams - List

requires authentication

Show all teams

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

const params = {
    "per_page": "25",
    "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/entities/teams';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'per_page' => '25',
            'page' => '1',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://portal.timetoreply.com/api/entities/teams?per_page=25&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: []
 

{
    "current_page": 1,
    "data": [
        {
            "id": 1,
            "name": "US Support Team",
            "email_usernames": [
                "[email protected]",
                "[email protected]",
                "[email protected]"
            ],
            "model_type": "Team",
            "icon": "handshake"
        },
        {
            "id": 2,
            "name": "EU Support Team",
            "email_usernames": [
                "[email protected]",
                "[email protected]",
                "[email protected]"
            ],
            "model_type": "Team",
            "icon": "handshake"
        }
    ],
    "first_page_url": "https://portal.timetoreply.com/api/entities/teams?per_page=2&page=1",
    "from": 1,
    "last_page": 1,
    "last_page_url": "https://portal.timetoreply.com/api/entities/teams?per_page=2&page=1",
    "links": [
        {
            "url": null,
            "label": "« Previous",
            "active": false
        },
        {
            "url": "https://portal.timetoreply.com/api/entities/teams?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/entities/teams",
    "per_page": 2,
    "prev_page_url": null,
    "to": 2,
    "total": 2
}
 

Request   

GET api/entities/teams

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

per_page   integer  optional  

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

page   integer  optional  

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

Teams - Store

requires authentication

Store a new Team

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

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

let body = {
    "name": "ACME Support Team One",
    "first_reply_time_goal": 30,
    "overall_reply_time_goal": 60,
    "time_to_close_goal": 120
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/entities/teams';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'ACME Support Team One',
            'first_reply_time_goal' => 30,
            'overall_reply_time_goal' => 60,
            'time_to_close_goal' => 120,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "https://portal.timetoreply.com/api/entities/teams" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"ACME Support Team One\",
    \"first_reply_time_goal\": 30,
    \"overall_reply_time_goal\": 60,
    \"time_to_close_goal\": 120
}"

Example response (200):

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

{
    "id": 45,
    "company_id": 1,
    "name": "ACME Support Team One",
    "first_reply_time_goal": 1800,
    "overall_reply_time_goal": 3600,
    "time_to_close_goal": 7200,
    "created_at": "2024-02-09 12:33:06",
    "updated_at": "2024-02-09 12:33:06",
    "product_type": "success",
    "members": {
        "current_page": 1,
        "data": [],
        "first_page_url": "https://portal.timetoreply.com/api/entities/teams?per_page=2&page=1",
        "from": null,
        "last_page": 1,
        "last_page_url": "https://portal.timetoreply.com/api/entities/teams?per_page=2&page=1",
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "https://portal.timetoreply.com/api/entities/teams?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/entities/teams",
        "per_page": 25,
        "prev_page_url": null,
        "to": null,
        "total": 0,
        "failed": []
    },
    "model_type": "Team",
    "pending_invites": []
}
 

Request   

POST api/entities/teams

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

name   string   

The name of the Team. Example: ACME Support Team One

first_reply_time_goal   integer  optional  

The first reply time goal in minutes. Example: 30

overall_reply_time_goal   integer  optional  

The overall reply time goal in minutes. Example: 60

time_to_close_goal   integer  optional  

The time to close goal in minutes. Example: 120

Teams - Show

requires authentication

Show a single Team

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

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/teams/1';
$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/teams/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: []
 

{
    "id": 1,
    "name": "US Support Team",
    "email_usernames": [
        "[email protected]",
        "[email protected]",
        "[email protected]"
    ],
    "model_type": "Team",
    "icon": "handshake"
}
 

Request   

GET api/entities/teams/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the team. Example: 1

team_id   integer   

The ID of the Team. Example: 1

Teams - Update

requires authentication

Update a Team

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

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

let body = {
    "name": "ACME Support Team Two",
    "first_reply_time_goal": 30,
    "overall_reply_time_goal": 60,
    "time_to_close_goal": 120
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/entities/teams/1';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'ACME Support Team Two',
            'first_reply_time_goal' => 30,
            'overall_reply_time_goal' => 60,
            'time_to_close_goal' => 120,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request PUT \
    "https://portal.timetoreply.com/api/entities/teams/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"ACME Support Team Two\",
    \"first_reply_time_goal\": 30,
    \"overall_reply_time_goal\": 60,
    \"time_to_close_goal\": 120
}"

Example response (200):


{
    "id": 1,
    "company_id": 1,
    "name": "ACME Support Team Two",
    "first_reply_time_goal": 1800,
    "overall_reply_time_goal": 3600,
    "time_to_close_goal": 7200,
    "created_at": "2024-01-01 00:00:00",
    "updated_at": "2024-01-01 00:00:00",
    "product_type": "success",
    "members": {
        "current_page": 1,
        "data": [
            {
                "email": "[email protected]",
                "type": 1,
                "existing": true
            }
        ],
        "first_page_url": "https://portal.timetoreply.com/api/entities/teams/1?page=1",
        "from": 1,
        "last_page": 1,
        "last_page_url": "https://portal.timetoreply.com/api/entities/teams/1?page=1",
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "https://portal.timetoreply.com/api/entities/teams/1?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "next_page_url": null,
        "path": "https://portal.timetoreply.com/api/entities/teams/1",
        "per_page": 25,
        "prev_page_url": null,
        "to": 1,
        "total": 1
    },
    "model_type": "Team",
    "pending_invites": []
}
 

Request   

PUT api/entities/teams/{id}

PATCH api/entities/teams/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the team. Example: 1

team_id   integer   

The ID of the Team. Example: 1

Body Parameters

name   string   

The name of the Team. Example: ACME Support Team Two

first_reply_time_goal   integer  optional  

The first reply time goal in minutes. Example: 30

overall_reply_time_goal   integer  optional  

The overall reply time goal in minutes. Example: 60

time_to_close_goal   integer  optional  

The time to close goal in minutes. Example: 120

Teams - Delete

requires authentication

Delete a Team

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

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

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/entities/teams/1';
$response = $client->delete(
    $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 DELETE \
    "https://portal.timetoreply.com/api/entities/teams/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Example response (200):


{
    "status": "Team deleted."
}
 

Request   

DELETE api/entities/teams/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the team. Example: 1

team_id   integer   

The ID of the Team. Example: 1

Team Members - List

requires authentication

Show members of a Team

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

const params = {
    "sort_by": "name",
    "direction": "asc",
    "per_page": "2",
    "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/entities/teams/1/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',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://portal.timetoreply.com/api/entities/teams/1/agents?sort_by=name&direction=asc&per_page=2&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: []
 

{
    "current_page": 1,
    "data": [
        {
            "email": "[email protected]",
            "type": 1,
            "existing": true
        },
        {
            "email": "[email protected]",
            "type": 1,
            "existing": true
        }
    ],
    "first_page_url": "https://portal.timetoreply.com/api/entities/teams/1/agents?direction=asc&per_page=2&page=1",
    "from": 1,
    "last_page": 2,
    "last_page_url": "https://portal.timetoreply.com/api/entities/teams/1/agents?direction=asc&per_page=2&page=2",
    "links": [
        {
            "url": null,
            "label": "« Previous",
            "active": false
        },
        {
            "url": "https://portal.timetoreply.com/api/entities/teams/1/agents?direction=asc&per_page=2&page=1",
            "label": "1",
            "active": true
        },
        {
            "url": "https://portal.timetoreply.com/api/entities/teams/1/agents?direction=asc&per_page=2&page=2",
            "label": "2",
            "active": false
        },
        {
            "url": "https://portal.timetoreply.com/api/entities/teams/1/agents?direction=asc&per_page=2&page=2",
            "label": "Next »",
            "active": false
        }
    ],
    "next_page_url": "https://portal.timetoreply.com/api/entities/teams/1/agents?direction=asc&per_page=2&page=2",
    "path": "https://portal.timetoreply.com/api/entities/teams/1/agents",
    "per_page": 2,
    "prev_page_url": null,
    "to": 2,
    "total": 3,
    "failed": []
}
 

Request   

GET api/entities/teams/{team_id}/agents

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

team_id   integer   

The ID of the Team to get Members of. Example: 1

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

Team Members - Store

requires authentication

Add a member to a Team

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

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

let body = {
    "ids": [
        1
    ]
};

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

Example response (200):

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

{
    "current_page": 1,
    "data": [
        {
            "email": "[email protected]",
            "type": 1,
            "existing": true
        },
        {
            "email": "[email protected]",
            "type": 1,
            "existing": true
        },
        {
            "email": "[email protected]",
            "type": 1,
            "existing": true
        }
    ],
    "first_page_url": "https://portal.timetoreply.com/api/entities/teams/1/agents?per_page=2&page=1",
    "from": 1,
    "last_page": 1,
    "last_page_url": "https://portal.timetoreply.com/api/entities/teams/1/agents?per_page=2&page=1",
    "links": [
        {
            "url": null,
            "label": "« Previous",
            "active": false
        },
        {
            "url": "https://portal.timetoreply.com/api/entities/teams/1/agents?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/entities/teams/1/agents",
    "per_page": 25,
    "prev_page_url": null,
    "to": 3,
    "total": 3,
    "failed": []
}
 

Request   

POST api/entities/teams/{team_id}/agents

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

team_id   integer   

The ID of the Team. Example: 1

Body Parameters

ids   integer[]   

An array of Mailbox IDs to add as a Team Member.

Team Members - Delete

requires authentication

Remove a member from a Team

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

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

let body = {
    "ids": [
        1
    ]
};

fetch(url, {
    method: "DELETE",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/entities/teams/1/agents';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'ids' => [
                1,
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request DELETE \
    "https://portal.timetoreply.com/api/entities/teams/1/agents" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"ids\": [
        1
    ]
}"

Example response (200):

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

{
    "current_page": 1,
    "data": [
        {
            "email": "[email protected]",
            "type": 1,
            "existing": true
        },
        {
            "email": "[email protected]",
            "type": 1,
            "existing": true
        }
    ],
    "first_page_url": "https://portal.timetoreply.com/api/entities/teams/1/agents?per_page=2&page=1",
    "from": 1,
    "last_page": 1,
    "last_page_url": "https://portal.timetoreply.com/api/entities/teams/1/agents?per_page=2&page=1",
    "links": [
        {
            "url": null,
            "label": "« Previous",
            "active": false
        },
        {
            "url": "https://portal.timetoreply.com/api/entities/teams/1/agents?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/entities/teams/1/agents",
    "per_page": 25,
    "prev_page_url": null,
    "to": 2,
    "total": 2,
    "failed": []
}
 

Request   

DELETE api/entities/teams/{team_id}/agents

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

team_id   integer   

The ID of the Team. Example: 1

Body Parameters

ids   integer[]   

An array of Mailbox IDs to remove as a Team Member.

Lead Sources

Lead Sources - Store

requires authentication

Add a new Lead Source

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

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

let body = {
    "name": "Sales Campaign",
    "type": "webform",
    "filters": [
        {
            "field": "From",
            "operator": "does not contain",
            "type": "and",
            "value": "no-reply"
        }
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/sales/lead-sources';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'Sales Campaign',
            'type' => 'webform',
            'filters' => [
                [
                    'field' => 'From',
                    'operator' => 'does not contain',
                    'type' => 'and',
                    'value' => 'no-reply',
                ],
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "https://portal.timetoreply.com/api/sales/lead-sources" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Sales Campaign\",
    \"type\": \"webform\",
    \"filters\": [
        {
            \"field\": \"From\",
            \"operator\": \"does not contain\",
            \"type\": \"and\",
            \"value\": \"no-reply\"
        }
    ]
}"

Example response (200):

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

{
    "name": "Sales Campaign",
    "type": "webform",
    "filters": [
        {
            "field": "From",
            "operator": "does not contain",
            "type": "and",
            "value": "no-reply"
        }
    ],
    "company_id": 1,
    "updated_at": "2024-02-09 12:33:27",
    "created_at": "2024-02-09 12:33:27",
    "id": 3
}
 

Request   

POST api/sales/lead-sources

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

name   string   

The name of the Lead Source. Example: Sales Campaign

type   string   

The type of the Lead Source. Can be: webform, email_campaign_marketing, api. Example: webform

filters   object[]  optional  

An array of Filters objects.

field   string   

The field to filter on. Can be From, To, Cc, Subject or Label. Example: From

operator   string   

The operator for the filter. Can be 'does not begin with', does not end with, does not equal, does not contain, begins with, ends with, equals or contains. Example: does not contain

type   string   

The boolean logic type of the lead source. Can be 'and' or 'or'. Example: and

value   string   

The value of the filter. Example: no-reply

Lead Sources - Update

requires authentication

Edit a Lead Source

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

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

let body = {
    "name": "Lead Gen Follow Ups",
    "type": "webform",
    "filters": [
        {
            "field": "From",
            "operator": "does not contain",
            "type": "and",
            "value": "no-reply"
        }
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/sales/lead-sources/1';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'Lead Gen Follow Ups',
            'type' => 'webform',
            'filters' => [
                [
                    'field' => 'From',
                    'operator' => 'does not contain',
                    'type' => 'and',
                    'value' => 'no-reply',
                ],
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request PUT \
    "https://portal.timetoreply.com/api/sales/lead-sources/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Lead Gen Follow Ups\",
    \"type\": \"webform\",
    \"filters\": [
        {
            \"field\": \"From\",
            \"operator\": \"does not contain\",
            \"type\": \"and\",
            \"value\": \"no-reply\"
        }
    ]
}"

Example response (200):


success
 

Request   

PUT api/sales/lead-sources/{id}

PATCH api/sales/lead-sources/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the lead source. Example: 1

lead_source_id   integer   

The ID of the Lead Source to update. Example: 1

Body Parameters

name   string   

The name of the Lead Source. Example: Lead Gen Follow Ups

type   string   

The type of the Lead Source. Can be: webform, email_campaign_marketing, api. Example: webform

filters   object[]  optional  

An array of Filters objects.

field   string   

The field to filter on. Can be From, To, Cc, Subject or Label. Example: From

operator   string   

The operator for the filter. Can be 'does not begin with', does not end with, does not equal, does not contain, begins with, ends with, equals or contains. Example: does not contain

type   string   

The boolean logic type of the lead source. Can be 'and' or 'or'. Example: and

value   string   

The value of the filter. Example: no-reply

Lead Sources - Delete

requires authentication

Delete a lead source

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

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

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/sales/lead-sources/1';
$response = $client->delete(
    $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 DELETE \
    "https://portal.timetoreply.com/api/sales/lead-sources/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Example response (200):


{
    "status": "Lead Source deleted successfully"
}
 

Request   

DELETE api/sales/lead-sources/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the lead source. Example: 1

lead_source_id   integer   

The ID of the lead source you would like to delete. Example: 1

Deals

Deals - List

requires authentication

List all Deals

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

const params = {
    "sort_by": "name",
    "direction": "asc",
    "per_page": "15",
    "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/sales/deals';
$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' => '15',
            'page' => '1',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://portal.timetoreply.com/api/sales/deals?sort_by=name&direction=asc&per_page=15&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": 1,
                "name": "Mediocre Leather Hat",
                "company_id": 1,
                "agent_id": 1,
                "deal_value": 1005,
                "deal_stage": 11,
                "closed_at": "",
                "time_to_close": null,
                "raw_time_to_close": null,
                "hubspot_id": null,
                "thread_ids": [],
                "created_at": "Feb 9th 2024 12:27:16",
                "updated_at": "Feb 9th 2024 12:27:16",
                "search_string": "Mediocre Leather Hat ",
                "agent": {
                    "id": 1,
                    "name": "Kareem Bogisich"
                },
                "emails": []
            },
            {
                "id": 2,
                "name": "Lightweight Wooden Bench",
                "company_id": 1,
                "agent_id": 1,
                "deal_value": 4065,
                "deal_stage": 1,
                "closed_at": "",
                "time_to_close": null,
                "raw_time_to_close": null,
                "hubspot_id": null,
                "thread_ids": [
                    70,
                    90,
                    102
                ],
                "created_at": "Feb 9th 2024 12:27:30",
                "updated_at": "Feb 9th 2024 12:27:30",
                "search_string": "Lightweight Wooden Bench [email protected] [email protected] [email protected] [email protected] [email protected]",
                "agent": {
                    "id": 1,
                    "name": "Kareem Bogisich"
                },
                "emails": [
                    "[email protected]",
                    "[email protected]",
                    "[email protected]",
                    "[email protected]",
                    "[email protected]"
                ]
            }
        ],
        "first_page_url": "https://portal.timetoreply.com/api/sales/deals?direction=asc&per_page=2&page=1",
        "from": 1,
        "last_page": 25,
        "last_page_url": "https://portal.timetoreply.com/api/sales/deals?direction=asc&per_page=2&page=25",
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "https://portal.timetoreply.com/api/sales/deals?direction=asc&per_page=2&page=1",
                "label": "1",
                "active": true
            },
            {
                "url": "https://portal.timetoreply.com/api/sales/deals?direction=asc&per_page=2&page=2",
                "label": "2",
                "active": false
            },
            {
                "url": "https://portal.timetoreply.com/api/sales/deals?direction=asc&per_page=2&page=3",
                "label": "3",
                "active": false
            },
            {
                "url": "https://portal.timetoreply.com/api/sales/deals?direction=asc&per_page=2&page=4",
                "label": "4",
                "active": false
            },
            {
                "url": "https://portal.timetoreply.com/api/sales/deals?direction=asc&per_page=2&page=5",
                "label": "5",
                "active": false
            },
            {
                "url": "https://portal.timetoreply.com/api/sales/deals?direction=asc&per_page=2&page=6",
                "label": "6",
                "active": false
            },
            {
                "url": "https://portal.timetoreply.com/api/sales/deals?direction=asc&per_page=2&page=7",
                "label": "7",
                "active": false
            },
            {
                "url": "https://portal.timetoreply.com/api/sales/deals?direction=asc&per_page=2&page=8",
                "label": "8",
                "active": false
            },
            {
                "url": "https://portal.timetoreply.com/api/sales/deals?direction=asc&per_page=2&page=9",
                "label": "9",
                "active": false
            },
            {
                "url": "https://portal.timetoreply.com/api/sales/deals?direction=asc&per_page=2&page=10",
                "label": "10",
                "active": false
            },
            {
                "url": null,
                "label": "...",
                "active": false
            },
            {
                "url": "https://portal.timetoreply.com/api/sales/deals?direction=asc&per_page=2&page=24",
                "label": "24",
                "active": false
            },
            {
                "url": "https://portal.timetoreply.com/api/sales/deals?direction=asc&per_page=2&page=25",
                "label": "25",
                "active": false
            },
            {
                "url": "https://portal.timetoreply.com/api/sales/deals?direction=asc&per_page=2&page=2",
                "label": "Next »",
                "active": false
            }
        ],
        "next_page_url": "https://portal.timetoreply.com/api/sales/deals?direction=asc&per_page=2&page=2",
        "path": "https://portal.timetoreply.com/api/sales/deals",
        "per_page": 2,
        "prev_page_url": null,
        "to": 2,
        "total": 49
    },
    "dealStages": {
        "1": {
            "company_id": null,
            "deal_stage_override": 1,
            "probability": 0.1,
            "closing": false,
            "display_name": "Lead",
            "percentage_locked": false,
            "hubspot_id": null
        },
        "2": {
            "company_id": null,
            "deal_stage_override": 2,
            "probability": 0.2,
            "closing": false,
            "display_name": "Appointment scheduled",
            "percentage_locked": false,
            "hubspot_id": null
        },
        "3": {
            "company_id": null,
            "deal_stage_override": 3,
            "probability": 0.3,
            "closing": false,
            "display_name": "Qualified to buy",
            "percentage_locked": false,
            "hubspot_id": null
        },
        "4": {
            "company_id": null,
            "deal_stage_override": 4,
            "probability": 0.94,
            "closing": false,
            "display_name": "architecto",
            "percentage_locked": false,
            "hubspot_id": null
        },
        "5": {
            "company_id": null,
            "deal_stage_override": 5,
            "probability": 0.5,
            "closing": false,
            "display_name": "Decision-maker bought in",
            "percentage_locked": false,
            "hubspot_id": null
        },
        "6": {
            "company_id": null,
            "deal_stage_override": 6,
            "probability": 0.6,
            "closing": false,
            "display_name": "Contract sent",
            "percentage_locked": false,
            "hubspot_id": null
        },
        "11": {
            "company_id": null,
            "deal_stage_override": 11,
            "probability": 1,
            "closing": true,
            "display_name": "Closed won",
            "percentage_locked": true,
            "hubspot_id": null
        },
        "12": {
            "company_id": null,
            "deal_stage_override": 12,
            "probability": 0,
            "closing": true,
            "display_name": "Closed lost",
            "percentage_locked": true,
            "hubspot_id": null
        }
    },
    "filters": {
        "date_range": {
            "from": "2024-01-10 00:00:00",
            "to": "2024-02-09 23:59:59"
        },
        "agent_id": null,
        "deal_stage": null,
        "deal_value_from": null,
        "deal_value_to": null,
        "search": null,
        "pagination": {
            "sort_by": null,
            "direction": "asc",
            "per_page": 2,
            "page": 1
        },
        "date_range_default": {
            "from": "2024-01-10 00:00:00",
            "to": "2024-02-09 23:59:59"
        }
    }
}
 

Request   

GET api/sales/deals

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 contact groups to show per page. Example: 15

page   number  optional  

The page number. Example: 1

search   string  optional  

Optional search string.

Deals - Store

requires authentication

Add a new Deal

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

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

let body = {
    "name": "Big Deal",
    "deal_stage": 1,
    "deal_value": 1000,
    "agent_id": 1,
    "threads": [
        1,
        2,
        3,
        4
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/sales/deals';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'Big Deal',
            'deal_stage' => 1,
            'deal_value' => 1000,
            'agent_id' => 1,
            'threads' => [
                1,
                2,
                3,
                4,
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "https://portal.timetoreply.com/api/sales/deals" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Big Deal\",
    \"deal_stage\": 1,
    \"deal_value\": 1000,
    \"agent_id\": 1,
    \"threads\": [
        1,
        2,
        3,
        4
    ]
}"

Example response (200):

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

"success"
 

Request   

POST api/sales/deals

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

name   string   

The name of the Deal. Example: Big Deal

deal_stage   integer   

The stage of the Deal. Example: 1

deal_value   integer  optional  

The value of the Deal. Example: 1000

agent_id   integer  optional  

The ID of the Agent associated with the Deal. Example: 1

threads   integer[]  optional  

The threads associated with the Deal.

Deals - Update

requires authentication

Edit a Deal

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

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

let body = {
    "name": "Big Deal",
    "deal_stage": 1,
    "deal_value": 1000,
    "agent_id": 1,
    "threads": [
        1,
        2,
        3,
        4
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/sales/deals/1';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'Big Deal',
            'deal_stage' => 1,
            'deal_value' => 1000,
            'agent_id' => 1,
            'threads' => [
                1,
                2,
                3,
                4,
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request PUT \
    "https://portal.timetoreply.com/api/sales/deals/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Big Deal\",
    \"deal_stage\": 1,
    \"deal_value\": 1000,
    \"agent_id\": 1,
    \"threads\": [
        1,
        2,
        3,
        4
    ]
}"

Example response (200):


success
 

Request   

PUT api/sales/deals/{id}

PATCH api/sales/deals/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the deal. Example: 1

deal_id   integer   

The ID of the Deal to update. Example: 1

Body Parameters

name   string   

The name of the Deal. Example: Big Deal

deal_stage   integer   

The stage of the Deal. Example: 1

deal_value   integer  optional  

The value of the Deal. Example: 1000

agent_id   integer  optional  

The ID of the Agent associated with the Deal. Example: 1

threads   integer[]  optional  

The threads associated with the Deal.

Deals - Delete

requires authentication

Delete a deal

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

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

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/sales/deals/1';
$response = $client->delete(
    $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 DELETE \
    "https://portal.timetoreply.com/api/sales/deals/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Example response (200):


{
    "status": "Deal deleted successfully"
}
 

Request   

DELETE api/sales/deals/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the deal. Example: 1

deal_id   integer   

The ID of the deal you would like to delete. Example: 1

Deals - Add Threads

requires authentication

Add threads (conversations) to a deal

Example request:
const url = new URL(
    "https://portal.timetoreply.com/api/sales/deals/1/add-threads"
);

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

let body = {
    "threads": [
        1,
        2,
        3,
        4
    ]
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/sales/deals/1/add-threads';
$response = $client->patch(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'threads' => [
                1,
                2,
                3,
                4,
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request PATCH \
    "https://portal.timetoreply.com/api/sales/deals/1/add-threads" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"threads\": [
        1,
        2,
        3,
        4
    ]
}"

Example response (200):

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

"success"
 

Request   

PATCH api/sales/deals/{deal_id}/add-threads

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

deal_id   integer   

The ID of the Deal to add threads to. Example: 1

Body Parameters

threads   integer[]   

The ids of the threads to add to the deal.

Labels

requires authentication

Search for labels based on the given search string

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

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/labels/search';
$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/labels/search" \
    --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: []
 

[]
 

Tools

Filters

Filters - List

requires authentication

List all current filters and entities

Example request:
const url = new URL(
    "https://portal.timetoreply.com/api/tools/settings/message-filters/all-thread-filter-data"
);

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/tools/settings/message-filters/all-thread-filter-data';
$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/tools/settings/message-filters/all-thread-filter-data" \
    --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: []
 

{
    "advanced_filters_count": {
        "active": 0,
        "total": 1
    },
    "domain_and_email_filters": {
        "domains": 1,
        "emails": 1
    },
    "agents": [
        {
            "id": 5,
            "name": "Ally Price",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Mailbox",
            "icon": "user-plus"
        },
        {
            "id": 3,
            "name": "Fred Heidenreich",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Mailbox",
            "icon": "user-plus"
        },
        {
            "id": 1,
            "name": "Kareem Bogisich",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Mailbox",
            "icon": "user-plus"
        }
    ],
    "teams": [
        {
            "id": 2,
            "name": "EU Support Team",
            "email_usernames": [
                "[email protected]",
                "[email protected]",
                "[email protected]"
            ],
            "model_type": "Team",
            "icon": "handshake"
        },
        {
            "id": 1,
            "name": "US Support Team",
            "email_usernames": [
                "[email protected]",
                "[email protected]",
                "[email protected]"
            ],
            "model_type": "Team",
            "icon": "handshake"
        }
    ],
    "group_mailboxes": [
        {
            "id": 2,
            "name": "EU Support",
            "email_usernames": [
                "[email protected]",
                "[email protected]",
                "[email protected]",
                "[email protected]"
            ],
            "model_type": "Group Mailbox",
            "icon": "users"
        },
        {
            "id": 1,
            "name": "US Support",
            "email_usernames": [
                "[email protected]",
                "[email protected]",
                "[email protected]",
                "[email protected]"
            ],
            "model_type": "Group Mailbox",
            "icon": "users"
        }
    ],
    "customer_groups": [
        {
            "id": 3,
            "name": "Active Campaign Customer Group",
            "email_usernames": [
                "[email protected]",
                "[email protected]"
            ],
            "customer_domains": [
                "friesen.net",
                "gmail.com"
            ],
            "model_type": "Contact Group",
            "icon": "user-friends"
        },
        {
            "id": 5,
            "name": "Constant Contact Customer Group",
            "email_usernames": [
                "[email protected]",
                "[email protected]"
            ],
            "customer_domains": [
                "runolfsson.net",
                "wunsch.com"
            ],
            "model_type": "Contact Group",
            "icon": "user-friends"
        },
        {
            "id": 2,
            "name": "Hubspot Customer Group",
            "email_usernames": [
                "[email protected]",
                "[email protected]"
            ],
            "customer_domains": [
                "mcglynn.com",
                "sanford.biz"
            ],
            "model_type": "Contact Group",
            "icon": "user-friends"
        },
        {
            "id": 4,
            "name": "Maropost Customer Group",
            "email_usernames": [
                "[email protected]",
                "[email protected]"
            ],
            "customer_domains": [
                "rath.com",
                "halvorson.info"
            ],
            "model_type": "Contact Group",
            "icon": "user-friends"
        },
        {
            "id": 6,
            "name": "Salesforce Customer Group",
            "email_usernames": [
                "[email protected]",
                "[email protected]"
            ],
            "customer_domains": [
                "considine.com",
                "moore.com"
            ],
            "model_type": "Contact Group",
            "icon": "user-friends"
        },
        {
            "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": 7,
            "name": "Zoho Customer Group",
            "email_usernames": [
                "[email protected]",
                "[email protected]"
            ],
            "customer_domains": [
                "luettgen.biz",
                "schmeler.com"
            ],
            "model_type": "Contact Group",
            "icon": "user-friends"
        }
    ],
    "customers": [
        {
            "id": 2626,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2261,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2311,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2038,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2498,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2128,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2438,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2901,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": true
        },
        {
            "id": 2613,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2823,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": true
        },
        {
            "id": 2214,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2160,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2274,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2636,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2174,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2508,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2798,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": true
        },
        {
            "id": 2546,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2600,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2201,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2715,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": true
        },
        {
            "id": 2576,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2465,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2387,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2853,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": true
        },
        {
            "id": 2051,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2062,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2589,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2152,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2717,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": true
        },
        {
            "id": 2337,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2604,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2023,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2145,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2180,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2711,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": true
        },
        {
            "id": 2113,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2664,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2866,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": true
        },
        {
            "id": 2085,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2429,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2882,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": true
        },
        {
            "id": 2035,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2531,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2198,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2151,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2199,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2105,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2227,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2050,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2698,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": true
        },
        {
            "id": 2540,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2538,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2269,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2144,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2260,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2496,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2058,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2500,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2802,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": true
        },
        {
            "id": 2601,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2148,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2018,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2126,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2410,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2773,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": true
        },
        {
            "id": 2476,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2320,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2349,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2343,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2210,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2088,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2706,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": true
        },
        {
            "id": 2451,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2867,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": true
        },
        {
            "id": 2581,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2377,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2046,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2159,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2419,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2585,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2077,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2189,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2009,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2039,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2733,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": true
        },
        {
            "id": 2119,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2314,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2837,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": true
        },
        {
            "id": 2066,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2284,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2723,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": true
        },
        {
            "id": 2007,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2734,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": true
        },
        {
            "id": 2558,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2352,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2301,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2852,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": true
        },
        {
            "id": 2588,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2884,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": true
        },
        {
            "id": 2183,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2350,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2386,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2382,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2651,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2650,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2054,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2421,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2013,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2692,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": true
        },
        {
            "id": 2099,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2467,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2813,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": true
        },
        {
            "id": 2003,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2319,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2175,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2445,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2817,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": true
        },
        {
            "id": 2097,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2030,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2171,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2293,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2297,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2725,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": true
        },
        {
            "id": 2221,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2112,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2025,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2473,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2404,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2781,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": true
        },
        {
            "id": 2644,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2870,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": true
        },
        {
            "id": 2059,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2321,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2571,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2559,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2095,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2594,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2815,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": true
        },
        {
            "id": 2211,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2079,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2649,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2528,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2168,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2614,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2816,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": true
        },
        {
            "id": 2390,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2842,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": true
        },
        {
            "id": 2388,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2031,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2367,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2076,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2340,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2255,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2705,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": true
        },
        {
            "id": 2150,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2714,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": true
        },
        {
            "id": 2680,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2660,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2230,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2623,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2806,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": true
        },
        {
            "id": 2116,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2669,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2890,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": true
        },
        {
            "id": 2534,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2480,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2316,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2213,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2673,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2270,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2,
            "name": "customer.com",
            "email_usernames": [
                "customer.com"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2106,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2497,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2080,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2564,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2384,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2357,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2609,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2157,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2140,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2008,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2029,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2055,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2629,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2876,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": true
        },
        {
            "id": 2426,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2620,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2741,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": true
        },
        {
            "id": 2499,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2787,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": true
        },
        {
            "id": 2253,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2718,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": true
        },
        {
            "id": 2012,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2235,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2720,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": true
        },
        {
            "id": 2138,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2697,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": true
        },
        {
            "id": 2503,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": false
        },
        {
            "id": 2788,
            "name": "[email protected]",
            "email_usernames": [
                "[email protected]"
            ],
            "model_type": "Contact",
            "icon": "user",
            "is_lead": true
        }
    ],
    "lead_sources": [
        {
            "id": 1,
            "name": "US Sales Box",
            "email_usernames": [],
            "model_type": "Lead Source",
            "icon": "square-list"
        },
        {
            "id": 2,
            "name": "Web Enquiry Form",
            "email_usernames": [],
            "model_type": "Lead Source",
            "icon": "square-list"
        }
    ],
    "goals": {
        "first_reply_time_goal": 7200,
        "first_reply_time_goal_bands": [],
        "overall_reply_time_goal": 14400,
        "overall_reply_time_goal_bands": [],
        "time_to_close_goal": 86400,
        "time_to_close_goal_bands": []
    }
}
 

Request   

GET api/tools/settings/message-filters/all-thread-filter-data

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Domain Filters - List

requires authentication

List all Domain Filters

Example request:
const url = new URL(
    "https://portal.timetoreply.com/api/tools/settings/message-filters/domains"
);

const params = {
    "sort_by": "domain",
    "direction": "asc",
    "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/tools/settings/message-filters/domains';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'sort_by' => 'domain',
            'direction' => 'asc',
            'page' => '1',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://portal.timetoreply.com/api/tools/settings/message-filters/domains?sort_by=domain&direction=asc&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: []
 

{
    "domains": {
        "current_page": 1,
        "data": [
            "spam.com"
        ],
        "first_page_url": "https://portal.timetoreply.com/api/tools/settings/message-filters/domains?page=1",
        "from": 1,
        "last_page": 1,
        "last_page_url": "https://portal.timetoreply.com/api/tools/settings/message-filters/domains?page=1",
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "https://portal.timetoreply.com/api/tools/settings/message-filters/domains?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "next_page_url": null,
        "path": "https://portal.timetoreply.com/api/tools/settings/message-filters/domains",
        "per_page": 2,
        "prev_page_url": null,
        "to": 1,
        "total": 1
    },
    "whitelisting": false
}
 

Request   

GET api/tools/settings/message-filters/domains

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

sort_by   string  optional  

Field Name to sort domains by. Can only be domain. Example: domain

direction   string  optional  

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

page   integer  optional  

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

Domain Filters - Store

requires authentication

Block domains

Example request:
const url = new URL(
    "https://portal.timetoreply.com/api/tools/settings/message-filters/domains/block"
);

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

let body = {
    "domains": [
        "spam.com"
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/tools/settings/message-filters/domains/block';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'domains' => [
                'spam.com',
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "https://portal.timetoreply.com/api/tools/settings/message-filters/domains/block" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"domains\": [
        \"spam.com\"
    ]
}"

Example response (200):

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

[
    {
        "id": 10,
        "domain": "spam.com"
    }
]
 

Request   

POST api/tools/settings/message-filters/domains/block

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

domains   string[]   

An array of domains to block.

Domain Filters - Delete

requires authentication

Unblock domains

Example request:
const url = new URL(
    "https://portal.timetoreply.com/api/tools/settings/message-filters/domains/unblock"
);

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

let body = {
    "domains": [
        "spam.com"
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/tools/settings/message-filters/domains/unblock';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'domains' => [
                'spam.com',
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "https://portal.timetoreply.com/api/tools/settings/message-filters/domains/unblock" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"domains\": [
        \"spam.com\"
    ]
}"

Example response (200):

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

{
    "status": "Domains unblocked successfully"
}
 

Request   

POST api/tools/settings/message-filters/domains/unblock

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

domains   string[]   

An array of domains to unblock.

Domain Filters - Delete All

requires authentication

Unblock All domains

Example request:
const url = new URL(
    "https://portal.timetoreply.com/api/tools/settings/message-filters/domains/unblockAll"
);

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

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/tools/settings/message-filters/domains/unblockAll';
$response = $client->post(
    $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 POST \
    "https://portal.timetoreply.com/api/tools/settings/message-filters/domains/unblockAll" \
    --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: []
 

{
    "status": "Domains unblocked successfully"
}
 

Request   

POST api/tools/settings/message-filters/domains/unblockAll

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Domain Filters - Whitelisting

requires authentication

Toggle on/off Domain Whitelisting

Example request:
const url = new URL(
    "https://portal.timetoreply.com/api/tools/settings/message-filters/domains/whitelisting/toggle"
);

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

let body = {
    "whitelisting": true
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/tools/settings/message-filters/domains/whitelisting/toggle';
$response = $client->patch(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'whitelisting' => true,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request PATCH \
    "https://portal.timetoreply.com/api/tools/settings/message-filters/domains/whitelisting/toggle" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"whitelisting\": true
}"

Example response (200):

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

{
    "status": "Domain whitelisting enabled"
}
 

Request   

PATCH api/tools/settings/message-filters/domains/whitelisting/toggle

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

whitelisting   boolean  optional  

Whether toggle Domain Whitelist on or off. Example: true

Max Reply Time - Get

requires authentication

Get the current Max Reply Time settings

Example request:
const url = new URL(
    "https://portal.timetoreply.com/api/tools/settings/message-filters/max-reply-time"
);

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/tools/settings/message-filters/max-reply-time';
$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/tools/settings/message-filters/max-reply-time" \
    --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: []
 

{
    "max_reply_time_enabled": true,
    "max_reply_time_hrs": 40
}
 

Request   

GET api/tools/settings/message-filters/max-reply-time

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Max Reply Time - Set

requires authentication

Set the current Max Reply Time settings

Example request:
const url = new URL(
    "https://portal.timetoreply.com/api/tools/settings/message-filters/max-reply-time"
);

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

let body = {
    "max_reply_time_enabled": true,
    "max_reply_time_hrs": 40
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/tools/settings/message-filters/max-reply-time';
$response = $client->patch(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'max_reply_time_enabled' => true,
            'max_reply_time_hrs' => 40,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request PATCH \
    "https://portal.timetoreply.com/api/tools/settings/message-filters/max-reply-time" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"max_reply_time_enabled\": true,
    \"max_reply_time_hrs\": 40
}"

Example response (200):


{
    "max_reply_time_enabled": true,
    "max_reply_time_hrs": 40
}
 

Request   

PATCH api/tools/settings/message-filters/max-reply-time

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

max_reply_time_enabled   boolean   

Whether the max reply time is enabled. Example: true

max_reply_time_hrs   integer   

The number of hours to set the max reply time to. Example: 40

Email Filters - List

requires authentication

Get email address filters

Example request:
const url = new URL(
    "https://portal.timetoreply.com/api/tools/settings/message-filters/usernames"
);

const params = {
    "sort_by": "email_address",
    "direction": "asc",
    "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/tools/settings/message-filters/usernames';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'sort_by' => 'email_address',
            'direction' => 'asc',
            'page' => '1',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://portal.timetoreply.com/api/tools/settings/message-filters/usernames?sort_by=email_address&direction=asc&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: []
 

{
    "current_page": 1,
    "data": [
        "[email protected]"
    ],
    "first_page_url": "https://portal.timetoreply.com/api/tools/settings/message-filters/usernames?page=1",
    "from": 1,
    "last_page": 1,
    "last_page_url": "https://portal.timetoreply.com/api/tools/settings/message-filters/usernames?page=1",
    "links": [
        {
            "url": null,
            "label": "« Previous",
            "active": false
        },
        {
            "url": "https://portal.timetoreply.com/api/tools/settings/message-filters/usernames?page=1",
            "label": "1",
            "active": true
        },
        {
            "url": null,
            "label": "Next »",
            "active": false
        }
    ],
    "next_page_url": null,
    "path": "https://portal.timetoreply.com/api/tools/settings/message-filters/usernames",
    "per_page": 2,
    "prev_page_url": null,
    "to": 1,
    "total": 1
}
 

Request   

GET api/tools/settings/message-filters/usernames

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

sort_by   string  optional  

Field Name to sort email addresses by. Can only be email_address. Example: email_address

direction   string  optional  

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

page   integer  optional  

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

Email Filters - Store

requires authentication

Block email addresses

Example request:
const url = new URL(
    "https://portal.timetoreply.com/api/tools/settings/message-filters/usernames/block"
);

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

let body = {
    "usernames": [
        "[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/tools/settings/message-filters/usernames/block';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'usernames' => [
                '[email protected]',
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "https://portal.timetoreply.com/api/tools/settings/message-filters/usernames/block" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"usernames\": [
        \"[email protected]\"
    ]
}"

Example response (200):

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

[
    {
        "id": 22,
        "username": "spam",
        "domain_id": 126,
        "email_address": "[email protected]"
    }
]
 

Request   

POST api/tools/settings/message-filters/usernames/block

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

usernames   string[]   

An array of email addresses to block.

Email Filters - Delete

requires authentication

Unblock email addresses

Example request:
const url = new URL(
    "https://portal.timetoreply.com/api/tools/settings/message-filters/usernames/unblock"
);

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

let body = {
    "usernames": [
        "[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/tools/settings/message-filters/usernames/unblock';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'usernames' => [
                '[email protected]',
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "https://portal.timetoreply.com/api/tools/settings/message-filters/usernames/unblock" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"usernames\": [
        \"[email protected]\"
    ]
}"

Example response (200):

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

{
    "status": "Email addresses unblocked successfully"
}
 

Request   

POST api/tools/settings/message-filters/usernames/unblock

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

usernames   string[]   

An array of email addresses to unblock.

Advanced Filters - List

requires authentication

List all Advanced filters

Example request:
const url = new URL(
    "https://portal.timetoreply.com/api/tools/settings/message-filters/advanced"
);

const params = {
    "per_page": "15",
    "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/tools/settings/message-filters/advanced';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'per_page' => '15',
            'page' => '1',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://portal.timetoreply.com/api/tools/settings/message-filters/advanced?per_page=15&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: []
 

{
    "current_page": 1,
    "data": [
        {
            "id": 1,
            "company_id": 1,
            "name": "example message filter group",
            "active": false,
            "message_filters_count": 1,
            "message_filters": [
                {
                    "id": 1,
                    "message_filter_group_id": 1,
                    "field": "Subject",
                    "operator": "does not equal",
                    "type": "and",
                    "value": "example message filter"
                }
            ]
        }
    ],
    "first_page_url": "https://portal.timetoreply.com/api/tools/settings/message-filters/advanced?page=1",
    "from": 1,
    "last_page": 1,
    "last_page_url": "https://portal.timetoreply.com/api/tools/settings/message-filters/advanced?page=1",
    "links": [
        {
            "url": null,
            "label": "« Previous",
            "active": false
        },
        {
            "url": "https://portal.timetoreply.com/api/tools/settings/message-filters/advanced?page=1",
            "label": "1",
            "active": true
        },
        {
            "url": null,
            "label": "Next »",
            "active": false
        }
    ],
    "next_page_url": null,
    "path": "https://portal.timetoreply.com/api/tools/settings/message-filters/advanced",
    "per_page": 2,
    "prev_page_url": null,
    "to": 1,
    "total": 1
}
 

Request   

GET api/tools/settings/message-filters/advanced

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

per_page   number  optional  

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

page   number  optional  

The page number. Example: 1

Advanced Filters - Store

requires authentication

Add a new Advanced Filter

Example request:
const url = new URL(
    "https://portal.timetoreply.com/api/tools/settings/message-filters/advanced"
);

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

let body = {
    "filterName": "From Does Not Contain no-reply example",
    "filters": [
        {
            "field": "From",
            "operator": "does not contain",
            "type": "and",
            "value": "no-reply"
        }
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/tools/settings/message-filters/advanced';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'filterName' => 'From Does Not Contain no-reply example',
            'filters' => [
                [
                    'field' => 'From',
                    'operator' => 'does not contain',
                    'type' => 'and',
                    'value' => 'no-reply',
                ],
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "https://portal.timetoreply.com/api/tools/settings/message-filters/advanced" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"filterName\": \"From Does Not Contain no-reply example\",
    \"filters\": [
        {
            \"field\": \"From\",
            \"operator\": \"does not contain\",
            \"type\": \"and\",
            \"value\": \"no-reply\"
        }
    ]
}"

Example response (200):

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

{
    "id": 2,
    "company_id": 1,
    "name": "From Does Not Contain no-reply example",
    "active": true
}
 

Request   

POST api/tools/settings/message-filters/advanced

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

filterName   string   

The name of the Advanced Filter. Example: From Does Not Contain no-reply example

filters   object[]  optional  

An array of Filters objects.

field   string   

The field to filter on. Can be From, To, Cc, Subject or Label. Example: From

operator   string   

The operator for the filter. Can be does not begin with, does not end with, does not equal, does not contain, begins with, ends with, equals or contains. Example: does not contain

type   string   

The boolean logic type of the advanced filter. Can be and or or. Example: and

value   string   

The value of the filter. Example: no-reply

Advanced Filters - Update

requires authentication

Update an Advanced Filter

Example request:
const url = new URL(
    "https://portal.timetoreply.com/api/tools/settings/message-filters/advanced/1"
);

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

let body = {
    "filterName": "From Does Not Contain no-reply filter",
    "filters": [
        {
            "field": "From",
            "operator": "does not contain",
            "type": "and",
            "value": "no-reply"
        }
    ]
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/tools/settings/message-filters/advanced/1';
$response = $client->patch(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'filterName' => 'From Does Not Contain no-reply filter',
            'filters' => [
                [
                    'field' => 'From',
                    'operator' => 'does not contain',
                    'type' => 'and',
                    'value' => 'no-reply',
                ],
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request PATCH \
    "https://portal.timetoreply.com/api/tools/settings/message-filters/advanced/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"filterName\": \"From Does Not Contain no-reply filter\",
    \"filters\": [
        {
            \"field\": \"From\",
            \"operator\": \"does not contain\",
            \"type\": \"and\",
            \"value\": \"no-reply\"
        }
    ]
}"

Example response (200):


{
    "id": 1,
    "company_id": 1,
    "name": "From Does Not Contain no-reply filter",
    "active": true,
    "message_filters": [
        {
            "id": 1,
            "message_filter_group_id": 1,
            "field": "From",
            "operator": "does not contain",
            "type": "and",
            "value": "no-reply"
        }
    ]
}
 

Request   

PATCH api/tools/settings/message-filters/advanced/{message_filter_group_id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

message_filter_group_id   integer   

The ID of the Advanced Filter to update. Example: 1

Body Parameters

filterName   string   

The name of the Advanced Filter. Example: From Does Not Contain no-reply filter

filters   object[]  optional  

An array of Filters objects.

field   string   

The field to filter on. Can be From, To, Cc, Subject or Label. Example: From

operator   string   

The operator for the filter. Can be does not begin with, does not end with, does not equal, does not contain, begins with, ends with, equals or contains. Example: does not contain

type   string   

The boolean logic type of the advanced filter. Can be and or or. Example: and

value   string   

The value of the filter. Example: no-reply

Advanced Filters - Delete

requires authentication

Delete an Advanced Filter

Example request:
const url = new URL(
    "https://portal.timetoreply.com/api/tools/settings/message-filters/advanced/1"
);

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

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/tools/settings/message-filters/advanced/1';
$response = $client->delete(
    $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 DELETE \
    "https://portal.timetoreply.com/api/tools/settings/message-filters/advanced/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Example response (200):


{
    "status": "Advanced filter deleted."
}
 

Request   

DELETE api/tools/settings/message-filters/advanced/{message_filter_group_id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

message_filter_group_id   integer   

The ID of the Advanced Filter to delete. Example: 1

Advanced Filters - Toggle

requires authentication

Toggle on/off an Advanced Filter

Example request:
const url = new URL(
    "https://portal.timetoreply.com/api/tools/settings/message-filters/advanced/1/toggle"
);

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

fetch(url, {
    method: "PATCH",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/tools/settings/message-filters/advanced/1/toggle';
$response = $client->patch(
    $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 PATCH \
    "https://portal.timetoreply.com/api/tools/settings/message-filters/advanced/1/toggle" \
    --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": 1,
    "company_id": 1,
    "name": "example message filter group",
    "active": true
}
 

Request   

PATCH api/tools/settings/message-filters/advanced/{message_filter_group_id}/toggle

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

message_filter_group_id   integer   

The ID of the Advanced Filter to toggle. Example: 1

Goals

Reply Time Goals - List

requires authentication

Get current reply time goals (shown in seconds)

Example request:
const url = new URL(
    "https://portal.timetoreply.com/api/tools/settings/reply-time-goals"
);

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/tools/settings/reply-time-goals';
$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/tools/settings/reply-time-goals" \
    --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: []
 

{
    "first_reply_time_goal": 7200,
    "first_reply_time_goal_bands": [],
    "overall_reply_time_goal": 14400,
    "overall_reply_time_goal_bands": [],
    "time_to_close_goal": 86400,
    "time_to_close_goal_bands": []
}
 

Request   

GET api/tools/settings/reply-time-goals

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Reply Time Goals - Update

requires authentication

Update Reply Time Goals

Example request:
const url = new URL(
    "https://portal.timetoreply.com/api/tools/settings/reply-time-goals"
);

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

let body = {
    "first_reply_time_goal": 3600,
    "overall_reply_time_goal": 3600,
    "time_to_close_goal": 3600,
    "first_reply_time_goal_bands": [
        1800,
        7200
    ],
    "overall_reply_time_goal_bands": [
        1800,
        7200
    ],
    "time_to_close_goal_bands": [
        1800,
        7200
    ]
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/tools/settings/reply-time-goals';
$response = $client->patch(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'first_reply_time_goal' => 3600,
            'overall_reply_time_goal' => 3600,
            'time_to_close_goal' => 3600,
            'first_reply_time_goal_bands' => [
                1800,
                7200,
            ],
            'overall_reply_time_goal_bands' => [
                1800,
                7200,
            ],
            'time_to_close_goal_bands' => [
                1800,
                7200,
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request PATCH \
    "https://portal.timetoreply.com/api/tools/settings/reply-time-goals" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"first_reply_time_goal\": 3600,
    \"overall_reply_time_goal\": 3600,
    \"time_to_close_goal\": 3600,
    \"first_reply_time_goal_bands\": [
        1800,
        7200
    ],
    \"overall_reply_time_goal_bands\": [
        1800,
        7200
    ],
    \"time_to_close_goal_bands\": [
        1800,
        7200
    ]
}"

Example response (200):


{
    "first_reply_time_goal": 3600,
    "first_reply_time_goal_bands": [
        1800,
        7200
    ],
    "overall_reply_time_goal": 3600,
    "overall_reply_time_goal_bands": [
        1800,
        7200
    ],
    "time_to_close_goal": 3600,
    "time_to_close_goal_bands": [
        1800,
        7200
    ]
}
 

Request   

PATCH api/tools/settings/reply-time-goals

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

first_reply_time_goal   integer   

First Reply Time Goal (in seconds). Example: 3600

overall_reply_time_goal   integer   

Overall Reply Time Goal (in seconds). Example: 3600

time_to_close_goal   integer   

Time to Close Goal (in seconds). Example: 3600

first_reply_time_goal_bands   integer[]  optional  

First Reply Time Goal Bands (in seconds).

overall_reply_time_goal_bands   integer[]  optional  

Overall Reply Time Goal Bands (in seconds).

time_to_close_goal_bands   integer[]  optional  

Time to Close Goal Bands (in seconds).

Profile

Profile - Update

requires authentication

Add more details to your profile

Example request:
const url = new URL(
    "https://portal.timetoreply.com/api/tools/settings/profile"
);

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

let body = {
    "team": "Customer Service",
    "team_role": "Manager",
    "company_size": "B"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/tools/settings/profile';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'team' => 'Customer Service',
            'team_role' => 'Manager',
            'company_size' => 'B',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "https://portal.timetoreply.com/api/tools/settings/profile" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"team\": \"Customer Service\",
    \"team_role\": \"Manager\",
    \"company_size\": \"B\"
}"

Example response (200):

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

{
    "status": "Thanks for telling us more about you."
}
 

Request   

POST api/tools/settings/profile

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

team   string   

Which team do you belong to? Can be any of 'Customer Service', 'Support', 'Sales', 'Key Account Management', 'Back Office', 'Other'. Example: Customer Service

team_role   string   

What is your role in that team? Can be any of 'VP/Director', 'Manager', 'Team Member'. Example: Manager

company_size   string   

What is the size of your company. This is based on the linkedin list of company sizes. Example: B

Profile - Get

requires authentication

Your account basic data

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

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/me';
$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/me" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Example response (200):


{
    "id": "1",
    "name": "Peter Rabbit",
    "email": "[email protected]"
}
 

Request   

GET api/me

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Settings

Internal Domains - List

requires authentication

List all internal domains

Example request:
const url = new URL(
    "https://portal.timetoreply.com/api/tools/company/internal-domains"
);

const params = {
    "sort_by": "domain",
    "direction": "asc",
    "per_page": "2",
    "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/tools/company/internal-domains';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'sort_by' => 'domain',
            'direction' => 'asc',
            'per_page' => '2',
            'page' => '1',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://portal.timetoreply.com/api/tools/company/internal-domains?sort_by=domain&direction=asc&per_page=2&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: []
 

{
    "current_page": 1,
    "data": [
        {
            "id": 8,
            "domain": "timetoreply.com",
            "add_method": "automatic"
        }
    ],
    "first_page_url": "https://portal.timetoreply.com/api/tools/company/internal-domains?page=1",
    "from": 1,
    "last_page": 1,
    "last_page_url": "https://portal.timetoreply.com/api/tools/company/internal-domains?page=1",
    "links": [
        {
            "url": null,
            "label": "« Previous",
            "active": false
        },
        {
            "url": "https://portal.timetoreply.com/api/tools/company/internal-domains?page=1",
            "label": "1",
            "active": true
        },
        {
            "url": null,
            "label": "Next »",
            "active": false
        }
    ],
    "next_page_url": null,
    "path": "https://portal.timetoreply.com/api/tools/company/internal-domains",
    "per_page": 2,
    "prev_page_url": null,
    "to": 1,
    "total": 1
}
 

Request   

GET api/tools/company/internal-domains

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 Domains by. Example: domain

direction   string  optional  

Sort asc or desc. Example: asc

per_page   number  optional  

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

page   number  optional  

The page number. Example: 1

Internal Domains - Store

requires authentication

Add a new internal domain

Example request:
const url = new URL(
    "https://portal.timetoreply.com/api/tools/company/internal-domains"
);

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

let body = {
    "domain": "example.com"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/tools/company/internal-domains';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'domain' => 'example.com',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "https://portal.timetoreply.com/api/tools/company/internal-domains" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"domain\": \"example.com\"
}"

Example response (200):


{
    "current_page": 1,
    "data": [
        {
            "id": 1,
            "domain": "yourdomain.com",
            "add_method": "automatic"
        },
        {
            "id": 2,
            "domain": "example.com",
            "add_method": "manual"
        }
    ],
    "first_page_url": "https://portal.timetoreply.com/api/tools/company/internal-domains?page=1",
    "from": 1,
    "last_page": 1,
    "last_page_url": "https://portal.timetoreply.com/api/tools/company/internal-domains?page=1",
    "links": [
        {
            "url": null,
            "label": "« Previous",
            "active": false
        },
        {
            "url": "https://portal.timetoreply.com/api/tools/company/internal-domains?page=1",
            "label": "1",
            "active": true
        },
        {
            "url": null,
            "label": "Next »",
            "active": false
        }
    ],
    "next_page_url": null,
    "path": "https://portal.timetoreply.com/api/tools/company/internal-domains",
    "per_page": 15,
    "prev_page_url": null,
    "to": 2,
    "total": 2
}
 

Request   

POST api/tools/company/internal-domains

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

domain   string   

The domain to add as an internal domain. Example: example.com

Internal Domains - Delete

requires authentication

Remove an internal domain

Example request:
const url = new URL(
    "https://portal.timetoreply.com/api/tools/company/internal-domains/11"
);

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

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/tools/company/internal-domains/11';
$response = $client->delete(
    $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 DELETE \
    "https://portal.timetoreply.com/api/tools/company/internal-domains/11" \
    --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": 8,
            "domain": "timetoreply.com",
            "add_method": "automatic"
        }
    ],
    "first_page_url": "https://portal.timetoreply.com/api/tools/company/internal-domains/11?page=1",
    "from": 1,
    "last_page": 1,
    "last_page_url": "https://portal.timetoreply.com/api/tools/company/internal-domains/11?page=1",
    "links": [
        {
            "url": null,
            "label": "« Previous",
            "active": false
        },
        {
            "url": "https://portal.timetoreply.com/api/tools/company/internal-domains/11?page=1",
            "label": "1",
            "active": true
        },
        {
            "url": null,
            "label": "Next »",
            "active": false
        }
    ],
    "next_page_url": null,
    "path": "https://portal.timetoreply.com/api/tools/company/internal-domains/11",
    "per_page": 15,
    "prev_page_url": null,
    "to": 1,
    "total": 1
}
 

Request   

DELETE api/tools/company/internal-domains/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the internal domain. Example: 11

internal_domain_id   integer   

The ID of the internal domain to remove. Example: 1

Conversation Threading Style - Set

requires authentication

Set the current Conversation Threading Style

Example request:
const url = new URL(
    "https://portal.timetoreply.com/api/tools/company/conversation-threading-style"
);

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

let body = {
    "style": "responding_to"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/tools/company/conversation-threading-style';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'style' => 'responding_to',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "https://portal.timetoreply.com/api/tools/company/conversation-threading-style" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"style\": \"responding_to\"
}"

Example response (200):

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

{
    "status": "Preference updated successfully"
}
 

Request   

POST api/tools/company/conversation-threading-style

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

style   string   

The style to set. Example: responding_to

Closing Email Addresses - List

requires authentication

List all "closing" email addresses

Example request:
const url = new URL(
    "https://portal.timetoreply.com/api/tools/company/close-conversation-emails"
);

const params = {
    "sort_by": "domain",
    "direction": "asc",
    "per_page": "2",
    "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/tools/company/close-conversation-emails';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'sort_by' => 'domain',
            'direction' => 'asc',
            'per_page' => '2',
            'page' => '1',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://portal.timetoreply.com/api/tools/company/close-conversation-emails?sort_by=domain&direction=asc&per_page=2&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: []
 

{
    "current_page": 1,
    "data": [
        {
            "id": 10,
            "username": "closed",
            "email_address": "[email protected]"
        }
    ],
    "first_page_url": "https://portal.timetoreply.com/api/tools/company/close-conversation-emails?page=1",
    "from": 1,
    "last_page": 1,
    "last_page_url": "https://portal.timetoreply.com/api/tools/company/close-conversation-emails?page=1",
    "links": [
        {
            "url": null,
            "label": "« Previous",
            "active": false
        },
        {
            "url": "https://portal.timetoreply.com/api/tools/company/close-conversation-emails?page=1",
            "label": "1",
            "active": true
        },
        {
            "url": null,
            "label": "Next »",
            "active": false
        }
    ],
    "next_page_url": null,
    "path": "https://portal.timetoreply.com/api/tools/company/close-conversation-emails",
    "per_page": 2,
    "prev_page_url": null,
    "to": 1,
    "total": 1
}
 

Request   

GET api/tools/company/close-conversation-emails

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 Email Addresses by. Example: domain

direction   string  optional  

Sort asc or desc. Example: asc

per_page   number  optional  

The number of Email Addresses to show per page. Example: 2

page   number  optional  

The page number. Example: 1

Closing Email Addresses - Store

requires authentication

Add a new "closing" email address

Example request:
const url = new URL(
    "https://portal.timetoreply.com/api/tools/company/close-conversation-emails"
);

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

let body = {
    "email": "[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/tools/company/close-conversation-emails';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'email' => '[email protected]',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "https://portal.timetoreply.com/api/tools/company/close-conversation-emails" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"[email protected]\"
}"

Example response (200):


[
    {
        "current_page": 1,
        "data": [
            {
                "id": 1,
                "username": "closed",
                "email_address": "[email protected]"
            }
        ],
        "first_page_url": "https://portal.timetoreply.com/api/tools/company/close-conversation-emails?page=1",
        "from": 1,
        "last_page": 1,
        "last_page_url": "https://portal.timetoreply.com/api/tools/company/close-conversation-emails?page=1",
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "https://portal.timetoreply.com/api/tools/company/close-conversation-emails?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "next_page_url": null,
        "path": "https://portal.timetoreply.com/api/tools/company/close-conversation-emails",
        "per_page": 15,
        "prev_page_url": null,
        "to": 1,
        "total": 1
    }
]
 

Request   

POST api/tools/company/close-conversation-emails

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

email   string   

The email address to add as a new "closing" address. Example: [email protected]

Closing Email Addresses - Delete

requires authentication

Remove a "closing" email address

Example request:
const url = new URL(
    "https://portal.timetoreply.com/api/tools/company/close-conversation-emails/1"
);

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

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/tools/company/close-conversation-emails/1';
$response = $client->delete(
    $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 DELETE \
    "https://portal.timetoreply.com/api/tools/company/close-conversation-emails/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: []
 

{
    "current_page": 1,
    "data": [
        {
            "id": 10,
            "username": "closed",
            "email_address": "[email protected]"
        }
    ],
    "first_page_url": "https://portal.timetoreply.com/api/tools/company/close-conversation-emails/1?page=1",
    "from": 1,
    "last_page": 1,
    "last_page_url": "https://portal.timetoreply.com/api/tools/company/close-conversation-emails/1?page=1",
    "links": [
        {
            "url": null,
            "label": "« Previous",
            "active": false
        },
        {
            "url": "https://portal.timetoreply.com/api/tools/company/close-conversation-emails/1?page=1",
            "label": "1",
            "active": true
        },
        {
            "url": null,
            "label": "Next »",
            "active": false
        }
    ],
    "next_page_url": null,
    "path": "https://portal.timetoreply.com/api/tools/company/close-conversation-emails/1",
    "per_page": 15,
    "prev_page_url": null,
    "to": 1,
    "total": 1
}
 

Request   

DELETE api/tools/company/close-conversation-emails/{email_username_id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

email_username_id   integer   

The ID of the "closing" email address to remove. Example: 1

Business Hours

Business Hours - List

requires authentication

Get all existing business hours for either a company or a mailbox

Example request:
const url = new URL(
    "https://portal.timetoreply.com/api/tools/company/business-hours"
);

const params = {
    "forModel": "company",
};
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/tools/company/business-hours';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'forModel' => 'company',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://portal.timetoreply.com/api/tools/company/business-hours?forModel=company" \
    --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": 1,
        "day": "mon",
        "start": "09:00:00",
        "end": "17:00:00"
    },
    {
        "id": 2,
        "day": "tue",
        "start": "09:00:00",
        "end": "17:00:00"
    },
    {
        "id": 3,
        "day": "wed",
        "start": "09:00:00",
        "end": "17:00:00"
    },
    {
        "id": 4,
        "day": "thu",
        "start": "09:00:00",
        "end": "17:00:00"
    },
    {
        "id": 5,
        "day": "fri",
        "start": "09:00:00",
        "end": "17:00:00"
    }
]
 

Request   

GET api/tools/company/business-hours

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

forModel   string  optional  

The model type, can be 'company' or 'agent'. Example: company

modelId   integer  optional  

The id of the agent when using agent in forModel.

Business Hours - Store

requires authentication

Add a new set of business hours

Example request:
const url = new URL(
    "https://portal.timetoreply.com/api/tools/company/business-hours"
);

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

let body = {
    "day": "monfri",
    "from": "09:00:00",
    "to": "17:00:00",
    "forModel": "company"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/tools/company/business-hours';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'day' => 'monfri',
            'from' => '09:00:00',
            'to' => '17:00:00',
            'forModel' => 'company',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "https://portal.timetoreply.com/api/tools/company/business-hours" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"day\": \"monfri\",
    \"from\": \"09:00:00\",
    \"to\": \"17:00:00\",
    \"forModel\": \"company\"
}"

Example response (201):

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

[
    {
        "id": 1,
        "day": "mon",
        "start": "09:00:00",
        "end": "17:00:00"
    },
    {
        "id": 2,
        "day": "tue",
        "start": "09:00:00",
        "end": "17:00:00"
    },
    {
        "id": 3,
        "day": "wed",
        "start": "09:00:00",
        "end": "17:00:00"
    },
    {
        "id": 4,
        "day": "thu",
        "start": "09:00:00",
        "end": "17:00:00"
    },
    {
        "id": 5,
        "day": "fri",
        "start": "09:00:00",
        "end": "17:00:00"
    }
]
 

Request   

POST api/tools/company/business-hours

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

day   string   

Must be either all, monfri, satsun, sunthu, mon, tue, wed, thu, fri, sat or sun. Example: monfri

from   string  optional  

The start time of the business hours in the format "HH:mm:ss". Example: 09:00:00

to   string  optional  

The end time of the business hours in the format "HH:mm:ss". Example: 17:00:00

forModel   string   

The model type, can be 'company' or 'agent'. Example: company

modelId   integer  optional  

The id of the agent when using agent in forModel.

Business Hours - Delete

requires authentication

Delete a set of Business Hours

Example request:
const url = new URL(
    "https://portal.timetoreply.com/api/tools/company/business-hours/1"
);

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

let body = {
    "forModel": "company"
};

fetch(url, {
    method: "DELETE",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/tools/company/business-hours/1';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'forModel' => 'company',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request DELETE \
    "https://portal.timetoreply.com/api/tools/company/business-hours/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"forModel\": \"company\"
}"

Example response (200):


[
    {
        "id": 1,
        "day": "mon",
        "start": "09:00:00",
        "end": "17:00:00"
    },
    {
        "id": 2,
        "day": "tue",
        "start": "09:00:00",
        "end": "17:00:00"
    },
    {
        "id": 3,
        "day": "wed",
        "start": "09:00:00",
        "end": "17:00:00"
    },
    {
        "id": 4,
        "day": "thu",
        "start": "09:00:00",
        "end": "17:00:00"
    }
]
 

Request   

DELETE api/tools/company/business-hours/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the business hour. Example: 1

business_hour_id   integer   

The ID of the set of business hours to delete. Example: 1

Body Parameters

forModel   string   

The model type, can be 'company' or 'agent'. Example: company

modelId   integer  optional  

The id of the agent when using agent in forModel.

Calendar Sync

Calendar Sync Settings - Index

requires authentication

Get all calendar sync settings

Example request:
const url = new URL(
    "https://portal.timetoreply.com/api/tools/company/calendar-sync-settings"
);

const params = {
    "sort_by": "operator",
    "direction": "asc",
    "page": "1",
    "per_page": "10",
    "search": "Google",
};
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/tools/company/calendar-sync-settings';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'sort_by' => 'operator',
            'direction' => 'asc',
            'page' => '1',
            'per_page' => '10',
            'search' => 'Google',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://portal.timetoreply.com/api/tools/company/calendar-sync-settings?sort_by=operator&direction=asc&page=1&per_page=10&search=Google" \
    --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": [],
    "first_page_url": "https://portal.timetoreply.com/api/tools/company/calendar-sync-settings?page=1",
    "from": null,
    "last_page": 1,
    "last_page_url": "https://portal.timetoreply.com/api/tools/company/calendar-sync-settings?page=1",
    "links": [
        {
            "url": null,
            "label": "« Previous",
            "active": false
        },
        {
            "url": "https://portal.timetoreply.com/api/tools/company/calendar-sync-settings?page=1",
            "label": "1",
            "active": true
        },
        {
            "url": null,
            "label": "Next »",
            "active": false
        }
    ],
    "next_page_url": null,
    "path": "https://portal.timetoreply.com/api/tools/company/calendar-sync-settings",
    "per_page": 2,
    "prev_page_url": null,
    "to": null,
    "total": 0
}
 

Request   

GET api/tools/company/calendar-sync-settings

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

sort_by   string  optional  

in:operator,value The field to sort by. Example: operator

direction   string  optional  

in:asc,desc The direction to sort. Example: asc

page   integer  optional  

The page number. Example: 1

per_page   integer  optional  

max:100 The number of items per page. Example: 10

search   string  optional  

Search by value. Example: Google

Calendar Sync Settings - Store

requires authentication

Save a new calendar sync setting

Example request:
const url = new URL(
    "https://portal.timetoreply.com/api/tools/company/calendar-sync-settings"
);

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

let body = {
    "operator": "contains",
    "value": "Out of Office"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/tools/company/calendar-sync-settings';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'operator' => 'contains',
            'value' => 'Out of Office',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "https://portal.timetoreply.com/api/tools/company/calendar-sync-settings" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"operator\": \"contains\",
    \"value\": \"Out of Office\"
}"

Example response (200):

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

{
    "company_id": 1,
    "operator": "contains",
    "value": "Out of Office",
    "updated_at": "2024-02-09 12:33:08",
    "created_at": "2024-02-09 12:33:08",
    "id": 2
}
 

Request   

POST api/tools/company/calendar-sync-settings

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

operator   string   

The operator to use for the value. Example: contains

value   string   

The value to use for the operator. Example: Out of Office

Calendar Sync Settings - Update

requires authentication

Update an existing calendar sync setting

Example request:
const url = new URL(
    "https://portal.timetoreply.com/api/tools/company/calendar-sync-settings/1"
);

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

let body = {
    "operator": "contains",
    "value": "Out of Office"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/tools/company/calendar-sync-settings/1';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'operator' => 'contains',
            'value' => 'Out of Office',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request PUT \
    "https://portal.timetoreply.com/api/tools/company/calendar-sync-settings/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"operator\": \"contains\",
    \"value\": \"Out of Office\"
}"

Example response (200):


{
    "id": 1,
    "company_id": 1,
    "operator": "contains",
    "value": "Out of Office",
    "created_at": "2024-01-01 00:00:00",
    "updated_at": "2024-01-01 00:00:00"
}
 

Request   

PUT api/tools/company/calendar-sync-settings/{id}

PATCH api/tools/company/calendar-sync-settings/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the calendar sync setting. Example: 1

Body Parameters

operator   string   

The operator to use for the value. Example: contains

value   string   

The value to use for the operator. Example: Out of Office

Leave Days

Leave Days - Store Range

requires authentication

Store a range of leave days

Example request:
const url = new URL(
    "https://portal.timetoreply.com/api/tools/company/leave-days/range"
);

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

let body = {
    "from": "2020-01-01",
    "to": "2020-01-31",
    "type": "leave",
    "forModel": "company"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/tools/company/leave-days/range';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'from' => '2020-01-01',
            'to' => '2020-01-31',
            'type' => 'leave',
            'forModel' => 'company',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "https://portal.timetoreply.com/api/tools/company/leave-days/range" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"from\": \"2020-01-01\",
    \"to\": \"2020-01-31\",
    \"type\": \"leave\",
    \"forModel\": \"company\"
}"

Example response (200):

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

[
    {
        "id": 1,
        "type": "leave",
        "date": "2020-01-01 00:00:00"
    },
    {
        "id": 2,
        "type": "leave",
        "date": "2020-01-02 00:00:00"
    },
    {
        "id": 3,
        "type": "leave",
        "date": "2020-01-03 00:00:00"
    },
    {
        "id": 4,
        "type": "leave",
        "date": "2020-01-04 00:00:00"
    },
    {
        "id": 5,
        "type": "leave",
        "date": "2020-01-05 00:00:00"
    },
    {
        "date": "2020-01-06 00:00:00",
        "type": "leave",
        "id": 6
    },
    {
        "date": "2020-01-07 00:00:00",
        "type": "leave",
        "id": 7
    },
    {
        "date": "2020-01-08 00:00:00",
        "type": "leave",
        "id": 8
    },
    {
        "date": "2020-01-09 00:00:00",
        "type": "leave",
        "id": 9
    },
    {
        "date": "2020-01-10 00:00:00",
        "type": "leave",
        "id": 10
    },
    {
        "date": "2020-01-11 00:00:00",
        "type": "leave",
        "id": 11
    },
    {
        "date": "2020-01-12 00:00:00",
        "type": "leave",
        "id": 12
    },
    {
        "date": "2020-01-13 00:00:00",
        "type": "leave",
        "id": 13
    },
    {
        "date": "2020-01-14 00:00:00",
        "type": "leave",
        "id": 14
    },
    {
        "date": "2020-01-15 00:00:00",
        "type": "leave",
        "id": 15
    },
    {
        "date": "2020-01-16 00:00:00",
        "type": "leave",
        "id": 16
    },
    {
        "date": "2020-01-17 00:00:00",
        "type": "leave",
        "id": 17
    },
    {
        "date": "2020-01-18 00:00:00",
        "type": "leave",
        "id": 18
    },
    {
        "date": "2020-01-19 00:00:00",
        "type": "leave",
        "id": 19
    },
    {
        "date": "2020-01-20 00:00:00",
        "type": "leave",
        "id": 20
    },
    {
        "date": "2020-01-21 00:00:00",
        "type": "leave",
        "id": 21
    },
    {
        "date": "2020-01-22 00:00:00",
        "type": "leave",
        "id": 22
    },
    {
        "date": "2020-01-23 00:00:00",
        "type": "leave",
        "id": 23
    },
    {
        "date": "2020-01-24 00:00:00",
        "type": "leave",
        "id": 24
    },
    {
        "date": "2020-01-25 00:00:00",
        "type": "leave",
        "id": 25
    },
    {
        "date": "2020-01-26 00:00:00",
        "type": "leave",
        "id": 26
    },
    {
        "date": "2020-01-27 00:00:00",
        "type": "leave",
        "id": 27
    },
    {
        "date": "2020-01-28 00:00:00",
        "type": "leave",
        "id": 28
    },
    {
        "date": "2020-01-29 00:00:00",
        "type": "leave",
        "id": 29
    },
    {
        "date": "2020-01-30 00:00:00",
        "type": "leave",
        "id": 30
    },
    {
        "date": "2020-01-31 00:00:00",
        "type": "leave",
        "id": 31
    }
]
 

Request   

POST api/tools/company/leave-days/range

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

from   string   

The from date for the range of leave days in the format "YYYY-MM-DD". Example: 2020-01-01

to   string   

The to date for the range of leave days in the format "YYYY-MM-DD". Example: 2020-01-31

type   string   

The type of leave day. Can be either leave or working. Example: leave

forModel   string   

The model type, can be 'company' or 'agent'. Example: company

modelId   integer  optional  

The ID of the mailbox/agent to add the leave day to if using agent as model type.

Leave Days - Store

requires authentication

Store a Leave Day

Example request:
const url = new URL(
    "https://portal.timetoreply.com/api/tools/company/leave-days"
);

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

let body = {
    "year": "2020",
    "month": "Jan",
    "day": "01",
    "forModel": "company"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/tools/company/leave-days';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'year' => '2020',
            'month' => 'Jan',
            'day' => '01',
            'forModel' => 'company',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "https://portal.timetoreply.com/api/tools/company/leave-days" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"year\": \"2020\",
    \"month\": \"Jan\",
    \"day\": \"01\",
    \"forModel\": \"company\"
}"

Example response (200):

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

{
    "id": 1,
    "type": "leave",
    "date": "2020-01-01 00:00:00"
}
 

Request   

POST api/tools/company/leave-days

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

year   string   

The Year for the leave day in the format "YYYY". Example: 2020

month   string   

The month for the leave day in the format "Mon". Example: Jan

day   string   

The day for the leave day in the format "DD". Example: 01

forModel   string   

The model type, can be 'company' or 'agent'. Example: company

modelId   integer  optional  

The ID of the mailbox/agent to add the leave day to if using agent as model type.

Leave Days - Delete

requires authentication

Delete a leave day

Example request:
const url = new URL(
    "https://portal.timetoreply.com/api/tools/company/leave-days/1"
);

const params = {
    "forModel": "company",
};
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: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/tools/company/leave-days/1';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'forModel' => 'company',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request DELETE \
    "https://portal.timetoreply.com/api/tools/company/leave-days/1?forModel=company" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Example response (200):


{
    "status": "Leave day removed."
}
 

Request   

DELETE api/tools/company/leave-days/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the leave day. Example: 1

leave_day_id   integer   

The ID of the Leave Day to delete. Example: 1

Query Parameters

forModel   string   

The model type, can be 'company' or 'agent'. Example: company

modelId   integer  optional  

The ID of the mailbox/agent to remove the leave day from if using agent as model type.

Users

Users - Invite

requires authentication

Invite a new user

Example request:
const url = new URL(
    "https://portal.timetoreply.com/api/tools/users/invite-user"
);

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

let body = {
    "name": "Peter Rabbit",
    "email": "[email protected]",
    "role": "Restricted Manager",
    "agentPermissions": [
        1
    ],
    "teamPermissions": [
        1
    ],
    "groupPermissions": [
        1
    ],
    "customerGroupPermissions": [
        1
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/tools/users/invite-user';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'Peter Rabbit',
            'email' => '[email protected]',
            'role' => 'Restricted Manager',
            'agentPermissions' => [
                1,
            ],
            'teamPermissions' => [
                1,
            ],
            'groupPermissions' => [
                1,
            ],
            'customerGroupPermissions' => [
                1,
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "https://portal.timetoreply.com/api/tools/users/invite-user" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Peter Rabbit\",
    \"email\": \"[email protected]\",
    \"role\": \"Restricted Manager\",
    \"agentPermissions\": [
        1
    ],
    \"teamPermissions\": [
        1
    ],
    \"groupPermissions\": [
        1
    ],
    \"customerGroupPermissions\": [
        1
    ]
}"

Example response (200):

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

{
    "status": "Invitation sent successfully"
}
 

Request   

POST api/tools/users/invite-user

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

name   string  optional  

The name of the User you want to invite. Example: Peter Rabbit

email   string  optional  

The email of the User you want to invite. Example: [email protected]

role   string  optional  

The name of the Role to give to the user. Example: Restricted Manager

agentPermissions   integer[]  optional  

The IDs of the agents to grant this user permissions for. Only used for Restricted Manager Role.

teamPermissions   integer[]  optional  

The IDs of the Teams to grant this user permissions for. Only used for Restricted Manager Role.

groupPermissions   integer[]  optional  

The IDs of the Groups Mailbox to grant this user permissions for. Only used for Restricted Manager Role.

customerGroupPermissions   integer[]  optional  

The IDs of the Contact Groups to grant this user permissions for. Only used for Restricted Manager Role.

Users - Resend Invite

requires authentication

Resend Invitation to a new user

Example request:
const url = new URL(
    "https://portal.timetoreply.com/api/tools/users/invite-user/1"
);

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

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/tools/users/invite-user/1';
$response = $client->post(
    $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 POST \
    "https://portal.timetoreply.com/api/tools/users/invite-user/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: []
 

{
    "status": "Invitation deleted successfully"
}
 

Request   

POST api/tools/users/invite-user/{user_invite_id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

user_invite_id   string  optional  

The ID of the userInvite you want to send the reminder to. Example: 1

Users - Delete Invite

requires authentication

Delete Invitation to a new user

Example request:
const url = new URL(
    "https://portal.timetoreply.com/api/tools/users/invite-user/1"
);

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

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/tools/users/invite-user/1';
$response = $client->delete(
    $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 DELETE \
    "https://portal.timetoreply.com/api/tools/users/invite-user/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Example response (200):


{
    "status": "Invitation deleted successfully"
}
 

Request   

DELETE api/tools/users/invite-user/{user_invite_id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

user_invite_id   string  optional  

The ID of the userInvite you want to delete. Example: 1

Roles - List

requires authentication

List all possible roles

Example request:
const url = new URL(
    "https://portal.timetoreply.com/api/tools/users/roles"
);

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/tools/users/roles';
$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/tools/users/roles" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Example response (200):


[
    {
        "id": 2,
        "name": "company_admin",
        "description": "Company Administrator"
    },
    {
        "id": 3,
        "name": "manager",
        "description": "Company Manager"
    },
    {
        "id": 4,
        "name": "restricted_manager",
        "description": "Restricted Manager"
    },
    {
        "id": 5,
        "name": "agent",
        "description": "Company Agent"
    }
]
 

Request   

GET api/tools/users/roles

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Users - Show

requires authentication

Get a user, their role and their permissions

Example request:
const url = new URL(
    "https://portal.timetoreply.com/api/tools/users/1"
);

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/tools/users/1';
$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/tools/users/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Example response (200):


{
    "id": 1,
    "firstname": "Peter",
    "lastname": "Rabbit",
    "email": "[email protected]",
    "phone": null,
    "country_code": null,
    "active": true,
    "company_id": 1,
    "created_at": "2020-01-01 00:00:00",
    "updated_at": "2020-01-01 00:00:00",
    "last_login_at": null,
    "last_login_ip": null,
    "provider": null,
    "provider_id": null,
    "complete_name": "Peter Rabbit",
    "php_time_zone": "UTC",
    "company": "TimeToReply",
    "timezone": "UTC",
    "role": "Company Administrator",
    "agentPermissions": [],
    "groupPermissions": [],
    "teamPermissions": [],
    "customerGroupPermissions": []
}
 

Request   

GET api/tools/users/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the user. Example: 1

user_id   integer   

The ID of the user to get. Example: 7

Users - Update

requires authentication

Update a user

Example request:
const url = new URL(
    "https://portal.timetoreply.com/api/tools/users/1"
);

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

let body = {
    "role": "Restricted Manager",
    "agentPermissions": [
        1
    ],
    "teamPermissions": [
        1
    ],
    "groupPermissions": [
        1
    ],
    "customerGroupPermissions": [
        1
    ]
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/tools/users/1';
$response = $client->patch(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'role' => 'Restricted Manager',
            'agentPermissions' => [
                1,
            ],
            'teamPermissions' => [
                1,
            ],
            'groupPermissions' => [
                1,
            ],
            'customerGroupPermissions' => [
                1,
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request PATCH \
    "https://portal.timetoreply.com/api/tools/users/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"role\": \"Restricted Manager\",
    \"agentPermissions\": [
        1
    ],
    \"teamPermissions\": [
        1
    ],
    \"groupPermissions\": [
        1
    ],
    \"customerGroupPermissions\": [
        1
    ]
}"

Example response (200):


{
    "id": 1,
    "firstname": "Peter",
    "lastname": "Rabbit",
    "email": "[email protected]",
    "phone": null,
    "country_code": null,
    "active": true,
    "company_id": 1,
    "created_at": "2020-01-01 00:00:00",
    "updated_at": "2020-01-01 00:00:00",
    "last_login_at": null,
    "last_login_ip": null,
    "provider": null,
    "provider_id": null,
    "complete_name": "Peter Rabbit",
    "php_time_zone": "UTC",
    "company": "TimeToReply",
    "timezone": "UTC",
    "role": "Company Administrator",
    "agentPermissions": [],
    "groupPermissions": [],
    "teamPermissions": [],
    "customerGroupPermissions": []
}
 

Request   

PATCH api/tools/users/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the user. Example: 1

user_id   integer   

The ID of the user to update. Example: 7

Body Parameters

role   string  optional  

The name of the Role to give to the user. Example: Restricted Manager

agentPermissions   integer[]  optional  

The IDs of the agents to grant this user permissions for. Only used for Restricted Manager Role.

teamPermissions   integer[]  optional  

The IDs of the Teams to grant this user permissions for. Only used for Restricted Manager Role.

groupPermissions   integer[]  optional  

The IDs of the Groups Mailbox to grant this user permissions for. Only used for Restricted Manager Role.

customerGroupPermissions   integer[]  optional  

The IDs of the Contact Groups to grant this user permissions for. Only used for Restricted Manager Role.

Users - Delete

requires authentication

Removes a user from your company (their user account will still exist, but it can no longer access your company data)

Example request:
const url = new URL(
    "https://portal.timetoreply.com/api/tools/users/1"
);

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

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/tools/users/1';
$response = $client->delete(
    $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 DELETE \
    "https://portal.timetoreply.com/api/tools/users/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Example response (200):


{
    "status": "User removed from company successfully."
}
 

Request   

DELETE api/tools/users/{user_id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

user_id   integer   

The ID of the user to delete. Example: 1

Users - List

requires authentication

List users

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

const params = {
    "sort_by": "name",
    "direction": "asc",
    "per_page": "2",
    "page": "1",
    "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/tools/users';
$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',
            'search' => 'peter',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://portal.timetoreply.com/api/tools/users?sort_by=name&direction=asc&per_page=2&page=1&search=peter" \
    --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": [],
    "first_page_url": "https://portal.timetoreply.com/api/tools/users?direction=desc&per_page=2&search=peter&page=1",
    "from": null,
    "last_page": 1,
    "last_page_url": "https://portal.timetoreply.com/api/tools/users?direction=desc&per_page=2&search=peter&page=1",
    "links": [
        {
            "url": null,
            "label": "« Previous",
            "active": false
        },
        {
            "url": "https://portal.timetoreply.com/api/tools/users?direction=desc&per_page=2&search=peter&page=1",
            "label": "1",
            "active": true
        },
        {
            "url": null,
            "label": "Next »",
            "active": false
        }
    ],
    "next_page_url": null,
    "path": "https://portal.timetoreply.com/api/tools/users",
    "per_page": 2,
    "prev_page_url": null,
    "to": null,
    "total": 0
}
 

Request   

GET api/tools/users

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 users 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. Example: peter

Deal Stages

Deal Stages - List

requires authentication

Get a list of deal stages

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

const params = {
    "search": "New",
    "closing": "1",
    "sort_by": "display_name",
    "direction": "asc",
};
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/sales/deal-stages';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'search' => 'New',
            'closing' => '1',
            'sort_by' => 'display_name',
            'direction' => 'asc',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://portal.timetoreply.com/api/sales/deal-stages?search=New&closing=1&sort_by=display_name&direction=asc" \
    --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: []
 

{
    "columns": [
        {
            "field": "display_name",
            "label": "Display Name",
            "visible": true,
            "meta": []
        },
        {
            "field": "probability",
            "label": "Probability",
            "visible": true,
            "meta": []
        },
        {
            "field": "closing",
            "label": "Closing",
            "visible": true,
            "meta": []
        },
        {
            "field": "percentage_locked",
            "label": "Percentage Locked",
            "visible": false,
            "meta": []
        },
        {
            "field": "deal_stage_override",
            "label": "Deal Stage Override",
            "visible": false,
            "meta": []
        },
        {
            "field": "deals",
            "label": "Deals",
            "visible": true,
            "meta": []
        }
    ],
    "data": [],
    "default_sort": [
        "display_name",
        "asc"
    ],
    "default_sort_direction": "desc",
    "loading": false,
    "per_page": 2,
    "total": 0,
    "page": 1,
    "stages": [],
    "closing_count": 0,
    "not_closing_count": 0,
    "filters": {
        "search": "New",
        "closing": true,
        "sort_by": "display_name",
        "sort_direction": "asc"
    }
}
 

Request   

GET api/sales/deal-stages

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

search   string  optional  

Search string. Example: New

closing   boolean  optional  

Filter by closing stages. Example: true

sort_by   string  optional  

Sort by column. Example: display_name

direction   string  optional  

Sort direction. Example: asc

Deal Stages - Update

requires authentication

Edit a Deal stage

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

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

let body = {
    "display_name": "Proposal sent",
    "probability": 0,
    "closing": true
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/sales/deal-stages/1';
$response = $client->patch(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'display_name' => 'Proposal sent',
            'probability' => 0,
            'closing' => true,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request PATCH \
    "https://portal.timetoreply.com/api/sales/deal-stages/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"display_name\": \"Proposal sent\",
    \"probability\": 0,
    \"closing\": true
}"

Example response (200):


success
 

Request   

PATCH api/sales/deal-stages/{deal_stage_id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

deal_stage_id   integer   

The ID of the deal stage you would like to edit. Example: 1

Body Parameters

display_name   string   

The name of the deal stage. Example: Proposal sent

probability   integer   

The probability of winning a deal at this deal stage between 0 and 1. Example: 0

closing   boolean   

The closing status (true/false). Example: true

Deal Stages - Delete

requires authentication

Delete a deal stage

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

const params = {
    "new_deal_stage_id": "2",
    "skip_reassign": "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: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/sales/deal-stages/1';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'new_deal_stage_id' => '2',
            'skip_reassign' => '1',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request DELETE \
    "https://portal.timetoreply.com/api/sales/deal-stages/1?new_deal_stage_id=2&skip_reassign=1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Example response (200):


{
    "status": "Deal stage deleted successfully"
}
 

Request   

DELETE api/sales/deal-stages/{deal_stage_id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

deal_stage_id   integer   

The ID of the deal stage you would like to delete. Example: 1

Query Parameters

new_deal_stage_id   integer   

The ID of the deal stage you would like to reassign existing deals to. Example: 2

skip_reassign   boolean  optional  

skip reassign existing deals. Example: true