MENU navbar-image
javascript php

Introduction

This API is designed to let you do (almost) everything you can do from the timetoreply portal programatically 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.

Base URL

https://portal.timetoreply.com

Authenticating requests

This API is authenticated by sending 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

Entities

Authentication Invites - Delete

requires authentication

Delete an Authentication Invitation

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

let 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();
$response = $client->delete(
    'https://portal.timetoreply.com/api/entities/agents/invite/1',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

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

Request   

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

URL Parameters

authentication_invite  integer  

The ID of the Authentication invite.

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"
);

let 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();
$response = $client->patch(
    'https://portal.timetoreply.com/api/entities/agents/remind/1',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

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}

URL Parameters

authentication_invite  integer  

The ID of the Authentication invite.

Customer Groups - Add Domain

requires authentication

Add A Domain To A Customer Group

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

let 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();
$response = $client->patch(
    'https://portal.timetoreply.com/api/entities/customer-groups/1/pushDomain',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
        ],
        'json' => [
            'domain' => 'example.com',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

Show headers
            cache-control: no-cache, private
content-type: application/json
tracking-events: []
 
            
                
{
    "id": 1,
    "name": "Top Revenue Customers",
    "members": {
        "emails": [
            "jesus59@ferry.com",
            "rlynch@gleason.com"
        ],
        "domains": [
            "schumm.com",
            "armstrong.biz",
            "example.com"
        ]
    }
}
 
        

Request   

PATCH api/entities/customer-groups/{customer_group}/pushDomain

URL Parameters

customer_group  integer  

The ID of the customer group.

Body Parameters

domain  string  

The domain you would like to add.

Customer Groups - Add Email

requires authentication

Add An Email To A Customer Group

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

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

let body = {
    "email": "example@example.com"
}

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

Example response (200):

Show headers
            cache-control: no-cache, private
content-type: application/json
tracking-events: []
 
            
                
{
    "id": 1,
    "name": "Top Revenue Customers",
    "members": {
        "emails": [
            "jesus59@ferry.com",
            "rlynch@gleason.com",
            "example@example.com"
        ],
        "domains": [
            "schumm.com",
            "armstrong.biz"
        ]
    }
}
 
        

Request   

PATCH api/entities/customer-groups/{customer_group}/pushEmail

URL Parameters

customer_group  integer  

The ID of the customer group.

Body Parameters

email  string  

The email you would like to add.

Customer Groups - Delete

requires authentication

Delete a Customer Group

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

let 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();
$response = $client->delete(
    'https://portal.timetoreply.com/api/entities/customer-groups/1',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

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

Request   

DELETE api/entities/customer-groups/{customer_group}

URL Parameters

customer_group  integer  

The ID of the customer group.

Customer Groups - Delete Domain

requires authentication

Remove A Domain From A Customer Group

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

let 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();
$response = $client->patch(
    'https://portal.timetoreply.com/api/entities/customer-groups/1/removeDomain',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
        ],
        'json' => [
            'domain' => 'example.com',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

Show headers
            cache-control: no-cache, private
content-type: application/json
tracking-events: []
 
            
                
{
    "id": 1,
    "name": "Top Revenue Customers",
    "members": {
        "emails": [
            "jesus59@ferry.com",
            "rlynch@gleason.com"
        ],
        "domains": [
            "schumm.com",
            "armstrong.biz"
        ]
    }
}
 
        

Request   

PATCH api/entities/customer-groups/{customer_group}/removeDomain

URL Parameters

customer_group  integer  

The ID of the customer group.

Body Parameters

domain  string  

The domain you would like to remove.

Customer Groups - Delete Email

requires authentication

Remove An Email From A Customer Group

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

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

let body = {
    "email": "example@example.com"
}

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

Example response (200):

Show headers
            cache-control: no-cache, private
content-type: application/json
tracking-events: []
 
            
                
{
    "id": 1,
    "name": "Top Revenue Customers",
    "members": {
        "emails": [
            "jesus59@ferry.com",
            "rlynch@gleason.com"
        ],
        "domains": [
            "schumm.com",
            "armstrong.biz"
        ]
    }
}
 
        

Request   

PATCH api/entities/customer-groups/{customer_group}/removeEmail

URL Parameters

customer_group  integer  

The ID of the customer group.

Body Parameters

email  string  

The email you would like to remove.

Customer Groups - List

requires authentication

List all Customer Groups

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

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

let 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();
$response = $client->get(
    'https://portal.timetoreply.com/api/entities/customer-groups',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
        ],
        'query' => [
            'sort_by'=> 'name',
            'direction'=> 'asc',
            'per_page'=> '15',
            'page'=> '1',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

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": [
                "jesus59@ferry.com",
                "rlynch@gleason.com"
            ],
            "customer_domains": [
                "schumm.com",
                "armstrong.biz"
            ],
            "user_permissions": [
                7
            ],
            "search_string": "Top Revenue Customers jesus59@ferry.com rlynch@gleason.com schumm.com armstrong.biz"
        },
        {
            "id": 2,
            "company_id": 1,
            "name": "Hubspot Customer Group",
            "crm_type": "hubspot",
            "customer_emails": [
                "pwitting@prohaska.com",
                "gabe.cruickshank@klocko.com"
            ],
            "customer_domains": [
                "waters.com",
                "hegmann.com"
            ],
            "user_permissions": [],
            "search_string": "Hubspot Customer Group pwitting@prohaska.com gabe.cruickshank@klocko.com waters.com hegmann.com"
        }
    ],
    "first_page_url": "https:\/\/portal.timetoreply.com\/api\/entities\/customer-groups?page=1",
    "from": 1,
    "last_page": 3,
    "last_page_url": "https:\/\/portal.timetoreply.com\/api\/entities\/customer-groups?page=3",
    "links": [
        {
            "url": null,
            "label": "« Previous",
            "active": false
        },
        {
            "url": "https:\/\/portal.timetoreply.com\/api\/entities\/customer-groups?page=1",
            "label": "1",
            "active": true
        },
        {
            "url": "https:\/\/portal.timetoreply.com\/api\/entities\/customer-groups?page=2",
            "label": "2",
            "active": false
        },
        {
            "url": "https:\/\/portal.timetoreply.com\/api\/entities\/customer-groups?page=3",
            "label": "3",
            "active": false
        },
        {
            "url": "https:\/\/portal.timetoreply.com\/api\/entities\/customer-groups?page=2",
            "label": "Next »",
            "active": false
        }
    ],
    "next_page_url": "https:\/\/portal.timetoreply.com\/api\/entities\/customer-groups?page=2",
    "path": "https:\/\/portal.timetoreply.com\/api\/entities\/customer-groups",
    "per_page": 2,
    "prev_page_url": null,
    "to": 2,
    "total": 6
}
 
        

Request   

GET api/entities/customer-groups

Query Parameters

sort_by  string optional  

The field to sort the mailboxes by.

direction  string optional  

Sort asc or desc.

per_page  number optional  

The number of customer groups to show per page.

page  number optional  

The page number.

search  string optional  

Optional search string.

Customer Groups - Remove Members

requires authentication

Remove An Email From A Customer Group

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

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

let body = {
    "membersToRemove": [
        "vel",
        "numquam"
    ]
}

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->patch(
    'https://portal.timetoreply.com/api/entities/customer-groups/1/removeMembers',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
        ],
        'json' => [
            'membersToRemove' => [
                'vel',
                'numquam',
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

Show headers
            cache-control: no-cache, private
content-type: application/json
tracking-events: []
 
            
                
{
    "id": 1,
    "name": "Top Revenue Customers",
    "members": {
        "emails": [
            "jesus59@ferry.com",
            "rlynch@gleason.com"
        ],
        "domains": [
            "schumm.com",
            "armstrong.biz"
        ]
    }
}
 
        

Request   

PATCH api/entities/customer-groups/{customer_group}/removeMembers

URL Parameters

customer_group  integer  

The ID of the customer group.

Body Parameters

membersToRemove  string[]  

The emails/domains you would like to remove.

Customer Groups - Show

requires authentication

Show a single Customer Group

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

let 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();
$response = $client->get(
    'https://portal.timetoreply.com/api/entities/customer-groups/1',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

Show headers
            cache-control: no-cache, private
content-type: application/json
tracking-events: []
 
            
                
{
    "id": 1,
    "name": "Top Revenue Customers",
    "email_usernames": [
        "jesus59@ferry.com",
        "rlynch@gleason.com"
    ],
    "customer_domains": [
        "schumm.com",
        "armstrong.biz"
    ],
    "model_type": "Customer Group",
    "icon": "user-friends"
}
 
        

Request   

GET api/entities/customer-groups/{customer_group}

URL Parameters

customer_group  integer  

The ID of the customer group.

Customer Groups - Store

requires authentication

Store a Customer Group

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

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

let body = {
    "name": "Top Customers",
    "emails": [
        "customer_one@example.net"
    ],
    "domains": [
        "example.com"
    ]
}

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://portal.timetoreply.com/api/entities/customer-groups',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'Top Customers',
            'emails' => [
                'customer_one@example.net',
            ],
            'domains' => [
                'example.com',
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

Show headers
            cache-control: no-cache, private
content-type: application/json
tracking-events: []
 
            
                
{
    "id": 7,
    "name": "Top Customers",
    "members": {
        "emails": [
            "customer_one@example.net"
        ],
        "domains": [
            "example.com"
        ]
    }
}
 
        

Request   

POST api/entities/customer-groups

Body Parameters

name  string  

The name of the Customer Group.

emails  string[] optional  

An array of customer email addresses.

domains  string[] optional  

An array of customer domains.

upload  file optional  

A CSV of customer domains and/or emails.

Customer Groups - Update

requires authentication

Update a Customer Group

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

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

let body = {
    "name": "Top Customers",
    "emails": [
        "customer_one@example.net"
    ],
    "domains": [
        "example.com"
    ]
}

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->put(
    'https://portal.timetoreply.com/api/entities/customer-groups/1',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'Top Customers',
            'emails' => [
                'customer_one@example.net',
            ],
            'domains' => [
                'example.com',
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

Show headers
            cache-control: no-cache, private
content-type: application/json
tracking-events: []
 
            
                
{
    "id": 1,
    "name": "Top Customers",
    "members": {
        "emails": [
            "customer_one@example.net"
        ],
        "domains": [
            "example.com"
        ]
    }
}
 
        

Request   

PUT api/entities/customer-groups/{customer_group}

PATCH api/entities/customer-groups/{customer_group}

URL Parameters

customer_group  integer  

The ID of the Customer Group to update.

Body Parameters

name  string  

The name of the Customer Group.

emails  string[] optional  

An array of customer email addresses.

domains  string[] optional  

An array of customer domains.

upload  file optional  

A CSV of customer domains and/or emails.

Customers - Delete

requires authentication

Delete a customer

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

let 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();
$response = $client->delete(
    'https://portal.timetoreply.com/api/entities/customers/1',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

                
{
    "status": "Customer deleted."
}
 
        

Request   

DELETE api/entities/customers/{customer}

URL Parameters

customer  integer  

The ID of the customer to Delete.

Customers - List

requires authentication

Get all existing customers.

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

let params = {
    "per_page": "25",
    "page": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

let 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();
$response = $client->get(
    'https://portal.timetoreply.com/api/entities/customers',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
        ],
        'query' => [
            'per_page'=> '25',
            'page'=> '1',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

Show headers
            cache-control: no-cache, private
content-type: application/json
tracking-events: []
 
            
                
{
    "current_page": 1,
    "data": [
        {
            "id": 1,
            "name": "top@customer.com",
            "email_usernames": [
                "top@customer.com"
            ],
            "model_type": "Customer",
            "icon": "user"
        },
        {
            "id": 2,
            "name": "customer.com",
            "email_usernames": [
                "customer.com"
            ],
            "model_type": "Customer",
            "icon": "user"
        }
    ],
    "first_page_url": "https:\/\/portal.timetoreply.com\/api\/entities\/customers?page=1",
    "from": 1,
    "last_page": 180,
    "last_page_url": "https:\/\/portal.timetoreply.com\/api\/entities\/customers?page=180",
    "links": [
        {
            "url": null,
            "label": "« Previous",
            "active": false
        },
        {
            "url": "https:\/\/portal.timetoreply.com\/api\/entities\/customers?page=1",
            "label": "1",
            "active": true
        },
        {
            "url": "https:\/\/portal.timetoreply.com\/api\/entities\/customers?page=2",
            "label": "2",
            "active": false
        },
        {
            "url": "https:\/\/portal.timetoreply.com\/api\/entities\/customers?page=3",
            "label": "3",
            "active": false
        },
        {
            "url": "https:\/\/portal.timetoreply.com\/api\/entities\/customers?page=4",
            "label": "4",
            "active": false
        },
        {
            "url": "https:\/\/portal.timetoreply.com\/api\/entities\/customers?page=5",
            "label": "5",
            "active": false
        },
        {
            "url": "https:\/\/portal.timetoreply.com\/api\/entities\/customers?page=6",
            "label": "6",
            "active": false
        },
        {
            "url": "https:\/\/portal.timetoreply.com\/api\/entities\/customers?page=7",
            "label": "7",
            "active": false
        },
        {
            "url": "https:\/\/portal.timetoreply.com\/api\/entities\/customers?page=8",
            "label": "8",
            "active": false
        },
        {
            "url": "https:\/\/portal.timetoreply.com\/api\/entities\/customers?page=9",
            "label": "9",
            "active": false
        },
        {
            "url": "https:\/\/portal.timetoreply.com\/api\/entities\/customers?page=10",
            "label": "10",
            "active": false
        },
        {
            "url": null,
            "label": "...",
            "active": false
        },
        {
            "url": "https:\/\/portal.timetoreply.com\/api\/entities\/customers?page=179",
            "label": "179",
            "active": false
        },
        {
            "url": "https:\/\/portal.timetoreply.com\/api\/entities\/customers?page=180",
            "label": "180",
            "active": false
        },
        {
            "url": "https:\/\/portal.timetoreply.com\/api\/entities\/customers?page=2",
            "label": "Next »",
            "active": false
        }
    ],
    "next_page_url": "https:\/\/portal.timetoreply.com\/api\/entities\/customers?page=2",
    "path": "https:\/\/portal.timetoreply.com\/api\/entities\/customers",
    "per_page": 2,
    "prev_page_url": null,
    "to": 2,
    "total": 360
}
 
        

Request   

GET api/entities/customers

Query Parameters

per_page  integer optional  

For paginated results, how many results per page. Max 200.

page  integer optional  

For paginated results, which page to get.

Customers - Store

requires authentication

Store a new customer

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

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

let body = {
    "name": "customer@example.com"
}

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://portal.timetoreply.com/api/entities/customers',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'customer@example.com',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

Show headers
            cache-control: no-cache, private
content-type: application/json
tracking-events: []
 
            
                
{
    "type": "email",
    "name": "customer@example.com",
    "id": 361
}
 
        

Request   

POST api/entities/customers

Body Parameters

name  string optional  

The email address or domain of the Customer.

Entities - IT Help

requires authentication

Request Help from your IT team to set up timetoreply

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

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

let body = {
    "name": "Peter Rabbit",
    "email": "peter.rabbit@gmail.com",
    "message": "in"
}

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://portal.timetoreply.com/api/entities/agents/it-help',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'Peter Rabbit',
            'email' => 'peter.rabbit@gmail.com',
            'message' => 'in',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (202):

Show headers
            cache-control: no-cache, private
content-type: application/json
tracking-events: []
 
            
                
{
    "status": "Email Sent successfully"
}
 
        

Request   

POST api/entities/agents/it-help

Body Parameters

name  string  

The name of your friendly IT person.

email  string  

The email of your friendly IT person.

message  string optional  

An optional message to give to your IT person

requires authentication

Searches your company entities

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

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

let 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();
$response = $client->get(
    'https://portal.timetoreply.com/api/entities/search',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
        ],
        'query' => [
            'per_page'=> '2',
            'page'=> '1',
            'search'=> 'Top Revenue',
            'type'=> 'all',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

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": [
                "jesus59@ferry.com",
                "rlynch@gleason.com"
            ],
            "customer_domains": [
                "schumm.com",
                "armstrong.biz"
            ],
            "model_type": "Customer Group",
            "icon": "user-friends"
        },
        {
            "id": 1,
            "name": "top@customer.com",
            "email_usernames": [
                "top@customer.com"
            ],
            "model_type": "Customer",
            "icon": "user"
        }
    ],
    "first_page_url": "https:\/\/portal.timetoreply.com\/api\/entities\/search?page=1",
    "from": 1,
    "last_page": 1,
    "last_page_url": "https:\/\/portal.timetoreply.com\/api\/entities\/search?page=1",
    "links": [
        {
            "url": null,
            "label": "« Previous",
            "active": false
        },
        {
            "url": "https:\/\/portal.timetoreply.com\/api\/entities\/search?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
}
 
        

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"
);

let 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();
$response = $client->get(
    'https://portal.timetoreply.com/api/tools/settings/message-filters/all-thread-filter-data',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

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": 1,
            "name": "Peter Rabbit",
            "email_usernames": [
                "h.herman@timetoreply.com",
                "alias@example.net"
            ],
            "model_type": "Agent",
            "icon": "user-plus"
        },
        {
            "id": 2,
            "name": "Lelia Turner",
            "email_usernames": [
                "l.turner@timetoreply.com"
            ],
            "model_type": "Agent",
            "icon": "user-plus"
        },
        {
            "id": 3,
            "name": "Nicolette Ullrich",
            "email_usernames": [
                "n.ullrich@timetoreply.com"
            ],
            "model_type": "Agent",
            "icon": "user-plus"
        }
    ],
    "teams": [
        {
            "id": 1,
            "name": "US Sales Team",
            "email_usernames": [
                "h.herman@timetoreply.com",
                "l.turner@timetoreply.com",
                "n.ullrich@timetoreply.com"
            ],
            "model_type": "Team",
            "icon": "handshake"
        }
    ],
    "group_mailboxes": [
        {
            "id": 1,
            "name": "Support",
            "email_usernames": [
                "support@timetoreply.com",
                "h.herman@timetoreply.com",
                "l.turner@timetoreply.com",
                "n.ullrich@timetoreply.com"
            ],
            "model_type": "Group Mailbox",
            "icon": "users"
        },
        {
            "id": 2,
            "name": "Sales Mailbox",
            "email_usernames": [
                "sales@example.net",
                "info@example.net"
            ],
            "model_type": "Group Mailbox",
            "icon": "users"
        }
    ],
    "customer_groups": [
        {
            "id": 1,
            "name": "Top Revenue Customers",
            "email_usernames": [
                "jesus59@ferry.com",
                "rlynch@gleason.com"
            ],
            "customer_domains": [
                "schumm.com",
                "armstrong.biz"
            ],
            "model_type": "Customer Group",
            "icon": "user-friends"
        },
        {
            "id": 2,
            "name": "Hubspot Customer Group",
            "email_usernames": [],
            "customer_domains": [],
            "model_type": "Customer Group",
            "icon": "user-friends"
        },
        {
            "id": 3,
            "name": "Active Campaign Customer Group",
            "email_usernames": [
                "kovacek.richmond@schumm.com",
                "wiegand.aric@rodriguez.com"
            ],
            "customer_domains": [
                "breitenberg.com",
                "schinner.com"
            ],
            "model_type": "Customer Group",
            "icon": "user-friends"
        },
        {
            "id": 4,
            "name": "Maropost Customer Group",
            "email_usernames": [
                "eve.wehner@pagac.com",
                "weimann.anibal@herman.org"
            ],
            "customer_domains": [
                "kunze.org",
                "waters.com"
            ],
            "model_type": "Customer Group",
            "icon": "user-friends"
        },
        {
            "id": 5,
            "name": "Constant Contact Customer Group",
            "email_usernames": [
                "graham.samanta@cormier.com",
                "bfarrell@dietrich.com"
            ],
            "customer_domains": [
                "turner.com",
                "schinner.com"
            ],
            "model_type": "Customer Group",
            "icon": "user-friends"
        },
        {
            "id": 6,
            "name": "Salesforce Customer Group",
            "email_usernames": [
                "dorthy02@roob.org",
                "dax.powlowski@runte.org"
            ],
            "customer_domains": [
                "okeefe.info",
                "emard.com"
            ],
            "model_type": "Customer Group",
            "icon": "user-friends"
        },
        {
            "id": 7,
            "name": "Top Customers",
            "email_usernames": [
                "customer_one@example.net"
            ],
            "customer_domains": [
                "example.com"
            ],
            "model_type": "Customer Group",
            "icon": "user-friends"
        }
    ],
    "customers": [
        {
            "id": 1,
            "name": "top@customer.com",
            "email_usernames": [
                "top@customer.com"
            ],
            "model_type": "Customer",
            "icon": "user"
        },
        {
            "id": 2,
            "name": "customer.com",
            "email_usernames": [
                "customer.com"
            ],
            "model_type": "Customer",
            "icon": "user"
        },
        {
            "id": 3,
            "name": "ramiro51@hand.com",
            "email_usernames": [
                "ramiro51@hand.com"
            ],
            "model_type": "Customer",
            "icon": "user"
        },
        {
            "id": 4,
            "name": "bins.anabelle@pollich.biz",
            "email_usernames": [
                "bins.anabelle@pollich.biz"
            ],
            "model_type": "Customer",
            "icon": "user"
        },
        {
            "id": 5,
            "name": "martin52@doyle.org",
            "email_usernames": [
                "martin52@doyle.org"
            ],
            "model_type": "Customer",
            "icon": "user"
        },
        {
            "id": 6,
            "name": "tatyana98@donnelly.com",
            "email_usernames": [
                "tatyana98@donnelly.com"
            ],
            "model_type": "Customer",
            "icon": "user"
        },
        {
            "id": 7,
            "name": "vbreitenberg@lakin.com",
            "email_usernames": [
                "vbreitenberg@lakin.com"
            ],
            "model_type": "Customer",
            "icon": "user"
        },
        {
            "id": 8,
            "name": "kasandra.mcclure@ondricka.biz",
            "email_usernames": [
                "kasandra.mcclure@ondricka.biz"
            ],
            "model_type": "Customer",
            "icon": "user"
        },
        {
            "id": 9,
            "name": "enrico16@hessel.com",
            "email_usernames": [
                "enrico16@hessel.com"
            ],
            "model_type": "Customer",
            "icon": "user"
        },
        {
            "id": 10,
            "name": "bertrand55@swaniawski.com",
            "email_usernames": [
                "bertrand55@swaniawski.com"
            ],
            "model_type": "Customer",
            "icon": "user"
        },
        {
            "id": 11,
            "name": "qgibson@douglas.org",
            "email_usernames": [
                "qgibson@douglas.org"
            ],
            "model_type": "Customer",
            "icon": "user"
        },
        {
            "id": 12,
            "name": "ccronin@treutel.com",
            "email_usernames": [
                "ccronin@treutel.com"
            ],
            "model_type": "Customer",
            "icon": "user"
        },
        {
            "id": 13,
            "name": "adrain87@shields.com",
            "email_usernames": [
                "adrain87@shields.com"
            ],
            "model_type": "Customer",
            "icon": "user"
        },
        {
            "id": 14,
            "name": "brown.dagmar@langworth.info",
            "email_usernames": [
                "brown.dagmar@langworth.info"
            ],
            "model_type": "Customer",
            "icon": "user"
        },
        {
            "id": 15,
            "name": "sruecker@sawayn.com",
            "email_usernames": [
                "sruecker@sawayn.com"
            ],
            "model_type": "Customer",
            "icon": "user"
        },
        {
            "id": 16,
            "name": "kulas.isobel@flatley.net",
            "email_usernames": [
                "kulas.isobel@flatley.net"
            ],
            "model_type": "Customer",
            "icon": "user"
        },
        {
            "id": 17,
            "name": "sylvester63@koss.com",
            "email_usernames": [
                "sylvester63@koss.com"
            ],
            "model_type": "Customer",
            "icon": "user"
        },
        {
            "id": 18,
            "name": "zryan@lang.com",
                    "email_usernames": [
                    "zryan@lang.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 19,
                    "name": "kattie.schulist@abernathy.biz",
                    "email_usernames": [
                    "kattie.schulist@abernathy.biz"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 20,
                    "name": "fay.antonette@tromp.com",
                    "email_usernames": [
                    "fay.antonette@tromp.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 21,
                    "name": "nader.lily@grady.com",
                    "email_usernames": [
                    "nader.lily@grady.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 22,
                    "name": "closed@timetoreply.com",
                    "email_usernames": [
                    "closed@timetoreply.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 23,
                    "name": "fkutch@jenkins.com",
                    "email_usernames": [
                    "fkutch@jenkins.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 24,
                    "name": "maybell27@casper.com",
                    "email_usernames": [
                    "maybell27@casper.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 25,
                    "name": "hprosacco@greenfelder.com",
                    "email_usernames": [
                    "hprosacco@greenfelder.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 26,
                    "name": "agottlieb@lind.info",
                    "email_usernames": [
                    "agottlieb@lind.info"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 27,
                    "name": "medhurst.rickie@hackett.net",
                    "email_usernames": [
                    "medhurst.rickie@hackett.net"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 28,
                    "name": "vgleichner@schmidt.com",
                    "email_usernames": [
                    "vgleichner@schmidt.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 29,
                    "name": "tania.adams@casper.com",
                    "email_usernames": [
                    "tania.adams@casper.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 30,
                    "name": "jannie87@nikolaus.com",
                    "email_usernames": [
                    "jannie87@nikolaus.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 31,
                    "name": "alexzander.schuster@rau.com",
                    "email_usernames": [
                    "alexzander.schuster@rau.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 32,
                    "name": "amely.braun@pfannerstill.info",
                    "email_usernames": [
                    "amely.braun@pfannerstill.info"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 33,
                    "name": "cmraz@grimes.com",
                    "email_usernames": [
                    "cmraz@grimes.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 34,
                    "name": "elijah.schimmel@sanford.com",
                    "email_usernames": [
                    "elijah.schimmel@sanford.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 35,
                    "name": "dane.mccullough@renner.com",
                    "email_usernames": [
                    "dane.mccullough@renner.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 36,
                    "name": "josh45@kuhlman.biz",
                    "email_usernames": [
                    "josh45@kuhlman.biz"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 37,
                    "name": "dhamill@jones.org",
                    "email_usernames": [
                    "dhamill@jones.org"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 38,
                    "name": "zoey.shields@gottlieb.net",
                    "email_usernames": [
                    "zoey.shields@gottlieb.net"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 39,
                    "name": "gloria46@franecki.biz",
                    "email_usernames": [
                    "gloria46@franecki.biz"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 40,
                    "name": "kirlin.jaydon@halvorson.org",
                    "email_usernames": [
                    "kirlin.jaydon@halvorson.org"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 41,
                    "name": "merlin19@dubuque.com",
                    "email_usernames": [
                    "merlin19@dubuque.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 42,
                    "name": "casper32@gleichner.com",
                    "email_usernames": [
                    "casper32@gleichner.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 43,
                    "name": "wschimmel@gislason.com",
                    "email_usernames": [
                    "wschimmel@gislason.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 44,
                    "name": "hunter28@rowe.com",
                    "email_usernames": [
                    "hunter28@rowe.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 45,
                    "name": "jadyn.vonrueden@cassin.info",
                    "email_usernames": [
                    "jadyn.vonrueden@cassin.info"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 46,
                    "name": "jgreenfelder@blanda.info",
                    "email_usernames": [
                    "jgreenfelder@blanda.info"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 47,
                    "name": "hbruen@dare.com",
                    "email_usernames": [
                    "hbruen@dare.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 48,
                    "name": "crist.hassie@murray.com",
                    "email_usernames": [
                    "crist.hassie@murray.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 49,
                    "name": "domenic.kiehn@beatty.biz",
                    "email_usernames": [
                    "domenic.kiehn@beatty.biz"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 50,
                    "name": "schoen.matt@spencer.com",
                    "email_usernames": [
                    "schoen.matt@spencer.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 51,
                    "name": "reilly.cole@goldner.net",
                    "email_usernames": [
                    "reilly.cole@goldner.net"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 52,
                    "name": "jbayer@mayert.com",
                    "email_usernames": [
                    "jbayer@mayert.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 53,
                    "name": "ignacio.goldner@herman.com",
                    "email_usernames": [
                    "ignacio.goldner@herman.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 54,
                    "name": "mariela.sauer@harber.org",
                    "email_usernames": [
                    "mariela.sauer@harber.org"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 55,
                    "name": "gislason.jackeline@mcclure.com",
                    "email_usernames": [
                    "gislason.jackeline@mcclure.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 56,
                    "name": "lang.zelma@schiller.net",
                    "email_usernames": [
                    "lang.zelma@schiller.net"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 57,
                    "name": "jennifer.cassin@rogahn.com",
                    "email_usernames": [
                    "jennifer.cassin@rogahn.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 58,
                    "name": "wilson66@okeefe.com",
                    "email_usernames": [
                    "wilson66@okeefe.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 59,
                    "name": "wunsch.felton@bailey.org",
                    "email_usernames": [
                    "wunsch.felton@bailey.org"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 60,
                    "name": "turner31@rice.biz",
                    "email_usernames": [
                    "turner31@rice.biz"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 61,
                    "name": "kristin.daniel@ondricka.net",
                    "email_usernames": [
                    "kristin.daniel@ondricka.net"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 62,
                    "name": "john90@bogisich.net",
                    "email_usernames": [
                    "john90@bogisich.net"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 63,
                    "name": "kailyn.abernathy@robel.org",
                    "email_usernames": [
                    "kailyn.abernathy@robel.org"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 64,
                    "name": "willy.hartmann@lueilwitz.com",
                    "email_usernames": [
                    "willy.hartmann@lueilwitz.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 65,
                    "name": "pwintheiser@considine.com",
                    "email_usernames": [
                    "pwintheiser@considine.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 66,
                    "name": "koch.zita@keebler.biz",
                    "email_usernames": [
                    "koch.zita@keebler.biz"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 67,
                    "name": "aruecker@stamm.org",
                    "email_usernames": [
                    "aruecker@stamm.org"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 68,
                    "name": "ufisher@orn.com",
                    "email_usernames": [
                    "ufisher@orn.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 69,
                    "name": "wilderman.laurel@hirthe.com",
                    "email_usernames": [
                    "wilderman.laurel@hirthe.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 70,
                    "name": "bogan.anastasia@klocko.com",
                    "email_usernames": [
                    "bogan.anastasia@klocko.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 71,
                    "name": "dicki.maida@hill.org",
                    "email_usernames": [
                    "dicki.maida@hill.org"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 72,
                    "name": "cassie30@emard.com",
                    "email_usernames": [
                    "cassie30@emard.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 73,
                    "name": "nicklaus.considine@stanton.org",
                    "email_usernames": [
                    "nicklaus.considine@stanton.org"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 74,
                    "name": "bwindler@kirlin.org",
                    "email_usernames": [
                    "bwindler@kirlin.org"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 75,
                    "name": "lindsey.doyle@borer.com",
                    "email_usernames": [
                    "lindsey.doyle@borer.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 76,
                    "name": "darius00@kuhlman.com",
                    "email_usernames": [
                    "darius00@kuhlman.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 77,
                    "name": "destiney.hauck@hudson.com",
                    "email_usernames": [
                    "destiney.hauck@hudson.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 78,
                    "name": "jesus59@ferry.com",
                    "email_usernames": [
                    "jesus59@ferry.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 79,
                    "name": "kweber@bechtelar.net",
                    "email_usernames": [
                    "kweber@bechtelar.net"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 80,
                    "name": "bettye01@price.com",
                    "email_usernames": [
                    "bettye01@price.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 81,
                    "name": "wpadberg@kemmer.com",
                    "email_usernames": [
                    "wpadberg@kemmer.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 82,
                    "name": "serenity.bosco@fahey.com",
                    "email_usernames": [
                    "serenity.bosco@fahey.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 83,
                    "name": "sjacobi@rowe.com",
                    "email_usernames": [
                    "sjacobi@rowe.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 84,
                    "name": "oswift@hayes.net",
                    "email_usernames": [
                    "oswift@hayes.net"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 85,
                    "name": "howell.annabell@schamberger.com",
                    "email_usernames": [
                    "howell.annabell@schamberger.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 86,
                    "name": "kevin68@stracke.com",
                    "email_usernames": [
                    "kevin68@stracke.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 87,
                    "name": "beatty.aiden@becker.net",
                    "email_usernames": [
                    "beatty.aiden@becker.net"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 88,
                    "name": "bruce89@champlin.biz",
                    "email_usernames": [
                    "bruce89@champlin.biz"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 89,
                    "name": "ebahringer@veum.info",
                    "email_usernames": [
                    "ebahringer@veum.info"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 90,
                    "name": "vanessa02@becker.com",
                    "email_usernames": [
                    "vanessa02@becker.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 91,
                    "name": "tkulas@schowalter.com",
                    "email_usernames": [
                    "tkulas@schowalter.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 92,
                    "name": "reichert.emely@streich.com",
                    "email_usernames": [
                    "reichert.emely@streich.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 93,
                    "name": "dare.katheryn@mayert.com",
                    "email_usernames": [
                    "dare.katheryn@mayert.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 94,
                    "name": "chelsie32@lebsack.info",
                    "email_usernames": [
                    "chelsie32@lebsack.info"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 95,
                    "name": "weimann.anibal@herman.org",
                    "email_usernames": [
                    "weimann.anibal@herman.org"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 96,
                    "name": "elmo62@shanahan.com",
                    "email_usernames": [
                    "elmo62@shanahan.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 97,
                    "name": "juana.dickinson@lockman.com",
                    "email_usernames": [
                    "juana.dickinson@lockman.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 98,
                    "name": "casper.ramona@kohler.org",
                    "email_usernames": [
                    "casper.ramona@kohler.org"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 99,
                    "name": "bruen.holden@hegmann.com",
                    "email_usernames": [
                    "bruen.holden@hegmann.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 100,
                    "name": "gterry@wisoky.com",
                    "email_usernames": [
                    "gterry@wisoky.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 101,
                    "name": "jayda83@weissnat.info",
                    "email_usernames": [
                    "jayda83@weissnat.info"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 102,
                    "name": "hreilly@batz.net",
                    "email_usernames": [
                    "hreilly@batz.net"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 103,
                    "name": "nkuhn@schimmel.net",
                    "email_usernames": [
                    "nkuhn@schimmel.net"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 104,
                    "name": "cassandra.dicki@block.net",
                    "email_usernames": [
                    "cassandra.dicki@block.net"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 105,
                    "name": "zemmerich@gusikowski.biz",
                    "email_usernames": [
                    "zemmerich@gusikowski.biz"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 106,
                    "name": "albert32@zulauf.net",
                    "email_usernames": [
                    "albert32@zulauf.net"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 107,
                    "name": "kenyatta85@heaney.com",
                    "email_usernames": [
                    "kenyatta85@heaney.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 108,
                    "name": "langworth.levi@rau.com",
                    "email_usernames": [
                    "langworth.levi@rau.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 109,
                    "name": "weimann.laron@conroy.com",
                    "email_usernames": [
                    "weimann.laron@conroy.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 110,
                    "name": "blanda.filiberto@kohler.com",
                    "email_usernames": [
                    "blanda.filiberto@kohler.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 111,
                    "name": "ynienow@heaney.com",
                    "email_usernames": [
                    "ynienow@heaney.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 112,
                    "name": "bode.karl@hirthe.com",
                    "email_usernames": [
                    "bode.karl@hirthe.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 113,
                    "name": "stracke.gordon@senger.net",
                    "email_usernames": [
                    "stracke.gordon@senger.net"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 114,
                    "name": "heaney.hilda@konopelski.com",
                    "email_usernames": [
                    "heaney.hilda@konopelski.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 115,
                    "name": "ltromp@crist.org",
                    "email_usernames": [
                    "ltromp@crist.org"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 116,
                    "name": "melody86@conroy.com",
                    "email_usernames": [
                    "melody86@conroy.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 117,
                    "name": "brittany.labadie@maggio.net",
                    "email_usernames": [
                    "brittany.labadie@maggio.net"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 118,
                    "name": "lgoldner@huels.com",
                    "email_usernames": [
                    "lgoldner@huels.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 119,
                    "name": "fgoldner@pacocha.com",
                    "email_usernames": [
                    "fgoldner@pacocha.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 120,
                    "name": "fryan@adams.com",
                    "email_usernames": [
                    "fryan@adams.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 121,
                    "name": "joyce.bartoletti@vonrueden.com",
                    "email_usernames": [
                    "joyce.bartoletti@vonrueden.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 122,
                    "name": "goyette.efrain@haley.com",
                    "email_usernames": [
                    "goyette.efrain@haley.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 123,
                    "name": "nikolaus.iliana@satterfield.com",
                    "email_usernames": [
                    "nikolaus.iliana@satterfield.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 124,
                    "name": "carolanne86@kovacek.info",
                    "email_usernames": [
                    "carolanne86@kovacek.info"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 125,
                    "name": "spinka.vella@connelly.info",
                    "email_usernames": [
                    "spinka.vella@connelly.info"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 126,
                    "name": "jklein@schinner.com",
                    "email_usernames": [
                    "jklein@schinner.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 127,
                    "name": "nona11@wilderman.net",
                    "email_usernames": [
                    "nona11@wilderman.net"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 128,
                    "name": "brook47@greenfelder.org",
                    "email_usernames": [
                    "brook47@greenfelder.org"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 129,
                    "name": "korey17@welch.net",
                    "email_usernames": [
                    "korey17@welch.net"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 130,
                    "name": "sporer.tyree@collier.com",
                    "email_usernames": [
                    "sporer.tyree@collier.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 131,
                    "name": "bernard.luettgen@green.com",
                    "email_usernames": [
                    "bernard.luettgen@green.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 132,
                    "name": "esteuber@ferry.com",
                    "email_usernames": [
                    "esteuber@ferry.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 133,
                    "name": "madison.lowe@simonis.com",
                    "email_usernames": [
                    "madison.lowe@simonis.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 134,
                    "name": "estrella96@leffler.com",
                    "email_usernames": [
                    "estrella96@leffler.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 135,
                    "name": "volkman.augusta@yost.com",
                    "email_usernames": [
                    "volkman.augusta@yost.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 136,
                    "name": "qfriesen@beier.com",
                    "email_usernames": [
                    "qfriesen@beier.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 137,
                    "name": "dorthy02@roob.org",
                    "email_usernames": [
                    "dorthy02@roob.org"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 138,
                    "name": "daphne94@beier.com",
                    "email_usernames": [
                    "daphne94@beier.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 139,
                    "name": "cwatsica@langworth.com",
                    "email_usernames": [
                    "cwatsica@langworth.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 140,
                    "name": "schulist.macy@koss.biz",
                    "email_usernames": [
                    "schulist.macy@koss.biz"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 141,
                    "name": "lang.jerel@rowe.biz",
                    "email_usernames": [
                    "lang.jerel@rowe.biz"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 142,
                    "name": "dietrich.flavie@smitham.org",
                    "email_usernames": [
                    "dietrich.flavie@smitham.org"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 143,
                    "name": "wokeefe@olson.com",
                    "email_usernames": [
                    "wokeefe@olson.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 144,
                    "name": "bergstrom.gabriella@feest.com",
                    "email_usernames": [
                    "bergstrom.gabriella@feest.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 145,
                    "name": "abigale.hickle@pagac.com",
                    "email_usernames": [
                    "abigale.hickle@pagac.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 146,
                    "name": "keegan.turcotte@wintheiser.com",
                    "email_usernames": [
                    "keegan.turcotte@wintheiser.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 147,
                    "name": "rigoberto.gislason@kris.com",
                    "email_usernames": [
                    "rigoberto.gislason@kris.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 148,
                    "name": "owen76@kunze.org",
                    "email_usernames": [
                    "owen76@kunze.org"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 149,
                    "name": "eichmann.zena@leannon.org",
                    "email_usernames": [
                    "eichmann.zena@leannon.org"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 150,
                    "name": "morissette.miller@toy.com",
                    "email_usernames": [
                    "morissette.miller@toy.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 151,
                    "name": "durgan.jayme@hegmann.com",
                    "email_usernames": [
                    "durgan.jayme@hegmann.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 152,
                    "name": "goyette.zoie@pfannerstill.net",
                    "email_usernames": [
                    "goyette.zoie@pfannerstill.net"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 153,
                    "name": "kihn.sigurd@dickens.com",
                    "email_usernames": [
                    "kihn.sigurd@dickens.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 154,
                    "name": "lexus.brekke@stark.biz",
                    "email_usernames": [
                    "lexus.brekke@stark.biz"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 155,
                    "name": "coy.weber@barrows.net",
                    "email_usernames": [
                    "coy.weber@barrows.net"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 156,
                    "name": "aurore05@turner.com",
                    "email_usernames": [
                    "aurore05@turner.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 157,
                    "name": "ubaldo36@turcotte.com",
                    "email_usernames": [
                    "ubaldo36@turcotte.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 158,
                    "name": "hyatt.elyse@hettinger.com",
                    "email_usernames": [
                    "hyatt.elyse@hettinger.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 159,
                    "name": "mueller.florida@strosin.org",
                    "email_usernames": [
                    "mueller.florida@strosin.org"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 160,
                    "name": "ortiz.nova@mertz.com",
                    "email_usernames": [
                    "ortiz.nova@mertz.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 161,
                    "name": "ngleichner@harvey.org",
                    "email_usernames": [
                    "ngleichner@harvey.org"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 162,
                    "name": "ydeckow@tremblay.com",
                    "email_usernames": [
                    "ydeckow@tremblay.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 163,
                    "name": "rene21@turcotte.com",
                    "email_usernames": [
                    "rene21@turcotte.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 164,
                    "name": "lstrosin@gleason.info",
                    "email_usernames": [
                    "lstrosin@gleason.info"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 165,
                    "name": "predovic.melyna@heathcote.net",
                    "email_usernames": [
                    "predovic.melyna@heathcote.net"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 166,
                    "name": "maggie88@hettinger.com",
                    "email_usernames": [
                    "maggie88@hettinger.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 167,
                    "name": "yost.monserrat@schinner.com",
                    "email_usernames": [
                    "yost.monserrat@schinner.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 168,
                    "name": "nolan.bailey@wolf.info",
                    "email_usernames": [
                    "nolan.bailey@wolf.info"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 169,
                    "name": "aondricka@welch.org",
                    "email_usernames": [
                    "aondricka@welch.org"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 170,
                    "name": "augusta95@stamm.biz",
                    "email_usernames": [
                    "augusta95@stamm.biz"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 171,
                    "name": "audrey53@windler.net",
                    "email_usernames": [
                    "audrey53@windler.net"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 172,
                    "name": "obergstrom@hauck.com",
                    "email_usernames": [
                    "obergstrom@hauck.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 173,
                    "name": "muller.noe@ryan.info",
                    "email_usernames": [
                    "muller.noe@ryan.info"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 174,
                    "name": "tlittle@murray.info",
                    "email_usernames": [
                    "tlittle@murray.info"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 175,
                    "name": "tschroeder@schinner.net",
                    "email_usernames": [
                    "tschroeder@schinner.net"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 176,
                    "name": "haylie42@okeefe.info",
                    "email_usernames": [
                    "haylie42@okeefe.info"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 177,
                    "name": "ayla36@stroman.com",
                    "email_usernames": [
                    "ayla36@stroman.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 178,
                    "name": "saul.runte@emard.org",
                    "email_usernames": [
                    "saul.runte@emard.org"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 179,
                    "name": "ashleigh62@feil.com",
                    "email_usernames": [
                    "ashleigh62@feil.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 180,
                    "name": "antwan.nader@rodriguez.biz",
                    "email_usernames": [
                    "antwan.nader@rodriguez.biz"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 181,
                    "name": "wkoch@johns.com",
                    "email_usernames": [
                    "wkoch@johns.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 182,
                    "name": "doyle.christ@rippin.com",
                    "email_usernames": [
                    "doyle.christ@rippin.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 183,
                    "name": "ycorwin@wisoky.com",
                    "email_usernames": [
                    "ycorwin@wisoky.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 184,
                    "name": "gmueller@hamill.org",
                    "email_usernames": [
                    "gmueller@hamill.org"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 185,
                    "name": "fletcher14@purdy.net",
                    "email_usernames": [
                    "fletcher14@purdy.net"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 186,
                    "name": "chet17@upton.net",
                    "email_usernames": [
                    "chet17@upton.net"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    },
                    {
                    "id": 187,
                    "name": "jamil96@kilback.com",
                    "email_usernames": [
                    "jamil96@kilback.com"
                    ],
                    "model_type": "Customer",
                    "icon": "user"
                    }
                    ],
                    "labels": [
                    "CATEGORY_FORUMS",
                    "CATEGORY_PERSONAL",
                    "CATEGORY_PROMOTIONS",
                    "CATEGORY_SOCIAL",
                    "CATEGORY_UPDATES",
                    "IMPORTANT",
                    "INBOX",
                    "SENT",
                    "STARRED",
                    "UNREAD"
                    ],
                    "goals": [
                    3600,
                    7200,
                    14400,
                    28800,
                    86400
                    ],
                    "max_reply_time": {
                    "enabled": true,
                    "hours": 40
                    }
                    }
 
        

Request   

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

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"
);

let 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();
$response = $client->delete(
    'https://portal.timetoreply.com/api/entities/group-mailboxes/1/agents',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
        ],
        'json' => [
            'ids' => [
                1,
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

Show headers
            cache-control: no-cache, private
content-type: application/json
tracking-events: []
 
            
                
{
    "current_page": 1,
    "data": [
        {
            "id": 2,
            "name": "Lelia Turner",
            "email_usernames": [
                "l.turner@timetoreply.com"
            ],
            "model_type": "Agent",
            "icon": "user-plus"
        },
        {
            "id": 3,
            "name": "Nicolette Ullrich",
            "email_usernames": [
                "n.ullrich@timetoreply.com"
            ],
            "model_type": "Agent",
            "icon": "user-plus"
        }
    ],
    "first_page_url": "https:\/\/portal.timetoreply.com\/api\/entities\/group-mailboxes\/1\/agents?page=1",
    "from": 1,
    "last_page": 1,
    "last_page_url": "https:\/\/portal.timetoreply.com\/api\/entities\/group-mailboxes\/1\/agents?page=1",
    "links": [
        {
            "url": null,
            "label": "« Previous",
            "active": false
        },
        {
            "url": "https:\/\/portal.timetoreply.com\/api\/entities\/group-mailboxes\/1\/agents?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
}
 
        

Request   

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

URL Parameters

group_mailbox  integer  

The ID of the Group Mailbox.

Body Parameters

ids  integer[]  

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

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"
);

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

let 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();
$response = $client->get(
    'https://portal.timetoreply.com/api/entities/group-mailboxes/1/agents',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
        ],
        'query' => [
            'sort_by'=> 'name',
            'direction'=> 'asc',
            'per_page'=> '2',
            'page'=> '1',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

Show headers
            cache-control: no-cache, private
content-type: application/json
tracking-events: []
 
            
                
{
    "current_page": 1,
    "data": [
        {
            "id": 2,
            "name": "Lelia Turner",
            "email_usernames": [
                "l.turner@timetoreply.com"
            ],
            "model_type": "Agent",
            "icon": "user-plus"
        },
        {
            "id": 3,
            "name": "Nicolette Ullrich",
            "email_usernames": [
                "n.ullrich@timetoreply.com"
            ],
            "model_type": "Agent",
            "icon": "user-plus"
        }
    ],
    "first_page_url": "https:\/\/portal.timetoreply.com\/api\/entities\/group-mailboxes\/1\/agents?page=1",
    "from": 1,
    "last_page": 2,
    "last_page_url": "https:\/\/portal.timetoreply.com\/api\/entities\/group-mailboxes\/1\/agents?page=2",
    "links": [
        {
            "url": null,
            "label": "« Previous",
            "active": false
        },
        {
            "url": "https:\/\/portal.timetoreply.com\/api\/entities\/group-mailboxes\/1\/agents?page=1",
            "label": "1",
            "active": true
        },
        {
            "url": "https:\/\/portal.timetoreply.com\/api\/entities\/group-mailboxes\/1\/agents?page=2",
            "label": "2",
            "active": false
        },
        {
            "url": "https:\/\/portal.timetoreply.com\/api\/entities\/group-mailboxes\/1\/agents?page=2",
            "label": "Next »",
            "active": false
        }
    ],
    "next_page_url": "https:\/\/portal.timetoreply.com\/api\/entities\/group-mailboxes\/1\/agents?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}/agents

URL Parameters

group_mailbox  integer  

The ID of the Group Mailbox to get Members of.

Query Parameters

sort_by  string optional  

The field to sort the mailboxes by.

direction  string optional  

Sort asc or desc.

per_page  number optional  

The number of mailboxes to show per page.

page  number optional  

The page number.

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"
);

let 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();
$response = $client->post(
    'https://portal.timetoreply.com/api/entities/group-mailboxes/1/agents',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
        ],
        'json' => [
            'ids' => [
                1,
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

Show headers
            cache-control: no-cache, private
content-type: application/json
tracking-events: []
 
            
                
{
    "current_page": 1,
    "data": [
        {
            "id": 2,
            "name": "Lelia Turner",
            "email_usernames": [
                "l.turner@timetoreply.com"
            ],
            "model_type": "Agent",
            "icon": "user-plus"
        },
        {
            "id": 3,
            "name": "Nicolette Ullrich",
            "email_usernames": [
                "n.ullrich@timetoreply.com"
            ],
            "model_type": "Agent",
            "icon": "user-plus"
        },
        {
            "id": 1,
            "name": "Peter Rabbit",
            "email_usernames": [
                "h.herman@timetoreply.com",
                "alias@example.net"
            ],
            "model_type": "Agent",
            "icon": "user-plus"
        }
    ],
    "first_page_url": "https:\/\/portal.timetoreply.com\/api\/entities\/group-mailboxes\/1\/agents?page=1",
    "from": 1,
    "last_page": 1,
    "last_page_url": "https:\/\/portal.timetoreply.com\/api\/entities\/group-mailboxes\/1\/agents?page=1",
    "links": [
        {
            "url": null,
            "label": "« Previous",
            "active": false
        },
        {
            "url": "https:\/\/portal.timetoreply.com\/api\/entities\/group-mailboxes\/1\/agents?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
}
 
        

Request   

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

URL Parameters

group_mailbox  integer  

The ID of the Group Mailbox.

Body Parameters

ids  integer[]  

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

Group Mailboxes - Delete

requires authentication

Delete a Group Mailbox

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

let 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();
$response = $client->delete(
    'https://portal.timetoreply.com/api/entities/group-mailboxes/1',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

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

Request   

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

URL Parameters

group_mailbox  integer  

The ID of the Group Mailbox.

Group Mailboxes - List

requires authentication

Show all Group Mailboxes

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

let params = {
    "per_page": "25",
    "page": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

let 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();
$response = $client->get(
    'https://portal.timetoreply.com/api/entities/group-mailboxes',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
        ],
        'query' => [
            'per_page'=> '25',
            'page'=> '1',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

Show headers
            cache-control: no-cache, private
content-type: application/json
tracking-events: []
 
            
                
{
    "current_page": 1,
    "data": [
        {
            "id": 1,
            "name": "Support",
            "email_usernames": [
                "support@timetoreply.com",
                "h.herman@timetoreply.com",
                "l.turner@timetoreply.com",
                "n.ullrich@timetoreply.com"
            ],
            "model_type": "Group Mailbox",
            "icon": "users"
        }
    ],
    "first_page_url": "https:\/\/portal.timetoreply.com\/api\/entities\/group-mailboxes?page=1",
    "from": 1,
    "last_page": 1,
    "last_page_url": "https:\/\/portal.timetoreply.com\/api\/entities\/group-mailboxes?page=1",
    "links": [
        {
            "url": null,
            "label": "« Previous",
            "active": false
        },
        {
            "url": "https:\/\/portal.timetoreply.com\/api\/entities\/group-mailboxes?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": 1,
    "total": 1
}
 
        

Request   

GET api/entities/group-mailboxes

Query Parameters

per_page  integer optional  

For paginated results, how many results per page. Max 200.

page  integer optional  

For paginated results, which page to get.

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"
);

let 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();
$response = $client->get(
    'https://portal.timetoreply.com/api/entities/group-mailboxes/1',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

Show headers
            cache-control: no-cache, private
content-type: application/json
tracking-events: []
 
            
                
{
    "id": 1,
    "name": "Support",
    "email_usernames": [
        "support@timetoreply.com",
        "h.herman@timetoreply.com",
        "l.turner@timetoreply.com",
        "n.ullrich@timetoreply.com"
    ],
    "model_type": "Group Mailbox",
    "icon": "users"
}
 
        

Request   

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

URL Parameters

group_mailbox  integer  

The ID of the Group Mailbox.

Group Mailboxes - Store

requires authentication

Store a Group Mailbox

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

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

let body = {
    "name": "Sales Mailbox",
    "groupMailboxAddress": "sales@example.net",
    "aliases": [
        "info@example.net"
    ]
}

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://portal.timetoreply.com/api/entities/group-mailboxes',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'Sales Mailbox',
            'groupMailboxAddress' => 'sales@example.net',
            'aliases' => [
                'info@example.net',
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

Show headers
            cache-control: no-cache, private
content-type: application/json
tracking-events: []
 
            
                
{
    "group_mailbox": {
        "name": "Sales Mailbox",
        "company_id": 1,
        "updated_at": "2021-06-09 16:13:16",
        "created_at": "2021-06-09 16:13:16",
        "id": 2,
        "model_type": "Group Mailbox",
        "group_mailbox_address": null,
        "email_usernames": []
    },
    "stored_email": {
        "id": 15,
        "username": "sales",
        "domain_id": 127,
        "email_address": "sales@example.net"
    },
    "aliases": [
        {
            "id": 16,
            "username": "info",
            "domain_id": 127,
            "email_address": "info@example.net"
        }
    ]
}
 
        

Request   

POST api/entities/group-mailboxes

Body Parameters

name  string  

The name of the Group Mailbox.

groupMailboxAddress  string  

The email address of the Group Mailbox.

aliases  string[] optional  

An email alias for the Group Mailbox.

Group Mailboxes - Update

requires authentication

Update a Group Mailbox

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

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

let body = {
    "name": "Sales Mailbox",
    "groupMailboxAddress": "sales@example.net",
    "aliases": [
        "info@example.net"
    ]
}

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->put(
    'https://portal.timetoreply.com/api/entities/group-mailboxes/1',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'Sales Mailbox',
            'groupMailboxAddress' => 'sales@example.net',
            'aliases' => [
                'info@example.net',
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

Show headers
            cache-control: no-cache, private
content-type: application/json
tracking-events: []
 
            
                
{
    "group_mailbox": {
        "id": 1,
        "company_id": 1,
        "name": "Sales Mailbox",
        "created_at": "2021-06-09 16:12:06",
        "updated_at": "2021-06-09 16:13:16",
        "model_type": "Group Mailbox",
        "group_mailbox_address": "support@timetoreply.com",
        "email_usernames": [
            {
                "id": 10,
                "username": "support",
                "domain_id": 8,
                "email_address": "support@timetoreply.com",
                "pivot": {
                    "email_usernameable_id": 1,
                    "email_username_id": 10,
                    "email_usernameable_type": "group_mailbox",
                    "label": "none"
                }
            }
        ]
    },
    "stored_email": {
        "id": 17,
        "username": "sales",
        "domain_id": 128,
        "email_address": "sales@example.net"
    },
    "aliases": [
        {
            "id": 18,
            "username": "info",
            "domain_id": 128,
            "email_address": "info@example.net"
        }
    ]
}
 
        

Request   

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

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

URL Parameters

group_mailbox  integer  

The ID of the Group Mailbox to update.

Body Parameters

name  string  

The name of the Group Mailbox.

groupMailboxAddress  string  

The email address of the Group Mailbox.

aliases  string[] optional  

An array of email alias' for the Group Mailbox.

Mailboxes - Delete

requires authentication

Delete a mailbox

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

let 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();
$response = $client->delete(
    'https://portal.timetoreply.com/api/entities/agents/1',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

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

Request   

DELETE api/entities/agents/{agent}

URL Parameters

agent  integer  

The ID of the mailbox to delete.

Mailboxes - Invite

requires authentication

Create a mailbox invitation

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

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

let body = {
    "name": "Peter Rabbit",
    "type": 1,
    "email": "peter.rabbit@gmail.com",
    "message": "Hey Pete, please accept this invite."
}

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

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=1623427991&signature=247047fe993e41e5637f05778ccd71d506ed76ad54a06545e84f89bd6aaa9567"
}
 
        

Request   

POST api/entities/agents/invite

Body Parameters

name  string  

The name of the Mailbox user.

type  integer  

The type of Mailbox (1 = Gmail, 2 = O365, 4 = MS Exchange, 5 = Mimecast).

email  string  

The email address of the Mailbox.

message  string optional  

A personalised message to send to the mailbox during invitation.

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"
);

let 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();
$response = $client->post(
    'https://portal.timetoreply.com/api/tools/users/invite-as-users',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
        ],
        'json' => [
            'ids' => [
                1,
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (202):

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

Request   

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

Body Parameters

ids  integer[]  

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

Mailboxes - List

requires authentication

List all mailboxes

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

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

let 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();
$response = $client->get(
    'https://portal.timetoreply.com/api/entities/agents',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
        ],
        'query' => [
            'sort_by'=> 'name',
            'direction'=> 'asc',
            'per_page'=> '2',
            'page'=> '1',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

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": "Hanna Herman",
            "email": "h.herman@timetoreply.com",
            "main_type": "Google",
            "active": true,
            "created_at": "2021-06-02 16:12:06",
            "last_used_addon": null,
            "email_usernames": [
                "h.herman@timetoreply.com"
            ],
            "time_zone": {
                "id": 29,
                "php_timezone": "Europe\/London",
                "friendly_name": "Greenwich Mean Time =>  Dublin, Edinburgh, Lisbon, London"
            },
            "newest_message_date": "2021-06-09 12:32:05",
            "ingestion_started_date": "2020-12-15 00:07:25",
            "ingestion_completed_date": "2021-06-09 16:12:17",
            "ingestion_duration": "4240h:04m:52s",
            "ingestion_duration_seconds": 15264292,
            "user_permissions": [
                7
            ],
            "search_string": "Hanna Herman h.herman@timetoreply.com",
            "leave_days": [],
            "work_days": [],
            "business_hours": []
        },
        {
            "id": 2,
            "company_id": 1,
            "company_name": "TimeToReply",
            "name": "Lelia Turner",
            "email": "l.turner@timetoreply.com",
            "main_type": "Google",
            "active": true,
            "created_at": "2021-06-02 16:12:06",
            "last_used_addon": null,
            "email_usernames": [
                "l.turner@timetoreply.com"
            ],
            "time_zone": {
                "id": 29,
                "php_timezone": "Europe\/London",
                "friendly_name": "Greenwich Mean Time =>  Dublin, Edinburgh, Lisbon, London"
            },
            "newest_message_date": "2021-06-04 15:26:11",
            "ingestion_started_date": "2021-02-04 10:33:07",
            "ingestion_completed_date": "2021-06-09 16:12:20",
            "ingestion_duration": "3005h:39m:13s",
            "ingestion_duration_seconds": 10820353,
            "user_permissions": [],
            "search_string": "Lelia Turner l.turner@timetoreply.com",
            "leave_days": [],
            "work_days": [],
            "business_hours": []
        }
    ],
    "first_page_url": "https:\/\/portal.timetoreply.com\/api\/entities\/agents?page=1",
    "from": 1,
    "last_page": 2,
    "last_page_url": "https:\/\/portal.timetoreply.com\/api\/entities\/agents?page=2",
    "links": [
        {
            "url": null,
            "label": "« Previous",
            "active": false
        },
        {
            "url": "https:\/\/portal.timetoreply.com\/api\/entities\/agents?page=1",
            "label": "1",
            "active": true
        },
        {
            "url": "https:\/\/portal.timetoreply.com\/api\/entities\/agents?page=2",
            "label": "2",
            "active": false
        },
        {
            "url": "https:\/\/portal.timetoreply.com\/api\/entities\/agents?page=2",
            "label": "Next »",
            "active": false
        }
    ],
    "next_page_url": "https:\/\/portal.timetoreply.com\/api\/entities\/agents?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

Query Parameters

sort_by  string optional  

The field to sort the mailboxes by.

direction  string optional  

Sort asc or desc.

per_page  number optional  

The number of mailboxes to show per page.

page  number optional  

The page number.

search  string optional  

Optional search string.

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"
);

let 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();
$response = $client->get(
    'https://portal.timetoreply.com/api/entities/agents/1/re-auth',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

Show headers
            cache-control: no-cache, private
content-type: application/json
tracking-events: []
 
            
                
{
    "status": "We've sent the Re-Authentication email to Hanna Herman. Please ask them to check their email and SPAM box"
}
 
        

Request   

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

URL Parameters

agent  integer  

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

Mailboxes - Update

requires authentication

Update a mailbox

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

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

let body = {
    "name": "Peter Rabbit",
    "timeZone": 1,
    "aliases": [
        "alias@example.net"
    ]
}

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

Example response (500):

Show headers
            cache-control: no-cache, private
content-type: application/json
tracking-events: []
 
            
                
{
    "message": "Attempted to lazy load [company] on model [App\\Models\\Thread] but lazy loading is disabled.",
    "exception": "Illuminate\\Database\\LazyLoadingViolationException",
    "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Database\/Eloquent\/Concerns\/HasAttributes.php",
    "line": 475,
    "trace": [
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Database\/Eloquent\/Concerns\/HasAttributes.php",
            "line": 442,
            "function": "handleLazyLoadingViolation",
            "class": "Illuminate\\Database\\Eloquent\\Model",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Database\/Eloquent\/Concerns\/HasAttributes.php",
            "line": 397,
            "function": "getRelationValue",
            "class": "Illuminate\\Database\\Eloquent\\Model",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Database\/Eloquent\/Model.php",
            "line": 1899,
            "function": "getAttribute",
            "class": "Illuminate\\Database\\Eloquent\\Model",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/app\/Services\/ThreadService.php",
            "line": 1571,
            "function": "__get",
            "class": "Illuminate\\Database\\Eloquent\\Model",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/app\/Services\/ThreadService.php",
            "line": 1550,
            "function": "determineThreadType",
            "class": "App\\Services\\ThreadService",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/app\/Jobs\/RecalculateChunkForCompany.php",
            "line": 280,
            "function": "updateThreadAttributes",
            "class": "App\\Services\\ThreadService",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Container\/BoundMethod.php",
            "line": 36,
            "function": "handle",
            "class": "App\\Jobs\\RecalculateChunkForCompany",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Container\/Util.php",
            "line": 40,
            "function": "Illuminate\\Container\\{closure}",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Container\/BoundMethod.php",
            "line": 93,
            "function": "unwrapIfClosure",
            "class": "Illuminate\\Container\\Util",
            "type": "::"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Container\/BoundMethod.php",
            "line": 37,
            "function": "callBoundMethod",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Container\/Container.php",
            "line": 614,
            "function": "call",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Bus\/Dispatcher.php",
            "line": 128,
            "function": "call",
            "class": "Illuminate\\Container\\Container",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php",
            "line": 128,
            "function": "Illuminate\\Bus\\{closure}",
            "class": "Illuminate\\Bus\\Dispatcher",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php",
            "line": 103,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Bus\/Dispatcher.php",
            "line": 132,
            "function": "then",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Queue\/CallQueuedHandler.php",
            "line": 120,
            "function": "dispatchNow",
            "class": "Illuminate\\Bus\\Dispatcher",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php",
            "line": 128,
            "function": "Illuminate\\Queue\\{closure}",
            "class": "Illuminate\\Queue\\CallQueuedHandler",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php",
            "line": 103,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Queue\/CallQueuedHandler.php",
            "line": 122,
            "function": "then",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Queue\/CallQueuedHandler.php",
            "line": 70,
            "function": "dispatchThroughMiddleware",
            "class": "Illuminate\\Queue\\CallQueuedHandler",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Queue\/Jobs\/Job.php",
            "line": 98,
            "function": "call",
            "class": "Illuminate\\Queue\\CallQueuedHandler",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Queue\/SyncQueue.php",
            "line": 43,
            "function": "fire",
            "class": "Illuminate\\Queue\\Jobs\\Job",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Queue\/Queue.php",
            "line": 57,
            "function": "push",
            "class": "Illuminate\\Queue\\SyncQueue",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Bus\/Dispatcher.php",
            "line": 246,
            "function": "pushOn",
            "class": "Illuminate\\Queue\\Queue",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Bus\/Dispatcher.php",
            "line": 229,
            "function": "pushCommandToQueue",
            "class": "Illuminate\\Bus\\Dispatcher",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Bus\/Dispatcher.php",
            "line": 77,
            "function": "dispatchToQueue",
            "class": "Illuminate\\Bus\\Dispatcher",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Bus\/PendingDispatch.php",
            "line": 202,
            "function": "dispatch",
            "class": "Illuminate\\Bus\\Dispatcher",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/app\/Console\/Commands\/Company\/RecalculateAllForAgent.php",
            "line": 60,
            "function": "__destruct",
            "class": "Illuminate\\Foundation\\Bus\\PendingDispatch",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Collections\/Traits\/EnumeratesValues.php",
            "line": 234,
            "function": "App\\Console\\Commands\\Company\\{closure}",
            "class": "App\\Console\\Commands\\Company\\RecalculateAllForAgent",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/app\/Console\/Commands\/Company\/RecalculateAllForAgent.php",
            "line": 62,
            "function": "each",
            "class": "Illuminate\\Support\\LazyCollection",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Container\/BoundMethod.php",
            "line": 36,
            "function": "handle",
            "class": "App\\Console\\Commands\\Company\\RecalculateAllForAgent",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Container\/Util.php",
            "line": 40,
            "function": "Illuminate\\Container\\{closure}",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Container\/BoundMethod.php",
            "line": 93,
            "function": "unwrapIfClosure",
            "class": "Illuminate\\Container\\Util",
            "type": "::"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Container\/BoundMethod.php",
            "line": 37,
            "function": "callBoundMethod",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Container\/Container.php",
            "line": 614,
            "function": "call",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Console\/Command.php",
            "line": 136,
            "function": "call",
            "class": "Illuminate\\Container\\Container",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/symfony\/console\/Command\/Command.php",
            "line": 288,
            "function": "execute",
            "class": "Illuminate\\Console\\Command",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Console\/Command.php",
            "line": 121,
            "function": "run",
            "class": "Symfony\\Component\\Console\\Command\\Command",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/symfony\/console\/Application.php",
            "line": 974,
            "function": "run",
            "class": "Illuminate\\Console\\Command",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/symfony\/console\/Application.php",
            "line": 291,
            "function": "doRunCommand",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/symfony\/console\/Application.php",
            "line": 167,
            "function": "doRun",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Console\/Application.php",
            "line": 92,
            "function": "run",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Console\/Application.php",
            "line": 184,
            "function": "run",
            "class": "Illuminate\\Console\\Application",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Console\/Kernel.php",
            "line": 263,
            "function": "call",
            "class": "Illuminate\\Console\\Application",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Console\/QueuedCommand.php",
            "line": 40,
            "function": "call",
            "class": "Illuminate\\Foundation\\Console\\Kernel",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Container\/BoundMethod.php",
            "line": 36,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Console\\QueuedCommand",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Container\/Util.php",
            "line": 40,
            "function": "Illuminate\\Container\\{closure}",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Container\/BoundMethod.php",
            "line": 93,
            "function": "unwrapIfClosure",
            "class": "Illuminate\\Container\\Util",
            "type": "::"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Container\/BoundMethod.php",
            "line": 37,
            "function": "callBoundMethod",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Container\/Container.php",
            "line": 614,
            "function": "call",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Bus\/Dispatcher.php",
            "line": 128,
            "function": "call",
            "class": "Illuminate\\Container\\Container",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php",
            "line": 128,
            "function": "Illuminate\\Bus\\{closure}",
            "class": "Illuminate\\Bus\\Dispatcher",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php",
            "line": 103,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Bus\/Dispatcher.php",
            "line": 132,
            "function": "then",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Queue\/CallQueuedHandler.php",
            "line": 120,
            "function": "dispatchNow",
            "class": "Illuminate\\Bus\\Dispatcher",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php",
            "line": 128,
            "function": "Illuminate\\Queue\\{closure}",
            "class": "Illuminate\\Queue\\CallQueuedHandler",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php",
            "line": 103,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Queue\/CallQueuedHandler.php",
            "line": 122,
            "function": "then",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Queue\/CallQueuedHandler.php",
            "line": 70,
            "function": "dispatchThroughMiddleware",
            "class": "Illuminate\\Queue\\CallQueuedHandler",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Queue\/Jobs\/Job.php",
            "line": 98,
            "function": "call",
            "class": "Illuminate\\Queue\\CallQueuedHandler",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Queue\/SyncQueue.php",
            "line": 43,
            "function": "fire",
            "class": "Illuminate\\Queue\\Jobs\\Job",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Queue\/Queue.php",
            "line": 57,
            "function": "push",
            "class": "Illuminate\\Queue\\SyncQueue",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Bus\/Dispatcher.php",
            "line": 246,
            "function": "pushOn",
            "class": "Illuminate\\Queue\\Queue",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Bus\/Dispatcher.php",
            "line": 229,
            "function": "pushCommandToQueue",
            "class": "Illuminate\\Bus\\Dispatcher",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Bus\/Dispatcher.php",
            "line": 77,
            "function": "dispatchToQueue",
            "class": "Illuminate\\Bus\\Dispatcher",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Bus\/PendingDispatch.php",
            "line": 202,
            "function": "dispatch",
            "class": "Illuminate\\Bus\\Dispatcher",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/app\/Services\/CompanyService.php",
            "line": 266,
            "function": "__destruct",
            "class": "Illuminate\\Foundation\\Bus\\PendingDispatch",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/app\/Http\/Controllers\/Api\/Entities\/AgentsController.php",
            "line": 301,
            "function": "updateReplyTimesForAgent",
            "class": "App\\Services\\CompanyService",
            "type": "::"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Controller.php",
            "line": 54,
            "function": "update",
            "class": "App\\Http\\Controllers\\Api\\Entities\\AgentsController",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/ControllerDispatcher.php",
            "line": 45,
            "function": "callAction",
            "class": "Illuminate\\Routing\\Controller",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Route.php",
            "line": 254,
            "function": "dispatch",
            "class": "Illuminate\\Routing\\ControllerDispatcher",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Route.php",
            "line": 197,
            "function": "runController",
            "class": "Illuminate\\Routing\\Route",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Router.php",
            "line": 695,
            "function": "run",
            "class": "Illuminate\\Routing\\Route",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php",
            "line": 128,
            "function": "Illuminate\\Routing\\{closure}",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/app\/Http\/Middleware\/CheckIfAdmin.php",
            "line": 30,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php",
            "line": 167,
            "function": "handle",
            "class": "App\\Http\\Middleware\\CheckIfAdmin",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/app\/Http\/Middleware\/CheckIfHasBusinessHours.php",
            "line": 28,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php",
            "line": 167,
            "function": "handle",
            "class": "App\\Http\\Middleware\\CheckIfHasBusinessHours",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/app\/Http\/Middleware\/CheckIfHasAgents.php",
            "line": 30,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php",
            "line": 167,
            "function": "handle",
            "class": "App\\Http\\Middleware\\CheckIfHasAgents",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/app\/Http\/Middleware\/CheckIfHasCompany.php",
            "line": 31,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php",
            "line": 167,
            "function": "handle",
            "class": "App\\Http\\Middleware\\CheckIfHasCompany",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/app\/Http\/Middleware\/CheckIfVerified.php",
            "line": 32,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php",
            "line": 167,
            "function": "handle",
            "class": "App\\Http\\Middleware\\CheckIfVerified",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Auth\/Middleware\/Authenticate.php",
            "line": 44,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php",
            "line": 167,
            "function": "handle",
            "class": "Illuminate\\Auth\\Middleware\\Authenticate",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/app\/Http\/Middleware\/GrabGclidCookie.php",
            "line": 31,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php",
            "line": 167,
            "function": "handle",
            "class": "App\\Http\\Middleware\\GrabGclidCookie",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/app\/Http\/Middleware\/TrackRequests.php",
            "line": 41,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php",
            "line": 167,
            "function": "handle",
            "class": "App\\Http\\Middleware\\TrackRequests",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Middleware\/SubstituteBindings.php",
            "line": 50,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php",
            "line": 167,
            "function": "handle",
            "class": "Illuminate\\Routing\\Middleware\\SubstituteBindings",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Middleware\/ThrottleRequests.php",
            "line": 90,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Middleware\/ThrottleRequests.php",
            "line": 55,
            "function": "handleRequestUsingNamedLimiter",
            "class": "Illuminate\\Routing\\Middleware\\ThrottleRequests",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php",
            "line": 167,
            "function": "handle",
            "class": "Illuminate\\Routing\\Middleware\\ThrottleRequests",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php",
            "line": 103,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Router.php",
            "line": 697,
            "function": "then",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Router.php",
            "line": 672,
            "function": "runRouteWithinStack",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Router.php",
            "line": 636,
            "function": "runRoute",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Router.php",
            "line": 625,
            "function": "dispatchToRoute",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Http\/Kernel.php",
            "line": 166,
            "function": "dispatch",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php",
            "line": 128,
            "function": "Illuminate\\Foundation\\Http\\{closure}",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/app\/Http\/Middleware\/CheckIfServiceNotExpired.php",
            "line": 38,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php",
            "line": 167,
            "function": "handle",
            "class": "App\\Http\\Middleware\\CheckIfServiceNotExpired",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/fruitcake\/laravel-cors\/src\/HandleCors.php",
            "line": 38,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php",
            "line": 167,
            "function": "handle",
            "class": "Fruitcake\\Cors\\HandleCors",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Http\/Middleware\/TransformsRequest.php",
            "line": 21,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php",
            "line": 167,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/fideloper\/proxy\/src\/TrustProxies.php",
            "line": 57,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php",
            "line": 167,
            "function": "handle",
            "class": "Fideloper\\Proxy\\TrustProxies",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Http\/Middleware\/TransformsRequest.php",
            "line": 21,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Http\/Middleware\/ConvertEmptyStringsToNull.php",
            "line": 31,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php",
            "line": 167,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Http\/Middleware\/TransformsRequest.php",
            "line": 21,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php",
            "line": 167,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Http\/Middleware\/TransformsRequest.php",
            "line": 21,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Http\/Middleware\/TrimStrings.php",
            "line": 40,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php",
            "line": 167,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TrimStrings",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Http\/Middleware\/ValidatePostSize.php",
            "line": 27,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php",
            "line": 167,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Http\/Middleware\/PreventRequestsDuringMaintenance.php",
            "line": 86,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php",
            "line": 167,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/beyondcode\/laravel-server-timing\/src\/Middleware\/ServerTimingMiddleware.php",
            "line": 28,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php",
            "line": 167,
            "function": "handle",
            "class": "BeyondCode\\ServerTiming\\Middleware\\ServerTimingMiddleware",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php",
            "line": 103,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Http\/Kernel.php",
            "line": 141,
            "function": "then",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Http\/Kernel.php",
            "line": 110,
            "function": "sendRequestThroughRouter",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/knuckleswtf\/scribe\/src\/Extracting\/Strategies\/Responses\/ResponseCalls.php",
            "line": 287,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/knuckleswtf\/scribe\/src\/Extracting\/Strategies\/Responses\/ResponseCalls.php",
            "line": 275,
            "function": "callLaravelOrLumenRoute",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/knuckleswtf\/scribe\/src\/Extracting\/Strategies\/Responses\/ResponseCalls.php",
            "line": 86,
            "function": "makeApiCall",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/knuckleswtf\/scribe\/src\/Extracting\/Strategies\/Responses\/ResponseCalls.php",
            "line": 44,
            "function": "makeResponseCall",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/knuckleswtf\/scribe\/src\/Extracting\/Strategies\/Responses\/ResponseCalls.php",
            "line": 34,
            "function": "makeResponseCallIfConditionsPass",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/knuckleswtf\/scribe\/src\/Extracting\/Extractor.php",
            "line": 228,
            "function": "__invoke",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/knuckleswtf\/scribe\/src\/Extracting\/Extractor.php",
            "line": 185,
            "function": "iterateThroughStrategies",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/knuckleswtf\/scribe\/src\/Extracting\/Extractor.php",
            "line": 119,
            "function": "fetchResponses",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/knuckleswtf\/scribe\/src\/Commands\/GenerateDocumentation.php",
            "line": 111,
            "function": "processRoute",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/knuckleswtf\/scribe\/src\/Commands\/GenerateDocumentation.php",
            "line": 322,
            "function": "extractEndpointsInfoFromLaravelApp",
            "class": "Knuckles\\Scribe\\Commands\\GenerateDocumentation",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/knuckleswtf\/scribe\/src\/Commands\/GenerateDocumentation.php",
            "line": 56,
            "function": "extractEndpointsInfoAndWriteToDisk",
            "class": "Knuckles\\Scribe\\Commands\\GenerateDocumentation",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Container\/BoundMethod.php",
            "line": 36,
            "function": "handle",
            "class": "Knuckles\\Scribe\\Commands\\GenerateDocumentation",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Container\/Util.php",
            "line": 40,
            "function": "Illuminate\\Container\\{closure}",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Container\/BoundMethod.php",
            "line": 93,
            "function": "unwrapIfClosure",
            "class": "Illuminate\\Container\\Util",
            "type": "::"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Container\/BoundMethod.php",
            "line": 37,
            "function": "callBoundMethod",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Container\/Container.php",
            "line": 614,
            "function": "call",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Console\/Command.php",
            "line": 136,
            "function": "call",
            "class": "Illuminate\\Container\\Container",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/symfony\/console\/Command\/Command.php",
            "line": 288,
            "function": "execute",
            "class": "Illuminate\\Console\\Command",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Console\/Command.php",
            "line": 121,
            "function": "run",
            "class": "Symfony\\Component\\Console\\Command\\Command",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/symfony\/console\/Application.php",
            "line": 974,
            "function": "run",
            "class": "Illuminate\\Console\\Command",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/symfony\/console\/Application.php",
            "line": 291,
            "function": "doRunCommand",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/symfony\/console\/Application.php",
            "line": 167,
            "function": "doRun",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Console\/Application.php",
            "line": 92,
            "function": "run",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Console\/Kernel.php",
            "line": 129,
            "function": "run",
            "class": "Illuminate\\Console\\Application",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/artisan",
            "line": 37,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Console\\Kernel",
            "type": "->"
        }
    ]
}
 
        

Request   

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

URL Parameters

agent  integer  

The ID of the mailbox to update.

Body Parameters

name  string  

The name of the mailbox.

timeZone  integer  

The ID of the TimeZone for the mailbox.

aliases  string[] optional  

An array of email aliases for the mailbox.

Mailboxes -Exchange - Bulk Add

requires authentication

Store a list of Exchange Mailboxes

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

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

let body = {
    "service_account_email": "service_account@example.com",
    "service_account_password": "secret",
    "exchange_server": "vitae",
    "emails": [
        "agent_1@example.com"
    ],
    "emails_csv_array": [
        "cristal.ryan@example.com",
        "zita31@example.com"
    ]
}

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://portal.timetoreply.com/api/entities/agents/store-bulk-exchange',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
        ],
        'json' => [
            'service_account_email' => 'service_account@example.com',
            'service_account_password' => 'secret',
            'exchange_server' => 'vitae',
            'emails' => [
                'agent_1@example.com',
            ],
            'emails_csv_array' => [
                'cristal.ryan@example.com',
                'zita31@example.com',
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

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

Request   

POST api/entities/agents/store-bulk-exchange

Body Parameters

service_account_email  string  

The email address of the service account to use for authentication.

service_account_password  string  

The password of the service account to use for authentication.

exchange_server  string optional  

emails_csv  file optional  

A CSV of email addresses to add. This file upload is optional but you must supply either a CSV or a list of emails.

emails  string[] optional  

An array of email address to add. This field is optional, but you must supply either a list of emails or a CSV.

emails_csv_array  string[] optional  

Must be a valid email address.

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"
);

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

let body = {
    "users": [
        {
            "email": "peter.rabbit@gmail.com",
            "name": "Peter Rabbit"
        },
        {
            "email": "peter.rabbit@gmail.com",
            "name": "Peter Rabbit"
        }
    ]
}

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

Example response (200):

                
[
    "peter.rabbit@gmail.com"
]
 
        

Request   

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

Body Parameters

users  object[] optional  

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


users[].email  string  

The email address of the mailbox to add.

users[].name  string  

The name of the mailbox to add.

Mailboxes -Gmail - List

requires authentication

Load potential Gmail mailboxes

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

let 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();
$response = $client->get(
    'https://portal.timetoreply.com/api/entities/agents/load-bulk-agents-gmail',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

                

No-example
 
        

Request   

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

Mailboxes -Imap - Update

requires authentication

Update Imap Mailbox

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

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

let body = {
    "host": "mail.example.com",
    "port": 143,
    "encryption": "tls",
    "username": "example@example.com",
    "password": "secret"
}

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->patch(
    'https://portal.timetoreply.com/api/entities/agents/1/imap',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
        ],
        'json' => [
            'host' => 'mail.example.com',
            'port' => 143,
            'encryption' => 'tls',
            'username' => 'example@example.com',
            'password' => 'secret',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

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

Request   

PATCH api/entities/agents/{agent}/imap

URL Parameters

agent  integer  

The ID of the agent/mailbox to update.

Body Parameters

host  string  

The IMAP Host.

port  integer  

The IMAP port.

encryption  string  

The IMAP encryption type.

username  string  

The IMAP username.

password  string  

The IMAP password.

Mailboxes -Mimecast - Bulk Add

requires authentication

Add a list of email addresses as mailboxes

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

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

let body = {
    "emails": [
        "peter.rabbit@mimecast.com"
    ]
}

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://portal.timetoreply.com/api/entities/agents/mimecast-select-bulk',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
        ],
        'json' => [
            'emails' => [
                'peter.rabbit@mimecast.com',
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

                
[
    "peter.rabbit@mimecast.com"
]
 
        

Request   

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

Body Parameters

emails  string[]  

An array of Mimecast emails.

Mailboxes -Mimecast - List

requires authentication

Load potential Mimecast mailboxes

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

let 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();
$response = $client->get(
    'https://portal.timetoreply.com/api/entities/agents/load-bulk-agents-mimecast',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

                

No-example
 
        

Request   

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

Mailboxes -Mimecast - Search

requires authentication

Search potential Mimecast Mailboxes

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

let 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();
$response = $client->post(
    'https://portal.timetoreply.com/api/entities/agents/search-agents-mimecast',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

                

No-example
 
        

Request   

POST api/entities/agents/search-agents-mimecast

Mailboxes -Mimecast - Token

requires authentication

Generate a Mimecast token from a username and password

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

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

let body = {
    "username": "p.rabbit@example.com",
    "password": "secret"
}

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://portal.timetoreply.com/api/entities/agents/mimecast-auth',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
        ],
        'json' => [
            'username' => 'p.rabbit@example.com',
            'password' => 'secret',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

                
{
    "status": "We have successfully created a Mimecast authentication token. Please go to https:\/\/portal.timetoreply.com\/api\/entities\/agents\/load-bulk-agents-mimecast to select which mailboxes to add"
}
 
        

Request   

POST api/entities/agents/mimecast-auth

Body Parameters

username  string  

The Mimecast username.

password  string  

The Mimecast password.

Mailboxes -Mimecast - Update List

requires authentication

Force an update of potential Mimecast mailboxes

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

let 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();
$response = $client->post(
    'https://portal.timetoreply.com/api/entities/agents/force-sync-mimecast-agents',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

                

No-example
 
        

Request   

POST api/entities/agents/force-sync-mimecast-agents

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/msgraph-select-bulk"
);

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

let body = {
    "users": [
        {
            "id": "12345-12345-12345",
            "mail": "peter.rabbit@o365.com",
            "name": "Peter Rabbit",
            "userPrincipalName": "peter.rabbit@o365.com"
        },
        {
            "id": "12345-12345-12345",
            "mail": "peter.rabbit@o365.com",
            "name": "Peter Rabbit",
            "userPrincipalName": "peter.rabbit@o365.com"
        }
    ]
}

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://portal.timetoreply.com/api/entities/agents/msgraph-select-bulk',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
        ],
        'json' => [
            'users' => [
                [
                    'id' => '12345-12345-12345',
                    'mail' => 'peter.rabbit@o365.com',
                    'name' => 'Peter Rabbit',
                    'userPrincipalName' => 'peter.rabbit@o365.com',
                ],
                [
                    'id' => '12345-12345-12345',
                    'mail' => 'peter.rabbit@o365.com',
                    'name' => 'Peter Rabbit',
                    'userPrincipalName' => 'peter.rabbit@o365.com',
                ],
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

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

Request   

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

Body Parameters

users  object[]  

An array of O365 "user" objects.


users[].id  string  

The O365 user ID.

users[].mail  string  

The O365 user Email.

users[].name  string  

The O365 user's name.

users[].userPrincipalName  string  

The O365 User Principal Name.

Mailboxes -O365 - List

requires authentication

Load potential O365 Mailboxes

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

let 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();
$response = $client->get(
    'https://portal.timetoreply.com/api/entities/agents/load-bulk-agents',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

                
{
    "name": "Peter Rabbit",
    "id": "12345abcd",
    "mail": "peter.rabbit@example.com",
    "userPrincipalName": "peter.rabbit@example.com"
}
 
        

Request   

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

Mailboxes -O365 - Search

requires authentication

Search potential O365 Mailboxes

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

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

let 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();
$response = $client->get(
    'https://portal.timetoreply.com/api/entities/agents/search-bulk-agents',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
        ],
        'query' => [
            'search'=> 'peter',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

                

No-example
 
        

Request   

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

Query Parameters

search  string  

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

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"
);

let 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();
$response = $client->delete(
    'https://portal.timetoreply.com/api/entities/teams/1/agents',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
        ],
        'json' => [
            'ids' => [
                1,
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

Show headers
            cache-control: no-cache, private
content-type: application/json
tracking-events: []
 
            
                
{
    "current_page": 1,
    "data": [
        {
            "id": 2,
            "name": "Lelia Turner",
            "email_usernames": [
                "l.turner@timetoreply.com"
            ],
            "model_type": "Agent",
            "icon": "user-plus"
        },
        {
            "id": 3,
            "name": "Nicolette Ullrich",
            "email_usernames": [
                "n.ullrich@timetoreply.com"
            ],
            "model_type": "Agent",
            "icon": "user-plus"
        }
    ],
    "first_page_url": "https:\/\/portal.timetoreply.com\/api\/entities\/teams\/1\/agents?page=1",
    "from": 1,
    "last_page": 1,
    "last_page_url": "https:\/\/portal.timetoreply.com\/api\/entities\/teams\/1\/agents?page=1",
    "links": [
        {
            "url": null,
            "label": "« Previous",
            "active": false
        },
        {
            "url": "https:\/\/portal.timetoreply.com\/api\/entities\/teams\/1\/agents?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
}
 
        

Request   

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

URL Parameters

team  integer  

The ID of the Team.

Body Parameters

ids  integer[]  

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

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"
);

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

let 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();
$response = $client->get(
    'https://portal.timetoreply.com/api/entities/teams/1/agents',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
        ],
        'query' => [
            'sort_by'=> 'name',
            'direction'=> 'asc',
            'per_page'=> '2',
            'page'=> '1',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

Show headers
            cache-control: no-cache, private
content-type: application/json
tracking-events: []
 
            
                
{
    "current_page": 1,
    "data": [
        {
            "id": 2,
            "name": "Lelia Turner",
            "email_usernames": [
                "l.turner@timetoreply.com"
            ],
            "model_type": "Agent",
            "icon": "user-plus"
        },
        {
            "id": 3,
            "name": "Nicolette Ullrich",
            "email_usernames": [
                "n.ullrich@timetoreply.com"
            ],
            "model_type": "Agent",
            "icon": "user-plus"
        }
    ],
    "first_page_url": "https:\/\/portal.timetoreply.com\/api\/entities\/teams\/1\/agents?page=1",
    "from": 1,
    "last_page": 2,
    "last_page_url": "https:\/\/portal.timetoreply.com\/api\/entities\/teams\/1\/agents?page=2",
    "links": [
        {
            "url": null,
            "label": "« Previous",
            "active": false
        },
        {
            "url": "https:\/\/portal.timetoreply.com\/api\/entities\/teams\/1\/agents?page=1",
            "label": "1",
            "active": true
        },
        {
            "url": "https:\/\/portal.timetoreply.com\/api\/entities\/teams\/1\/agents?page=2",
            "label": "2",
            "active": false
        },
        {
            "url": "https:\/\/portal.timetoreply.com\/api\/entities\/teams\/1\/agents?page=2",
            "label": "Next »",
            "active": false
        }
    ],
    "next_page_url": "https:\/\/portal.timetoreply.com\/api\/entities\/teams\/1\/agents?page=2",
    "path": "https:\/\/portal.timetoreply.com\/api\/entities\/teams\/1\/agents",
    "per_page": 2,
    "prev_page_url": null,
    "to": 2,
    "total": 3
}
 
        

Request   

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

URL Parameters

team  integer  

The ID of the Team to get Members of.

Query Parameters

sort_by  string optional  

The field to sort the mailboxes by.

direction  string optional  

Sort asc or desc.

per_page  number optional  

The number of mailboxes to show per page.

page  number optional  

The page number.

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"
);

let 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();
$response = $client->post(
    'https://portal.timetoreply.com/api/entities/teams/1/agents',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
        ],
        'json' => [
            'ids' => [
                1,
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

Show headers
            cache-control: no-cache, private
content-type: application/json
tracking-events: []
 
            
                
{
    "current_page": 1,
    "data": [
        {
            "id": 2,
            "name": "Lelia Turner",
            "email_usernames": [
                "l.turner@timetoreply.com"
            ],
            "model_type": "Agent",
            "icon": "user-plus"
        },
        {
            "id": 3,
            "name": "Nicolette Ullrich",
            "email_usernames": [
                "n.ullrich@timetoreply.com"
            ],
            "model_type": "Agent",
            "icon": "user-plus"
        },
        {
            "id": 1,
            "name": "Peter Rabbit",
            "email_usernames": [
                "h.herman@timetoreply.com",
                "alias@example.net"
            ],
            "model_type": "Agent",
            "icon": "user-plus"
        }
    ],
    "first_page_url": "https:\/\/portal.timetoreply.com\/api\/entities\/teams\/1\/agents?page=1",
    "from": 1,
    "last_page": 1,
    "last_page_url": "https:\/\/portal.timetoreply.com\/api\/entities\/teams\/1\/agents?page=1",
    "links": [
        {
            "url": null,
            "label": "« Previous",
            "active": false
        },
        {
            "url": "https:\/\/portal.timetoreply.com\/api\/entities\/teams\/1\/agents?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
}
 
        

Request   

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

URL Parameters

team  integer  

The ID of the Team.

Body Parameters

ids  integer[]  

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

Teams - Delete

requires authentication

Delete a Team

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

let 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();
$response = $client->delete(
    'https://portal.timetoreply.com/api/entities/teams/1',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

                
{
    "status": "Team deleted."
}
 
        

Request   

DELETE api/entities/teams/{team}

URL Parameters

team  integer  

The ID of the Team.

Teams - List

requires authentication

Show all teams

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

let params = {
    "per_page": "25",
    "page": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

let 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();
$response = $client->get(
    'https://portal.timetoreply.com/api/entities/teams',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
        ],
        'query' => [
            'per_page'=> '25',
            'page'=> '1',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

Show headers
            cache-control: no-cache, private
content-type: application/json
tracking-events: []
 
            
                
{
    "current_page": 1,
    "data": [
        {
            "id": 1,
            "name": "US Sales Team",
            "email_usernames": [
                "h.herman@timetoreply.com",
                "l.turner@timetoreply.com",
                "n.ullrich@timetoreply.com"
            ],
            "model_type": "Team",
            "icon": "handshake"
        }
    ],
    "first_page_url": "https:\/\/portal.timetoreply.com\/api\/entities\/teams?page=1",
    "from": 1,
    "last_page": 1,
    "last_page_url": "https:\/\/portal.timetoreply.com\/api\/entities\/teams?page=1",
    "links": [
        {
            "url": null,
            "label": "« Previous",
            "active": false
        },
        {
            "url": "https:\/\/portal.timetoreply.com\/api\/entities\/teams?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": 1,
    "total": 1
}
 
        

Request   

GET api/entities/teams

Query Parameters

per_page  integer optional  

For paginated results, how many results per page. Max 200.

page  integer optional  

For paginated results, which page to get.

Teams - Show

requires authentication

Show a single Team

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

let 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();
$response = $client->get(
    'https://portal.timetoreply.com/api/entities/teams/1',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

Show headers
            cache-control: no-cache, private
content-type: application/json
tracking-events: []
 
            
                
{
    "id": 1,
    "name": "US Sales Team",
    "email_usernames": [
        "h.herman@timetoreply.com",
        "l.turner@timetoreply.com",
        "n.ullrich@timetoreply.com"
    ],
    "model_type": "Team",
    "icon": "handshake"
}
 
        

Request   

GET api/entities/teams/{team}

URL Parameters

team  integer  

The ID of the Team.

Teams - Store

requires authentication

Store a new Team

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

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

let body = {
    "name": "US Support Team"
}

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://portal.timetoreply.com/api/entities/teams',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'US Support Team',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

Show headers
            cache-control: no-cache, private
content-type: application/json
tracking-events: []
 
            
                
{
    "id": 2,
    "name": "US Support Team",
    "model_type": "Team",
    "icon": "handshake"
}
 
        

Request   

POST api/entities/teams

Body Parameters

name  string  

The name of the Team.

Teams - Update

requires authentication

Update a Team

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

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

let body = {
    "name": "US Support Team"
}

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->put(
    'https://portal.timetoreply.com/api/entities/teams/1',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'US Support Team',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

Show headers
            cache-control: no-cache, private
content-type: application/json
tracking-events: []
 
            
                
{
    "id": 1,
    "name": "US Support Team",
    "email_usernames": [
        "h.herman@timetoreply.com",
        "l.turner@timetoreply.com",
        "n.ullrich@timetoreply.com"
    ],
    "model_type": "Team",
    "icon": "handshake"
}
 
        

Request   

PUT api/entities/teams/{team}

PATCH api/entities/teams/{team}

URL Parameters

team  integer  

The ID of the Team.

Body Parameters

name  string  

The name of the Team.

Logs

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"
);

let 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();
$response = $client->post(
    'https://portal.timetoreply.com/api/logs/conversations/mark-closed',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
        ],
        'json' => [
            'ids' => [
                8,
                6,
                7,
                5,
                3,
                0,
                9,
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

Show headers
            cache-control: no-cache, private
content-type: application/json
tracking-events: []
 
            
                
{
    "ids": [
        3,
        5,
        6,
        7,
        8,
        9
    ]
}
 
        

Request   

POST api/logs/conversations/mark-closed

Body Parameters

ids  integer[]  

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

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"
);

let params = {
    "internet_message_id": "1601678270iYOoAwCjDD@TnlYu0KwPhwXxhcTAeHFJMHlI.DrfT",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

let 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();
$response = $client->get(
    'https://portal.timetoreply.com/api/logs/conversations/get-by-internet-message-id',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
        ],
        'query' => [
            'internet_message_id'=> '1601678270iYOoAwCjDD@TnlYu0KwPhwXxhcTAeHFJMHlI.DrfT',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

Show headers
            cache-control: no-cache, private
content-type: application/json
tracking-events: []
 
            
                
{
    "id": 202,
    "init_agent_reply_time": null,
    "init_agent_action_time": 11469,
    "total_agent_reply_time": 11469,
    "last_received_at_date_time": "Jun 3rd 2021 17:40:40",
    "thread_type": "inbound",
    "thread_status": "internal",
    "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,
    "friendly_initial_reply_time": "Pending",
    "friendly_raw_initial_reply_time": "Pending",
    "friendly_total_reply_time": "03h:11m:09s",
    "microsoft_conversations": [
        "TsZ0h09yOVoD2E9V49"
    ],
    "email_usernames": [
        "guido.haag@waters.com",
        "n.ullrich@timetoreply.com",
        "l.turner@timetoreply.com"
    ],
    "email_usernames_from": [
        "guido.haag@waters.com",
        "n.ullrich@timetoreply.com"
    ],
    "email_usernames_to": [
        "n.ullrich@timetoreply.com",
        "l.turner@timetoreply.com"
    ],
    "email_usernames_received": [
        "n.ullrich@timetoreply.com",
        "l.turner@timetoreply.com"
    ],
    "email_domains": [
        "waters.com",
        "timetoreply.com"
    ],
    "date_times": [
        "2021-06-03 12:48:51",
        "2021-06-03 16:40:40"
    ],
    "message_classifications": [
        "first",
        "forward"
    ],
    "message_subjects": [
        "Dolore non cupiditate excepturi.",
        "FW: Dolore non cupiditate excepturi."
    ],
    "messages": [
        {
            "internet_message_id": "1602305795wctbvkzCxz@3cRZRVO29QBgHT3WA97VipNyX.qmqi",
            "date_time": "Jun 3rd 2021 17:40:40",
            "subject": "FW: Dolore non cupiditate excepturi.",
            "references": [
                "1468814510mgPM9AU1bA@1BwSQxBYn6nRLIA7exOGVNbUB.r578",
                "1467163678Xo6F6qUPNQ@koVh75fbK54dbDjs1j9cXcBx3.yalg",
                "1466250279SfG7gqXNcW@grnbk7LZ81GempnQtbXZO13vy.bJ6c",
                "1464547527ESKglh56GY@OgfO3wUHcKvvG60hcNcDANygE.KZzH",
                "1464547527QoFsUmGoPX@EAAtsvIKxwwBtqzFdNRoiMKsA.1CZX"
            ],
            "replytime": 11469,
            "classification": "forward",
            "raw_replytime": 13909,
            "friendly_reply_time": "03h:11m:09s",
            "friendly_raw_reply_time": "03h:51m:49s",
            "email_domains": [
                "timetoreply.com"
            ],
            "email_domains_from": [
                "timetoreply.com"
            ],
            "email_domains_to": [
                "timetoreply.com"
            ],
            "email_domains_received": [
                "timetoreply.com"
            ],
            "email_usernames": [
                "n.ullrich@timetoreply.com",
                "l.turner@timetoreply.com"
            ],
            "email_usernames_from": [
                "n.ullrich@timetoreply.com"
            ],
            "email_usernames_to": [
                "l.turner@timetoreply.com"
            ],
            "email_usernames_cc": [],
            "email_usernames_received": [
                "l.turner@timetoreply.com"
            ],
            "is_initial_reply": false,
            "thread_ids": [
                202
            ],
            "message_type": "internal",
            "labels": [],
            "is_closing_email": false,
            "is_included_in_stats": true,
            "timestamp": 1622738440,
            "reply_is_relevant": true,
            "reply_is_outlier": false,
            "agents_read_status": {
                "l.turner@timetoreply.com": true
            }
        },
        {
            "internet_message_id": "1464547527QoFsUmGoPX@EAAtsvIKxwwBtqzFdNRoiMKsA.1CZX",
            "date_time": "Jun 3rd 2021 13:48:51",
            "subject": "Dolore non cupiditate excepturi.",
            "references": [
                "1468814510mgPM9AU1bA@1BwSQxBYn6nRLIA7exOGVNbUB.r578",
                "1467163678Xo6F6qUPNQ@koVh75fbK54dbDjs1j9cXcBx3.yalg",
                "1466250279SfG7gqXNcW@grnbk7LZ81GempnQtbXZO13vy.bJ6c",
                "1464547527ESKglh56GY@OgfO3wUHcKvvG60hcNcDANygE.KZzH"
            ],
            "replytime": null,
            "classification": "first",
            "raw_replytime": null,
            "friendly_reply_time": "N\/A",
            "friendly_raw_reply_time": "N\/A",
            "email_domains": [
                "waters.com",
                "timetoreply.com"
            ],
            "email_domains_from": [
                "waters.com"
            ],
            "email_domains_to": [
                "timetoreply.com"
            ],
            "email_domains_received": [
                "timetoreply.com"
            ],
            "email_usernames": [
                "guido.haag@waters.com",
                "n.ullrich@timetoreply.com"
            ],
            "email_usernames_from": [
                "guido.haag@waters.com"
            ],
            "email_usernames_to": [
                "n.ullrich@timetoreply.com"
            ],
            "email_usernames_cc": [],
            "email_usernames_received": [
                "n.ullrich@timetoreply.com"
            ],
            "is_initial_reply": false,
            "thread_ids": [
                202
            ],
            "message_type": "inbound",
            "labels": [],
            "is_closing_email": false,
            "is_included_in_stats": true,
            "timestamp": 1622724531,
            "reply_is_relevant": false,
            "reply_is_outlier": false,
            "agents_read_status": {
                "n.ullrich@timetoreply.com": true
            }
        }
    ],
    "labels": [],
    "has_contact_success": false,
    "contact_success_time": null,
    "contact_reply_time": null,
    "subject": "FW: Dolore non cupiditate excepturi.",
    "initial_reply_is_relevant": true,
    "initial_reply_is_outlier": false,
    "friendly_time_to_close": "N\/A",
    "friendly_raw_time_to_close": "N\/A"
}
 
        

Request   

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

Query Parameters

internet_message_id  string  

The internet message id of the message for which you want the entire conversation.

Conversations - Report

requires authentication

Conversation (Thread) Logs data

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

let params = {
    "from": "2020-01-01",
    "to": "2020-01-08",
    "model": "My Company",
    "model_type": "Internal",
    "exclude_cc": "",
    "model_com": "Top Revenue Customers",
    "model_type_com": "Customer Group",
    "exclude_cc_com": "",
    "exclusive": "",
    "label": "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]));

let 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();
$response = $client->get(
    'https://portal.timetoreply.com/api/logs/conversations',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
        ],
        'query' => [
            'from'=> '2020-01-01',
            'to'=> '2020-01-08',
            'model'=> 'My Company',
            'model_type'=> 'Internal',
            'exclude_cc'=> '',
            'model_com'=> 'Top Revenue Customers',
            'model_type_com'=> 'Customer Group',
            'exclude_cc_com'=> '',
            'exclusive'=> '',
            'label'=> '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));

Example response (200):

Show headers
            cache-control: no-cache, private
content-type: application/json
tracking-events: []
 
            
                
{
    "threads": {
        "current_page": 1,
        "data": [
            {
                "id": 6,
                "init_agent_reply_time": 1647,
                "init_agent_action_time": 1647,
                "total_agent_reply_time": 1647,
                "last_received_at_date_time": "Jun 9th 2021 11:34:44",
                "thread_type": "inbound",
                "thread_status": "await-customer",
                "raw_init_agent_reply_time": 1647,
                "init_agent_reply_message_id": "1474964773opdlTNWqXE@UnLt9leD5E1XC4oWDIuDqt0fc.UYVi",
                "init_reply_agent_id": 2,
                "time_to_close": null,
                "raw_time_to_close": null,
                "friendly_initial_reply_time": "27m:27s",
                "friendly_raw_initial_reply_time": "27m:27s",
                "friendly_total_reply_time": "27m:27s",
                "microsoft_conversations": [],
                "email_usernames": [
                    "jesus59@ferry.com",
                    "l.turner@timetoreply.com",
                    "kweber@bechtelar.net",
                    "bettye01@price.com"
                ],
                "email_usernames_from": [
                    "jesus59@ferry.com",
                    "l.turner@timetoreply.com"
                ],
                "email_usernames_to": [
                    "l.turner@timetoreply.com",
                    "kweber@bechtelar.net",
                    "jesus59@ferry.com"
                ],
                "email_usernames_received": [
                    "l.turner@timetoreply.com",
                    "kweber@bechtelar.net",
                    "bettye01@price.com",
                    "jesus59@ferry.com"
                ],
                "email_domains": [
                    "ferry.com",
                    "timetoreply.com",
                    "bechtelar.net",
                    "price.com"
                ],
                "date_times": [
                    "2021-06-09 10:07:17",
                    "2021-06-09 10:34:44"
                ],
                "message_classifications": [
                    "first",
                    "reply-all"
                ],
                "message_subjects": [
                    "RE: Necessitatibus consectetur tempore qui odio."
                ],
                "messages": [
                    {
                        "internet_message_id": "1474964773opdlTNWqXE@UnLt9leD5E1XC4oWDIuDqt0fc.UYVi",
                        "date_time": "Jun 9th 2021 11:34:44",
                        "subject": "RE: Necessitatibus consectetur tempore qui odio.",
                        "references": [
                            "1510134456SdDvBXVmi6@XgkPhE9Aeg78oPcGOjgLnrtuq.ekOE",
                            "1601559089JbxkZDMaar@UpbX7amRRrLijxDo53pRlFPr3.wve0"
                        ],
                        "replytime": 1647,
                        "classification": "reply-all",
                        "raw_replytime": 1647,
                        "friendly_reply_time": "27m:27s",
                        "friendly_raw_reply_time": "27m:27s",
                        "email_domains": [
                            "timetoreply.com",
                            "ferry.com",
                            "bechtelar.net",
                            "price.com"
                        ],
                        "email_domains_from": [
                            "timetoreply.com"
                        ],
                        "email_domains_to": [
                            "ferry.com",
                            "bechtelar.net"
                        ],
                        "email_domains_received": [
                            "ferry.com",
                            "bechtelar.net",
                            "price.com"
                        ],
                        "email_usernames": [
                            "l.turner@timetoreply.com",
                            "jesus59@ferry.com",
                            "kweber@bechtelar.net",
                            "bettye01@price.com"
                        ],
                        "email_usernames_from": [
                            "l.turner@timetoreply.com"
                        ],
                        "email_usernames_to": [
                            "jesus59@ferry.com",
                            "kweber@bechtelar.net"
                        ],
                        "email_usernames_cc": [
                            "bettye01@price.com"
                        ],
                        "email_usernames_received": [
                            "jesus59@ferry.com",
                            "kweber@bechtelar.net",
                            "bettye01@price.com"
                        ],
                        "is_initial_reply": true,
                        "thread_ids": [
                            6
                        ],
                        "message_type": "outbound",
                        "labels": [
                            "UNREAD"
                        ],
                        "is_closing_email": false,
                        "is_included_in_stats": true,
                        "timestamp": 1623234884,
                        "reply_is_relevant": true,
                        "reply_is_outlier": false,
                        "agents_read_status": []
                    },
                    {
                        "internet_message_id": "1601559089JbxkZDMaar@UpbX7amRRrLijxDo53pRlFPr3.wve0",
                        "date_time": "Jun 9th 2021 11:07:17",
                        "subject": "RE: Necessitatibus consectetur tempore qui odio.",
                        "references": [
                            "1510134456SdDvBXVmi6@XgkPhE9Aeg78oPcGOjgLnrtuq.ekOE"
                        ],
                        "replytime": null,
                        "classification": "first",
                        "raw_replytime": null,
                        "friendly_reply_time": "N\/A",
                        "friendly_raw_reply_time": "N\/A",
                        "email_domains": [
                            "ferry.com",
                            "timetoreply.com",
                            "bechtelar.net",
                            "price.com"
                        ],
                        "email_domains_from": [
                            "ferry.com"
                        ],
                        "email_domains_to": [
                            "timetoreply.com",
                            "bechtelar.net"
                        ],
                        "email_domains_received": [
                            "timetoreply.com",
                            "bechtelar.net",
                            "price.com"
                        ],
                        "email_usernames": [
                            "jesus59@ferry.com",
                            "l.turner@timetoreply.com",
                            "kweber@bechtelar.net",
                            "bettye01@price.com"
                        ],
                        "email_usernames_from": [
                            "jesus59@ferry.com"
                        ],
                        "email_usernames_to": [
                            "l.turner@timetoreply.com",
                            "kweber@bechtelar.net"
                        ],
                        "email_usernames_cc": [
                            "bettye01@price.com"
                        ],
                        "email_usernames_received": [
                            "l.turner@timetoreply.com",
                            "kweber@bechtelar.net",
                            "bettye01@price.com"
                        ],
                        "is_initial_reply": false,
                        "thread_ids": [
                            6
                        ],
                        "message_type": "inbound",
                        "labels": [
                            "UNREAD"
                        ],
                        "is_closing_email": false,
                        "is_included_in_stats": true,
                        "timestamp": 1623233237,
                        "reply_is_relevant": false,
                        "reply_is_outlier": false,
                        "agents_read_status": {
                            "l.turner@timetoreply.com": false
                        }
                    }
                ],
                "labels": [
                    "UNREAD"
                ],
                "has_contact_success": false,
                "contact_success_time": null,
                "contact_reply_time": null,
                "subject": "RE: Necessitatibus consectetur tempore qui odio.",
                "initial_reply_is_relevant": true,
                "initial_reply_is_outlier": false,
                "friendly_time_to_close": "N\/A",
                "friendly_raw_time_to_close": "N\/A"
            },
            {
                "id": 212,
                "init_agent_reply_time": 2634,
                "init_agent_action_time": 2634,
                "total_agent_reply_time": 19067,
                "last_received_at_date_time": "Jun 7th 2021 16:03:17",
                "thread_type": "outbound",
                "thread_status": "await-agent",
                "raw_init_agent_reply_time": 2634,
                "init_agent_reply_message_id": "1575423852MQjuPmbMck@I95eIdLUu0PPedZOZRALbseFw.gN1W",
                "init_reply_agent_id": null,
                "time_to_close": null,
                "raw_time_to_close": null,
                "friendly_initial_reply_time": "43m:54s",
                "friendly_raw_initial_reply_time": "43m:54s",
                "friendly_total_reply_time": "05h:17m:47s",
                "microsoft_conversations": [],
                "email_usernames": [
                    "n.ullrich@timetoreply.com",
                    "hwindler@casper.com",
                    "noelia55@hammes.com",
                    "hlind@klocko.com",
                    "trisha62@schumm.com",
                    "frowe@pacocha.com",
                    "von.greyson@vandervort.com"
                ],
                "email_usernames_from": [
                    "n.ullrich@timetoreply.com",
                    "noelia55@hammes.com",
                    "hwindler@casper.com"
                ],
                "email_usernames_to": [
                    "hwindler@casper.com",
                    "noelia55@hammes.com",
                    "hlind@klocko.com",
                    "n.ullrich@timetoreply.com"
                ],
                "email_usernames_received": [
                    "hwindler@casper.com",
                    "noelia55@hammes.com",
                    "hlind@klocko.com",
                    "trisha62@schumm.com",
                    "frowe@pacocha.com",
                    "von.greyson@vandervort.com",
                    "n.ullrich@timetoreply.com"
                ],
                "email_domains": [
                    "timetoreply.com",
                    "casper.com",
                    "hammes.com",
                    "klocko.com",
                    "schumm.com",
                    "pacocha.com",
                    "vandervort.com"
                ],
                "date_times": [
                    "2021-06-07 09:45:30",
                    "2021-06-07 10:29:24",
                    "2021-06-07 15:03:17"
                ],
                "message_classifications": [
                    "first",
                    "reply-all",
                    "reply"
                ],
                "message_subjects": [
                    "Repellat officiis eligendi velit et autem nostrum ipsum.",
                    "RE: Repellat officiis eligendi velit et autem nostrum ipsum."
                ],
                "messages": [
                    {
                        "internet_message_id": "1471593884eVm4ozRO51@y03SlU6YbaGrrJGiJjJOvyrvj.a58I",
                        "date_time": "Jun 7th 2021 16:03:17",
                        "subject": "RE: Repellat officiis eligendi velit et autem nostrum ipsum. (Excluded from statistics due to applied filters)",
                        "references": [
                            "1568716342Ennptz0ser@o2cWJt4AnJ1DS6b6sk5EhA8n4.4cF4",
                            "1575423852MQjuPmbMck@I95eIdLUu0PPedZOZRALbseFw.gN1W"
                        ],
                        "replytime": 16433,
                        "classification": "reply",
                        "raw_replytime": 16433,
                        "friendly_reply_time": "04h:33m:53s",
                        "friendly_raw_reply_time": "04h:33m:53s",
                        "email_domains": [
                            "casper.com",
                            "hammes.com"
                        ],
                        "email_domains_from": [
                            "casper.com"
                        ],
                        "email_domains_to": [
                            "hammes.com"
                        ],
                        "email_domains_received": [
                            "hammes.com"
                        ],
                        "email_usernames": [
                            "hwindler@casper.com",
                            "noelia55@hammes.com"
                        ],
                        "email_usernames_from": [
                            "hwindler@casper.com"
                        ],
                        "email_usernames_to": [
                            "noelia55@hammes.com"
                        ],
                        "email_usernames_cc": [],
                        "email_usernames_received": [
                            "noelia55@hammes.com"
                        ],
                        "is_initial_reply": false,
                        "thread_ids": [
                            212
                        ],
                        "message_type": "other",
                        "labels": [
                            "SENT",
                            "CATEGORY_UPDATES"
                        ],
                        "is_closing_email": false,
                        "is_included_in_stats": false,
                        "timestamp": 1623078197,
                        "reply_is_relevant": false,
                        "reply_is_outlier": false,
                        "agents_read_status": []
                    },
                    {
                        "internet_message_id": "1575423852MQjuPmbMck@I95eIdLUu0PPedZOZRALbseFw.gN1W",
                        "date_time": "Jun 7th 2021 11:29:24",
                        "subject": "RE: Repellat officiis eligendi velit et autem nostrum ipsum. (Excluded from statistics due to applied filters)",
                        "references": [
                            "1568716342Ennptz0ser@o2cWJt4AnJ1DS6b6sk5EhA8n4.4cF4"
                        ],
                        "replytime": 2634,
                        "classification": "reply-all",
                        "raw_replytime": 2634,
                        "friendly_reply_time": "43m:54s",
                        "friendly_raw_reply_time": "43m:54s",
                        "email_domains": [
                            "hammes.com",
                            "timetoreply.com",
                            "casper.com",
                            "klocko.com",
                            "schumm.com",
                            "pacocha.com",
                            "vandervort.com"
                        ],
                        "email_domains_from": [
                            "hammes.com"
                        ],
                        "email_domains_to": [
                            "timetoreply.com",
                            "casper.com",
                            "klocko.com"
                        ],
                        "email_domains_received": [
                            "timetoreply.com",
                            "casper.com",
                            "klocko.com",
                            "schumm.com",
                            "pacocha.com",
                            "vandervort.com"
                        ],
                        "email_usernames": [
                            "noelia55@hammes.com",
                            "n.ullrich@timetoreply.com",
                            "hwindler@casper.com",
                            "hlind@klocko.com",
                            "trisha62@schumm.com",
                            "frowe@pacocha.com",
                            "von.greyson@vandervort.com"
                        ],
                        "email_usernames_from": [
                            "noelia55@hammes.com"
                        ],
                        "email_usernames_to": [
                            "n.ullrich@timetoreply.com",
                            "hwindler@casper.com",
                            "hlind@klocko.com"
                        ],
                        "email_usernames_cc": [
                            "trisha62@schumm.com",
                            "frowe@pacocha.com",
                            "von.greyson@vandervort.com"
                        ],
                        "email_usernames_received": [
                            "n.ullrich@timetoreply.com",
                            "hwindler@casper.com",
                            "hlind@klocko.com",
                            "trisha62@schumm.com",
                            "frowe@pacocha.com",
                            "von.greyson@vandervort.com"
                        ],
                        "is_initial_reply": true,
                        "thread_ids": [
                            212
                        ],
                        "message_type": "inbound",
                        "labels": [],
                        "is_closing_email": false,
                        "is_included_in_stats": false,
                        "timestamp": 1623061764,
                        "reply_is_relevant": false,
                        "reply_is_outlier": false,
                        "agents_read_status": {
                            "n.ullrich@timetoreply.com": true
                        }
                    },
                    {
                        "internet_message_id": "1568716342Ennptz0ser@o2cWJt4AnJ1DS6b6sk5EhA8n4.4cF4",
                        "date_time": "Jun 7th 2021 10:45:30",
                        "subject": "Repellat officiis eligendi velit et autem nostrum ipsum.",
                        "references": null,
                        "replytime": null,
                        "classification": "first",
                        "raw_replytime": null,
                        "friendly_reply_time": "N\/A",
                        "friendly_raw_reply_time": "N\/A",
                        "email_domains": [
                            "timetoreply.com",
                            "casper.com",
                            "hammes.com",
                            "klocko.com",
                            "schumm.com",
                            "pacocha.com",
                            "vandervort.com"
                        ],
                        "email_domains_from": [
                            "timetoreply.com"
                        ],
                        "email_domains_to": [
                            "casper.com",
                            "hammes.com",
                            "klocko.com"
                        ],
                        "email_domains_received": [
                            "casper.com",
                            "hammes.com",
                            "klocko.com",
                            "schumm.com",
                            "pacocha.com",
                            "vandervort.com"
                        ],
                        "email_usernames": [
                            "n.ullrich@timetoreply.com",
                            "hwindler@casper.com",
                            "noelia55@hammes.com",
                            "hlind@klocko.com",
                            "trisha62@schumm.com",
                            "frowe@pacocha.com",
                            "von.greyson@vandervort.com"
                        ],
                        "email_usernames_from": [
                            "n.ullrich@timetoreply.com"
                        ],
                        "email_usernames_to": [
                            "hwindler@casper.com",
                            "noelia55@hammes.com",
                            "hlind@klocko.com"
                        ],
                        "email_usernames_cc": [
                            "trisha62@schumm.com",
                            "frowe@pacocha.com",
                            "von.greyson@vandervort.com"
                        ],
                        "email_usernames_received": [
                            "hwindler@casper.com",
                            "noelia55@hammes.com",
                            "hlind@klocko.com",
                            "trisha62@schumm.com",
                            "frowe@pacocha.com",
                            "von.greyson@vandervort.com"
                        ],
                        "is_initial_reply": false,
                        "thread_ids": [
                            212
                        ],
                        "message_type": "outbound",
                        "labels": [],
                        "is_closing_email": false,
                        "is_included_in_stats": true,
                        "timestamp": 1623059130,
                        "reply_is_relevant": true,
                        "reply_is_outlier": false,
                        "agents_read_status": []
                    }
                ],
                "labels": [
                    "SENT",
                    "CATEGORY_UPDATES"
                ],
                "has_contact_success": false,
                "contact_success_time": null,
                "contact_reply_time": null,
                "subject": "RE: Repellat officiis eligendi velit et autem nostrum ipsum.",
                "initial_reply_is_relevant": false,
                "initial_reply_is_outlier": false,
                "friendly_time_to_close": "N\/A",
                "friendly_raw_time_to_close": "N\/A"
            }
        ],
        "first_page_url": "https:\/\/portal.timetoreply.com\/api\/logs\/conversations?page=1",
        "from": 1,
        "last_page": 3,
        "last_page_url": "https:\/\/portal.timetoreply.com\/api\/logs\/conversations?page=3",
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "https:\/\/portal.timetoreply.com\/api\/logs\/conversations?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": "https:\/\/portal.timetoreply.com\/api\/logs\/conversations?page=2",
                "label": "2",
                "active": false
            },
            {
                "url": "https:\/\/portal.timetoreply.com\/api\/logs\/conversations?page=3",
                "label": "3",
                "active": false
            },
            {
                "url": "https:\/\/portal.timetoreply.com\/api\/logs\/conversations?page=2",
                "label": "Next »",
                "active": false
            }
        ],
        "next_page_url": "https:\/\/portal.timetoreply.com\/api\/logs\/conversations?page=2",
        "path": "https:\/\/portal.timetoreply.com\/api\/logs\/conversations",
        "per_page": 2,
        "prev_page_url": null,
        "to": 2,
        "total": 6
    },
    "stats": {
        "threads": {
            "total": 6,
            "internal": 0,
            "inbound": 3,
            "outbound": 3,
            "sentInternally": 0,
            "awaitCustomer": 5,
            "awaitAgent": 1,
            "closed": 0,
            "haveReplies": 4,
            "haveRepliesFromAgents": 3,
            "completionRatio": "50.00%"
        },
        "messages": {
            "count": 13,
            "initial": 6,
            "replies": 6,
            "replyAll": 1,
            "forward": 0,
            "received": {
                "count": 5,
                "initial": 3,
                "replies": 2,
                "replyAll": 0,
                "forward": 0,
                "initialReplies": 1,
                "dayOfWeek": {
                    "Friday": 0,
                    "Monday": 0,
                    "Saturday": 0,
                    "Sunday": 0,
                    "Thursday": 0,
                    "Tuesday": 0,
                    "Wednesday": 2.5
                },
                "hourOfDay": {
                    "00:00": 0.143,
                    "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.143,
                    "11:00": 0.143,
                    "12:00": 0.143,
                    "13:00": 0.143,
                    "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
                }
            },
            "sent": {
                "count": 8,
                "initial": 3,
                "replies": 4,
                "replyAll": 1,
                "forward": 0,
                "initialReplies": 3,
                "dayOfWeek": {
                    "Friday": 1,
                    "Monday": 1,
                    "Saturday": 0,
                    "Sunday": 0,
                    "Thursday": 1,
                    "Tuesday": 0,
                    "Wednesday": 2.5
                },
                "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.714,
                    "11:00": 0.143,
                    "12:00": 0.143,
                    "13:00": 0.143,
                    "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": "26m:42s",
            "raw": 1602.4,
            "friendlyNoBusiness": "02h:08m:39s",
            "rawNoBusiness": 7719.8,
            "percentileRanks": [
                {
                    "key": "15m:00s",
                    "value": "45.70%"
                },
                {
                    "key": "01h:00m",
                    "value": "100.00%"
                },
                {
                    "key": "02h:00m",
                    "value": "100.00%"
                },
                {
                    "key": "04h:00m",
                    "value": "100.00%"
                },
                {
                    "key": "08h:00m",
                    "value": "100.00%"
                },
                {
                    "key": "24h:00m",
                    "value": "100.00%"
                }
            ],
            "percentileRanksRaw": [
                {
                    "key": "15m:00s",
                    "value": "45.70%"
                },
                {
                    "key": "01h:00m",
                    "value": "62.67%"
                },
                {
                    "key": "02h:00m",
                    "value": "66.84%"
                },
                {
                    "key": "04h:00m",
                    "value": "75.20%"
                },
                {
                    "key": "08h:00m",
                    "value": "100.00%"
                },
                {
                    "key": "24h:00m",
                    "value": "100.00%"
                }
            ]
        },
        "initialTTR": {
            "friendly": "36m:17s",
            "raw": 2177.6666666666665,
            "friendlyNoBusiness": "03h:26m:13s",
            "rawNoBusiness": 12373.333333333334,
            "percentileRanks": [
                {
                    "key": "15m:00s",
                    "value": "34.12%"
                },
                {
                    "key": "01h:00m",
                    "value": "100.00%"
                },
                {
                    "key": "02h:00m",
                    "value": "100.00%"
                },
                {
                    "key": "04h:00m",
                    "value": "100.00%"
                },
                {
                    "key": "08h:00m",
                    "value": "100.00%"
                },
                {
                    "key": "24h:00m",
                    "value": "100.00%"
                }
            ],
            "percentileRanksRaw": [
                {
                    "key": "15m:00s",
                    "value": "33.44%"
                },
                {
                    "key": "01h:00m",
                    "value": "38.53%"
                },
                {
                    "key": "02h:00m",
                    "value": "45.31%"
                },
                {
                    "key": "04h:00m",
                    "value": "58.87%"
                },
                {
                    "key": "08h:00m",
                    "value": "100.00%"
                },
                {
                    "key": "24h:00m",
                    "value": "100.00%"
                }
            ]
        },
        "overallTTF": {
            "friendly": "N\/A",
            "raw": null,
            "friendlyNoBusiness": "N\/A",
            "rawNoBusiness": null,
            "percentileRanks": [
                {
                    "key": "15m:00s",
                    "value": "0.00%"
                },
                {
                    "key": "01h:00m",
                    "value": "0.00%"
                },
                {
                    "key": "02h:00m",
                    "value": "0.00%"
                },
                {
                    "key": "04h:00m",
                    "value": "0.00%"
                },
                {
                    "key": "08h:00m",
                    "value": "0.00%"
                },
                {
                    "key": "24h:00m",
                    "value": "0.00%"
                }
            ],
            "percentileRanksRaw": [
                {
                    "key": "15m:00s",
                    "value": "0.00%"
                },
                {
                    "key": "01h:00m",
                    "value": "0.00%"
                },
                {
                    "key": "02h:00m",
                    "value": "0.00%"
                },
                {
                    "key": "04h:00m",
                    "value": "0.00%"
                },
                {
                    "key": "08h:00m",
                    "value": "0.00%"
                },
                {
                    "key": "24h:00m",
                    "value": "0.00%"
                }
            ]
        },
        "overallTTC": {
            "friendly": "N\/A",
            "raw": null,
            "friendlyNoBusiness": "N\/A",
            "rawNoBusiness": null,
            "percentileRanks": [
                {
                    "key": "15m:00s",
                    "value": "0.00%"
                },
                {
                    "key": "01h:00m",
                    "value": "0.00%"
                },
                {
                    "key": "02h:00m",
                    "value": "0.00%"
                },
                {
                    "key": "04h:00m",
                    "value": "0.00%"
                },
                {
                    "key": "08h:00m",
                    "value": "0.00%"
                },
                {
                    "key": "24h:00m",
                    "value": "0.00%"
                }
            ],
            "percentileRanksRaw": [
                {
                    "key": "15m:00s",
                    "value": "0.00%"
                },
                {
                    "key": "01h:00m",
                    "value": "0.00%"
                },
                {
                    "key": "02h:00m",
                    "value": "0.00%"
                },
                {
                    "key": "04h:00m",
                    "value": "0.00%"
                },
                {
                    "key": "08h:00m",
                    "value": "0.00%"
                },
                {
                    "key": "24h:00m",
                    "value": "0.00%"
                }
            ]
        },
        "dailyStats": [
            {
                "timestamp": 1622588400000,
                "date": "Wed, 2nd Jun",
                "messages": {
                    "sent": 4,
                    "forward": 0,
                    "reply": 4,
                    "received": 4
                },
                "overallTTR": {
                    "raw": 1591.25,
                    "rawNoBusiness": 9238
                },
                "overallTTF": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "initialTTR": {
                    "raw": 2443,
                    "rawNoBusiness": 17736.5
                },
                "threads": {
                    "total": 2,
                    "haveRepliesFromAgents": 2,
                    "noReplyFromAgents": 0,
                    "completionRatio": 100
                }
            },
            {
                "timestamp": 1622674800000,
                "date": "Thu, 3rd Jun",
                "messages": {
                    "sent": 1,
                    "forward": 0,
                    "reply": 0,
                    "received": 0
                },
                "overallTTR": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "overallTTF": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "initialTTR": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "threads": {
                    "total": 1,
                    "haveRepliesFromAgents": 0,
                    "noReplyFromAgents": 0,
                    "completionRatio": 0
                }
            },
            {
                "timestamp": 1622761200000,
                "date": "Fri, 4th Jun",
                "messages": {
                    "sent": 1,
                    "forward": 0,
                    "reply": 0,
                    "received": 0
                },
                "overallTTR": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "overallTTF": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "initialTTR": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "threads": {
                    "total": 1,
                    "haveRepliesFromAgents": 0,
                    "noReplyFromAgents": 0,
                    "completionRatio": 0
                }
            },
            {
                "timestamp": 1622847600000,
                "date": "Sat, 5th Jun",
                "messages": {
                    "sent": 0,
                    "forward": 0,
                    "reply": 0,
                    "received": 0
                },
                "overallTTR": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "overallTTF": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "initialTTR": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "threads": {
                    "total": 0,
                    "haveRepliesFromAgents": 0,
                    "noReplyFromAgents": 0,
                    "completionRatio": 0
                }
            },
            {
                "timestamp": 1622934000000,
                "date": "Sun, 6th Jun",
                "messages": {
                    "sent": 0,
                    "forward": 0,
                    "reply": 0,
                    "received": 0
                },
                "overallTTR": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "overallTTF": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "initialTTR": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "threads": {
                    "total": 0,
                    "haveRepliesFromAgents": 0,
                    "noReplyFromAgents": 0,
                    "completionRatio": 0
                }
            },
            {
                "timestamp": 1623020400000,
                "date": "Mon, 7th Jun",
                "messages": {
                    "sent": 1,
                    "forward": 0,
                    "reply": 0,
                    "received": 0
                },
                "overallTTR": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "overallTTF": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "initialTTR": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "threads": {
                    "total": 1,
                    "haveRepliesFromAgents": 0,
                    "noReplyFromAgents": 0,
                    "completionRatio": 0
                }
            },
            {
                "timestamp": 1623106800000,
                "date": "Tue, 8th Jun",
                "messages": {
                    "sent": 0,
                    "forward": 0,
                    "reply": 0,
                    "received": 0
                },
                "overallTTR": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "overallTTF": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "initialTTR": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "threads": {
                    "total": 0,
                    "haveRepliesFromAgents": 0,
                    "noReplyFromAgents": 0,
                    "completionRatio": 0
                }
            },
            {
                "timestamp": 1623193200000,
                "date": "Wed, 9th Jun",
                "messages": {
                    "sent": 1,
                    "forward": 0,
                    "reply": 1,
                    "received": 1
                },
                "overallTTR": {
                    "raw": 1647,
                    "rawNoBusiness": 1647
                },
                "overallTTF": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "initialTTR": {
                    "raw": 1647,
                    "rawNoBusiness": 1647
                },
                "threads": {
                    "total": 1,
                    "haveRepliesFromAgents": 1,
                    "noReplyFromAgents": 0,
                    "completionRatio": 100
                }
            }
        ]
    }
}
 
        

Request   

GET api/logs/conversations

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".

to  string optional  

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

model  string optional  

Name, email address or domain you want statistics for. Use the models endpoint to get a list.

model_type  string optional  

Model Type of the model being queried. Use "Customer" for email address and domain.

exclude_cc  boolean optional  

Should we exclude CC messages from the statistics.

model_com  string optional  

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

model_type_com  string optional  

Model Type of the model you are communicating with. Use "Customer" for email address and domain.

exclude_cc_com  boolean optional  

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

exclusive  boolean optional  

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

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.

thread_status  string optional  

A comma separated list (no spaces) of any combination of the following: 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.

classification  string optional  

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

messageType  string optional  

A comma separated list (no spaces) of any combination of the following: 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.

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.

no_reply_for  integer optional  

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

per_page  integer optional  

For paginated results, how many results per page. Max 200.

sort_by  string optional  

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

direction  string optional  

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

page  integer optional  

For paginated results, which page to get.

Messages - Report

requires authentication

Message Logs data

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

let params = {
    "from": "2020-01-01",
    "to": "2020-01-08",
    "model": "My Company",
    "model_type": "Internal",
    "exclude_cc": "",
    "model_com": "Top Revenue Customers",
    "model_type_com": "Customer Group",
    "exclude_cc_com": "",
    "exclusive": "",
    "label": "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]));

let 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();
$response = $client->get(
    'https://portal.timetoreply.com/api/logs/messages',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
        ],
        'query' => [
            'from'=> '2020-01-01',
            'to'=> '2020-01-08',
            'model'=> 'My Company',
            'model_type'=> 'Internal',
            'exclude_cc'=> '',
            'model_com'=> 'Top Revenue Customers',
            'model_type_com'=> 'Customer Group',
            'exclude_cc_com'=> '',
            'exclusive'=> '',
            'label'=> '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));

Example response (200):

Show headers
            cache-control: no-cache, private
content-type: application/json
tracking-events: []
 
            
                
{
    "stats": {
        "threads": {
            "total": 6,
            "internal": 0,
            "inbound": 3,
            "outbound": 3,
            "sentInternally": 0,
            "awaitCustomer": 4,
            "awaitAgent": 1,
            "closed": 1,
            "haveReplies": 4,
            "haveRepliesFromAgents": 3,
            "completionRatio": "50.00%"
        },
        "messages": {
            "count": 13,
            "initial": 6,
            "replies": 6,
            "replyAll": 1,
            "forward": 0,
            "received": {
                "count": 5,
                "initial": 3,
                "replies": 2,
                "replyAll": 0,
                "forward": 0,
                "initialReplies": 1,
                "dayOfWeek": {
                    "Friday": 0,
                    "Monday": 0,
                    "Saturday": 0,
                    "Sunday": 0,
                    "Thursday": 0,
                    "Tuesday": 0,
                    "Wednesday": 2.5
                },
                "hourOfDay": {
                    "00:00": 0.143,
                    "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.143,
                    "11:00": 0.143,
                    "12:00": 0.143,
                    "13:00": 0.143,
                    "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
                }
            },
            "sent": {
                "count": 8,
                "initial": 3,
                "replies": 4,
                "replyAll": 1,
                "forward": 0,
                "initialReplies": 3,
                "dayOfWeek": {
                    "Friday": 1,
                    "Monday": 1,
                    "Saturday": 0,
                    "Sunday": 0,
                    "Thursday": 1,
                    "Tuesday": 0,
                    "Wednesday": 2.5
                },
                "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.714,
                    "11:00": 0.143,
                    "12:00": 0.143,
                    "13:00": 0.143,
                    "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": "26m:42s",
            "raw": 1602.4,
            "friendlyNoBusiness": "02h:08m:39s",
            "rawNoBusiness": 7719.8,
            "percentileRanks": [
                {
                    "key": "15m:00s",
                    "value": "45.70%"
                },
                {
                    "key": "01h:00m",
                    "value": "100.00%"
                },
                {
                    "key": "02h:00m",
                    "value": "100.00%"
                },
                {
                    "key": "04h:00m",
                    "value": "100.00%"
                },
                {
                    "key": "08h:00m",
                    "value": "100.00%"
                },
                {
                    "key": "24h:00m",
                    "value": "100.00%"
                }
            ],
            "percentileRanksRaw": [
                {
                    "key": "15m:00s",
                    "value": "45.70%"
                },
                {
                    "key": "01h:00m",
                    "value": "62.67%"
                },
                {
                    "key": "02h:00m",
                    "value": "66.84%"
                },
                {
                    "key": "04h:00m",
                    "value": "75.20%"
                },
                {
                    "key": "08h:00m",
                    "value": "100.00%"
                },
                {
                    "key": "24h:00m",
                    "value": "100.00%"
                }
            ]
        },
        "initialTTR": {
            "friendly": "36m:17s",
            "raw": 2177.6666666666665,
            "friendlyNoBusiness": "03h:26m:13s",
            "rawNoBusiness": 12373.333333333334,
            "percentileRanks": [
                {
                    "key": "15m:00s",
                    "value": "34.12%"
                },
                {
                    "key": "01h:00m",
                    "value": "100.00%"
                },
                {
                    "key": "02h:00m",
                    "value": "100.00%"
                },
                {
                    "key": "04h:00m",
                    "value": "100.00%"
                },
                {
                    "key": "08h:00m",
                    "value": "100.00%"
                },
                {
                    "key": "24h:00m",
                    "value": "100.00%"
                }
            ],
            "percentileRanksRaw": [
                {
                    "key": "15m:00s",
                    "value": "33.44%"
                },
                {
                    "key": "01h:00m",
                    "value": "38.53%"
                },
                {
                    "key": "02h:00m",
                    "value": "45.31%"
                },
                {
                    "key": "04h:00m",
                    "value": "58.87%"
                },
                {
                    "key": "08h:00m",
                    "value": "100.00%"
                },
                {
                    "key": "24h:00m",
                    "value": "100.00%"
                }
            ]
        },
        "overallTTF": {
            "friendly": "N\/A",
            "raw": null,
            "friendlyNoBusiness": "N\/A",
            "rawNoBusiness": null,
            "percentileRanks": [
                {
                    "key": "15m:00s",
                    "value": "0.00%"
                },
                {
                    "key": "01h:00m",
                    "value": "0.00%"
                },
                {
                    "key": "02h:00m",
                    "value": "0.00%"
                },
                {
                    "key": "04h:00m",
                    "value": "0.00%"
                },
                {
                    "key": "08h:00m",
                    "value": "0.00%"
                },
                {
                    "key": "24h:00m",
                    "value": "0.00%"
                }
            ],
            "percentileRanksRaw": [
                {
                    "key": "15m:00s",
                    "value": "0.00%"
                },
                {
                    "key": "01h:00m",
                    "value": "0.00%"
                },
                {
                    "key": "02h:00m",
                    "value": "0.00%"
                },
                {
                    "key": "04h:00m",
                    "value": "0.00%"
                },
                {
                    "key": "08h:00m",
                    "value": "0.00%"
                },
                {
                    "key": "24h:00m",
                    "value": "0.00%"
                }
            ]
        },
        "overallTTC": {
            "friendly": "N\/A",
            "raw": null,
            "friendlyNoBusiness": "N\/A",
            "rawNoBusiness": null,
            "percentileRanks": [
                {
                    "key": "15m:00s",
                    "value": "0.00%"
                },
                {
                    "key": "01h:00m",
                    "value": "0.00%"
                },
                {
                    "key": "02h:00m",
                    "value": "0.00%"
                },
                {
                    "key": "04h:00m",
                    "value": "0.00%"
                },
                {
                    "key": "08h:00m",
                    "value": "0.00%"
                },
                {
                    "key": "24h:00m",
                    "value": "0.00%"
                }
            ],
            "percentileRanksRaw": [
                {
                    "key": "15m:00s",
                    "value": "0.00%"
                },
                {
                    "key": "01h:00m",
                    "value": "0.00%"
                },
                {
                    "key": "02h:00m",
                    "value": "0.00%"
                },
                {
                    "key": "04h:00m",
                    "value": "0.00%"
                },
                {
                    "key": "08h:00m",
                    "value": "0.00%"
                },
                {
                    "key": "24h:00m",
                    "value": "0.00%"
                }
            ]
        },
        "dailyStats": [
            {
                "timestamp": 1622588400000,
                "date": "Wed, 2nd Jun",
                "messages": {
                    "sent": 4,
                    "forward": 0,
                    "reply": 4,
                    "received": 4
                },
                "overallTTR": {
                    "raw": 1591.25,
                    "rawNoBusiness": 9238
                },
                "overallTTF": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "initialTTR": {
                    "raw": 2443,
                    "rawNoBusiness": 17736.5
                },
                "threads": {
                    "total": 2,
                    "haveRepliesFromAgents": 2,
                    "noReplyFromAgents": 0,
                    "completionRatio": 100
                }
            },
            {
                "timestamp": 1622674800000,
                "date": "Thu, 3rd Jun",
                "messages": {
                    "sent": 1,
                    "forward": 0,
                    "reply": 0,
                    "received": 0
                },
                "overallTTR": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "overallTTF": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "initialTTR": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "threads": {
                    "total": 1,
                    "haveRepliesFromAgents": 0,
                    "noReplyFromAgents": 0,
                    "completionRatio": 0
                }
            },
            {
                "timestamp": 1622761200000,
                "date": "Fri, 4th Jun",
                "messages": {
                    "sent": 1,
                    "forward": 0,
                    "reply": 0,
                    "received": 0
                },
                "overallTTR": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "overallTTF": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "initialTTR": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "threads": {
                    "total": 1,
                    "haveRepliesFromAgents": 0,
                    "noReplyFromAgents": 0,
                    "completionRatio": 0
                }
            },
            {
                "timestamp": 1622847600000,
                "date": "Sat, 5th Jun",
                "messages": {
                    "sent": 0,
                    "forward": 0,
                    "reply": 0,
                    "received": 0
                },
                "overallTTR": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "overallTTF": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "initialTTR": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "threads": {
                    "total": 0,
                    "haveRepliesFromAgents": 0,
                    "noReplyFromAgents": 0,
                    "completionRatio": 0
                }
            },
            {
                "timestamp": 1622934000000,
                "date": "Sun, 6th Jun",
                "messages": {
                    "sent": 0,
                    "forward": 0,
                    "reply": 0,
                    "received": 0
                },
                "overallTTR": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "overallTTF": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "initialTTR": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "threads": {
                    "total": 0,
                    "haveRepliesFromAgents": 0,
                    "noReplyFromAgents": 0,
                    "completionRatio": 0
                }
            },
            {
                "timestamp": 1623020400000,
                "date": "Mon, 7th Jun",
                "messages": {
                    "sent": 1,
                    "forward": 0,
                    "reply": 0,
                    "received": 0
                },
                "overallTTR": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "overallTTF": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "initialTTR": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "threads": {
                    "total": 1,
                    "haveRepliesFromAgents": 0,
                    "noReplyFromAgents": 0,
                    "completionRatio": 0
                }
            },
            {
                "timestamp": 1623106800000,
                "date": "Tue, 8th Jun",
                "messages": {
                    "sent": 0,
                    "forward": 0,
                    "reply": 0,
                    "received": 0
                },
                "overallTTR": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "overallTTF": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "initialTTR": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "threads": {
                    "total": 0,
                    "haveRepliesFromAgents": 0,
                    "noReplyFromAgents": 0,
                    "completionRatio": 0
                }
            },
            {
                "timestamp": 1623193200000,
                "date": "Wed, 9th Jun",
                "messages": {
                    "sent": 1,
                    "forward": 0,
                    "reply": 1,
                    "received": 1
                },
                "overallTTR": {
                    "raw": 1647,
                    "rawNoBusiness": 1647
                },
                "overallTTF": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "initialTTR": {
                    "raw": 1647,
                    "rawNoBusiness": 1647
                },
                "threads": {
                    "total": 1,
                    "haveRepliesFromAgents": 1,
                    "noReplyFromAgents": 0,
                    "completionRatio": 100
                }
            }
        ]
    },
    "messages": {
        "current_page": 1,
        "data": [
            {
                "internet_message_id": "1474964773opdlTNWqXE@UnLt9leD5E1XC4oWDIuDqt0fc.UYVi",
                "date_time": "Jun 9th 2021 11:34:44",
                "subject": "RE: Necessitatibus consectetur tempore qui odio.",
                "references": [
                    "1510134456SdDvBXVmi6@XgkPhE9Aeg78oPcGOjgLnrtuq.ekOE",
                    "1601559089JbxkZDMaar@UpbX7amRRrLijxDo53pRlFPr3.wve0"
                ],
                "replytime": 1647,
                "classification": "reply-all",
                "raw_replytime": 1647,
                "friendly_reply_time": "27m:27s",
                "friendly_raw_reply_time": "27m:27s",
                "email_domains": [
                    "timetoreply.com",
                    "ferry.com",
                    "bechtelar.net",
                    "price.com"
                ],
                "email_domains_from": [
                    "timetoreply.com"
                ],
                "email_domains_to": [
                    "ferry.com",
                    "bechtelar.net"
                ],
                "email_domains_received": [
                    "ferry.com",
                    "bechtelar.net",
                    "price.com"
                ],
                "email_usernames": [
                    "l.turner@timetoreply.com",
                    "jesus59@ferry.com",
                    "kweber@bechtelar.net",
                    "bettye01@price.com"
                ],
                "email_usernames_from": [
                    "l.turner@timetoreply.com"
                ],
                "email_usernames_to": [
                    "jesus59@ferry.com",
                    "kweber@bechtelar.net"
                ],
                "email_usernames_cc": [
                    "bettye01@price.com"
                ],
                "email_usernames_received": [
                    "jesus59@ferry.com",
                    "kweber@bechtelar.net",
                    "bettye01@price.com"
                ],
                "is_initial_reply": true,
                "thread_ids": [
                    6
                ],
                "message_type": "outbound",
                "labels": [
                    "UNREAD"
                ],
                "is_closing_email": false,
                "is_included_in_stats": true,
                "timestamp": 1623234884,
                "reply_is_relevant": true,
                "reply_is_outlier": false,
                "agents_read_status": [],
                "thread_message_count": 2
            },
            {
                "internet_message_id": "1601559089JbxkZDMaar@UpbX7amRRrLijxDo53pRlFPr3.wve0",
                "date_time": "Jun 9th 2021 11:07:17",
                "subject": "RE: Necessitatibus consectetur tempore qui odio.",
                "references": [
                    "1510134456SdDvBXVmi6@XgkPhE9Aeg78oPcGOjgLnrtuq.ekOE"
                ],
                "replytime": null,
                "classification": "first",
                "raw_replytime": null,
                "friendly_reply_time": "N\/A",
                "friendly_raw_reply_time": "N\/A",
                "email_domains": [
                    "ferry.com",
                    "timetoreply.com",
                    "bechtelar.net",
                    "price.com"
                ],
                "email_domains_from": [
                    "ferry.com"
                ],
                "email_domains_to": [
                    "timetoreply.com",
                    "bechtelar.net"
                ],
                "email_domains_received": [
                    "timetoreply.com",
                    "bechtelar.net",
                    "price.com"
                ],
                "email_usernames": [
                    "jesus59@ferry.com",
                    "l.turner@timetoreply.com",
                    "kweber@bechtelar.net",
                    "bettye01@price.com"
                ],
                "email_usernames_from": [
                    "jesus59@ferry.com"
                ],
                "email_usernames_to": [
                    "l.turner@timetoreply.com",
                    "kweber@bechtelar.net"
                ],
                "email_usernames_cc": [
                    "bettye01@price.com"
                ],
                "email_usernames_received": [
                    "l.turner@timetoreply.com",
                    "kweber@bechtelar.net",
                    "bettye01@price.com"
                ],
                "is_initial_reply": false,
                "thread_ids": [
                    6
                ],
                "message_type": "inbound",
                "labels": [
                    "UNREAD"
                ],
                "is_closing_email": false,
                "is_included_in_stats": true,
                "timestamp": 1623233237,
                "reply_is_relevant": false,
                "reply_is_outlier": false,
                "agents_read_status": {
                    "l.turner@timetoreply.com": false
                },
                "thread_message_count": 2
            }
        ],
        "first_page_url": "https:\/\/portal.timetoreply.com\/api\/logs\/messages?page=1",
        "from": 1,
        "last_page": 7,
        "last_page_url": "https:\/\/portal.timetoreply.com\/api\/logs\/messages?page=7",
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "https:\/\/portal.timetoreply.com\/api\/logs\/messages?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": "https:\/\/portal.timetoreply.com\/api\/logs\/messages?page=2",
                "label": "2",
                "active": false
            },
            {
                "url": "https:\/\/portal.timetoreply.com\/api\/logs\/messages?page=3",
                "label": "3",
                "active": false
            },
            {
                "url": "https:\/\/portal.timetoreply.com\/api\/logs\/messages?page=4",
                "label": "4",
                "active": false
            },
            {
                "url": "https:\/\/portal.timetoreply.com\/api\/logs\/messages?page=5",
                "label": "5",
                "active": false
            },
            {
                "url": "https:\/\/portal.timetoreply.com\/api\/logs\/messages?page=6",
                "label": "6",
                "active": false
            },
            {
                "url": "https:\/\/portal.timetoreply.com\/api\/logs\/messages?page=7",
                "label": "7",
                "active": false
            },
            {
                "url": "https:\/\/portal.timetoreply.com\/api\/logs\/messages?page=2",
                "label": "Next »",
                "active": false
            }
        ],
        "next_page_url": "https:\/\/portal.timetoreply.com\/api\/logs\/messages?page=2",
        "path": "https:\/\/portal.timetoreply.com\/api\/logs\/messages",
        "per_page": 2,
        "prev_page_url": null,
        "to": 2,
        "total": 13
    }
}
 
        

Request   

GET api/logs/messages

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".

to  string optional  

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

model  string optional  

Name, email address or domain you want statistics for. Use the models endpoint to get a list.

model_type  string optional  

Model Type of the model being queried. Use "Customer" for email address and domain.

exclude_cc  boolean optional  

Should we exclude CC messages from the statistics.

model_com  string optional  

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

model_type_com  string optional  

Model Type of the model you are communicating with. Use "Customer" for email address and domain.

exclude_cc_com  boolean optional  

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

exclusive  boolean optional  

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

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.

thread_status  string optional  

A comma separated list (no spaces) of any combination of the following: 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.

classification  string optional  

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

messageType  string optional  

A comma separated list (no spaces) of any combination of the following: 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.

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.

no_reply_for  integer optional  

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

per_page  integer optional  

For paginated results, how many results per page. Max 200.

sort_by  string optional  

Field Name to sort messages by. Defaults to date_time.

direction  string optional  

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

page  integer optional  

For paginated results, which page to get.

Reports

Comparative - Report

requires authentication

Comparative Report Data

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

let params = {
    "from": "2020-01-01",
    "to": "2020-01-08",
    "model": "My Company",
    "model_type": "Internal",
    "exclude_cc": "",
    "model_com": "Top Revenue Customers",
    "model_type_com": "Customer Group",
    "exclude_cc_com": "",
    "exclusive": "",
    "label": "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]));

let 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();
$response = $client->get(
    'https://portal.timetoreply.com/api/reports/comparative',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
        ],
        'query' => [
            'from'=> '2020-01-01',
            'to'=> '2020-01-08',
            'model'=> 'My Company',
            'model_type'=> 'Internal',
            'exclude_cc'=> '',
            'model_com'=> 'Top Revenue Customers',
            'model_type_com'=> 'Customer Group',
            'exclude_cc_com'=> '',
            'exclusive'=> '',
            'label'=> '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));

Example response (200):

Show headers
            cache-control: no-cache, private
content-type: application/json
tracking-events: []
 
            
                
{
    "total": 3,
    "replyTimePercentages": {
        "categories": [
            "n.ullrich@timetoreply.com",
            "l.turner@timetoreply.com"
        ],
        "series": [
            {
                "name": "Replies in under 15m:00s",
                "data": [
                    51.86,
                    0
                ],
                "index": 5,
                "legendIndex": 0,
                "stringKey": "15m:00s"
            },
            {
                "name": "Replies in under 01h:00m",
                "data": [
                    48.14,
                    100
                ],
                "index": 4,
                "legendIndex": 1,
                "stringKey": "01h:00m"
            },
            {
                "name": "Replies in under 02h:00m",
                "data": [
                    0,
                    0
                ],
                "index": 3,
                "legendIndex": 2,
                "stringKey": "02h:00m"
            },
            {
                "name": "Replies in under 04h:00m",
                "data": [
                    0,
                    0
                ],
                "index": 2,
                "legendIndex": 3,
                "stringKey": "04h:00m"
            },
            {
                "name": "Replies in under 08h:00m",
                "data": [
                    0,
                    0
                ],
                "index": 1,
                "legendIndex": 4,
                "stringKey": "08h:00m"
            },
            {
                "name": "Replies in under 24h:00m",
                "data": [
                    0,
                    0
                ],
                "index": 0,
                "legendIndex": 5,
                "stringKey": "24h:00m"
            }
        ]
    },
    "forwardTimePercentages": {
        "categories": [
            "l.turner@timetoreply.com",
            "n.ullrich@timetoreply.com"
        ],
        "series": [
            {
                "name": "Forwards in under 15m:00s",
                "data": [
                    0,
                    0
                ],
                "index": 5,
                "legendIndex": 0,
                "stringKey": "15m:00s"
            },
            {
                "name": "Forwards in under 01h:00m",
                "data": [
                    0,
                    0
                ],
                "index": 4,
                "legendIndex": 1,
                "stringKey": "01h:00m"
            },
            {
                "name": "Forwards in under 02h:00m",
                "data": [
                    0,
                    0
                ],
                "index": 3,
                "legendIndex": 2,
                "stringKey": "02h:00m"
            },
            {
                "name": "Forwards in under 04h:00m",
                "data": [
                    0,
                    0
                ],
                "index": 2,
                "legendIndex": 3,
                "stringKey": "04h:00m"
            },
            {
                "name": "Forwards in under 08h:00m",
                "data": [
                    0,
                    0
                ],
                "index": 1,
                "legendIndex": 4,
                "stringKey": "08h:00m"
            },
            {
                "name": "Forwards in under 24h:00m",
                "data": [
                    0,
                    0
                ],
                "index": 0,
                "legendIndex": 5,
                "stringKey": "24h:00m"
            }
        ]
    },
    "allAgentStats": [
        {
            "name": "n.ullrich@timetoreply.com",
            "threads": {
                "total": 4,
                "internal": 0,
                "inbound": 2,
                "outbound": 2,
                "sentInternally": 0,
                "awaitCustomer": 3,
                "awaitAgent": 1,
                "closed": 0,
                "haveReplies": 4,
                "haveInitialReplies": 2
            },
            "messages": {
                "received": {
                    "count": 2,
                    "initial": 0,
                    "replies": 2,
                    "replyAll": 0,
                    "forward": 0,
                    "initialReplies": 0,
                    "dailyStats": {
                        "2021-06-02 00:00:00": 2
                    }
                },
                "sent": {
                    "count": 6,
                    "initial": 2,
                    "replies": 4,
                    "replyAll": 0,
                    "forward": 0,
                    "initialReplies": 0,
                    "dailyStats": {
                        "2021-06-02 00:00:00": 4,
                        "2021-06-03 00:00:00": 1,
                        "2021-06-04 00:00:00": 0,
                        "2021-06-05 00:00:00": 0,
                        "2021-06-06 00:00:00": 0,
                        "2021-06-07 00:00:00": 1
                    }
                }
            },
            "initialTTR": {
                "friendly": "40m:43s",
                "raw": 2443,
                "friendlyNoBusiness": "04h:55m:36s",
                "rawNoBusiness": 17736.5,
                "percentileRanks": [
                    {
                        "key": "15m:00s",
                        "value": "33.95%"
                    },
                    {
                        "key": "01h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "02h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "04h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "08h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "24h:00m",
                        "value": "100.00%"
                    }
                ],
                "percentileRanksRaw": [
                    {
                        "key": "15m:00s",
                        "value": "26.21%"
                    },
                    {
                        "key": "01h:00m",
                        "value": "30.03%"
                    },
                    {
                        "key": "02h:00m",
                        "value": "35.11%"
                    },
                    {
                        "key": "04h:00m",
                        "value": "45.29%"
                    },
                    {
                        "key": "08h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "24h:00m",
                        "value": "100.00%"
                    }
                ]
            },
            "overallTTF": {
                "friendly": "N\/A",
                "raw": null,
                "friendlyNoBusiness": "N\/A",
                "rawNoBusiness": null,
                "percentileRanks": [
                    {
                        "key": "15m:00s",
                        "value": "0.00%"
                    },
                    {
                        "key": "01h:00m",
                        "value": "0.00%"
                    },
                    {
                        "key": "02h:00m",
                        "value": "0.00%"
                    },
                    {
                        "key": "04h:00m",
                        "value": "0.00%"
                    },
                    {
                        "key": "08h:00m",
                        "value": "0.00%"
                    },
                    {
                        "key": "24h:00m",
                        "value": "0.00%"
                    }
                ],
                "percentileRanksRaw": [
                    {
                        "key": "15m:00s",
                        "value": "0.00%"
                    },
                    {
                        "key": "01h:00m",
                        "value": "0.00%"
                    },
                    {
                        "key": "02h:00m",
                        "value": "0.00%"
                    },
                    {
                        "key": "04h:00m",
                        "value": "0.00%"
                    },
                    {
                        "key": "08h:00m",
                        "value": "0.00%"
                    },
                    {
                        "key": "24h:00m",
                        "value": "0.00%"
                    }
                ]
            },
            "overallTTR": {
                "friendly": "26m:31s",
                "raw": 1591.25,
                "friendlyNoBusiness": "02h:33m:58s",
                "rawNoBusiness": 9238,
                "percentileRanks": [
                    {
                        "key": "15m:00s",
                        "value": "51.86%"
                    },
                    {
                        "key": "01h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "02h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "04h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "08h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "24h:00m",
                        "value": "100.00%"
                    }
                ],
                "percentileRanksRaw": [
                    {
                        "key": "15m:00s",
                        "value": "50.23%"
                    },
                    {
                        "key": "01h:00m",
                        "value": "54.10%"
                    },
                    {
                        "key": "02h:00m",
                        "value": "59.25%"
                    },
                    {
                        "key": "04h:00m",
                        "value": "69.56%"
                    },
                    {
                        "key": "08h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "24h:00m",
                        "value": "100.00%"
                    }
                ]
            },
            "overallTTC": {
                "friendly": "N\/A",
                "raw": null,
                "friendlyNoBusiness": "N\/A",
                "rawNoBusiness": null
            }
        },
        {
            "name": "l.turner@timetoreply.com",
            "threads": {
                "total": 2,
                "internal": 0,
                "inbound": 1,
                "outbound": 1,
                "sentInternally": 0,
                "awaitCustomer": 1,
                "awaitAgent": 0,
                "closed": 1,
                "haveReplies": 1,
                "haveInitialReplies": 1
            },
            "messages": {
                "received": {
                    "count": 1,
                    "initial": 1,
                    "replies": 0,
                    "replyAll": 0,
                    "forward": 0,
                    "initialReplies": 0,
                    "dailyStats": {
                        "2021-06-09 00:00:00": 1
                    }
                },
                "sent": {
                    "count": 2,
                    "initial": 1,
                    "replies": 0,
                    "replyAll": 1,
                    "forward": 0,
                    "initialReplies": 0,
                    "dailyStats": {
                        "2021-06-04 00:00:00": 1,
                        "2021-06-05 00:00:00": 0,
                        "2021-06-06 00:00:00": 0,
                        "2021-06-07 00:00:00": 0,
                        "2021-06-08 00:00:00": 0,
                        "2021-06-09 00:00:00": 1
                    }
                }
            },
            "initialTTR": {
                "friendly": "27m:27s",
                "raw": 1647,
                "friendlyNoBusiness": "27m:27s",
                "rawNoBusiness": 1647,
                "percentileRanks": [
                    {
                        "key": "15m:00s",
                        "value": "0.00%"
                    },
                    {
                        "key": "01h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "02h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "04h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "08h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "24h:00m",
                        "value": "100.00%"
                    }
                ],
                "percentileRanksRaw": [
                    {
                        "key": "15m:00s",
                        "value": "0.00%"
                    },
                    {
                        "key": "01h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "02h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "04h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "08h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "24h:00m",
                        "value": "100.00%"
                    }
                ]
            },
            "overallTTF": {
                "friendly": "N\/A",
                "raw": null,
                "friendlyNoBusiness": "N\/A",
                "rawNoBusiness": null,
                "percentileRanks": [
                    {
                        "key": "15m:00s",
                        "value": "0.00%"
                    },
                    {
                        "key": "01h:00m",
                        "value": "0.00%"
                    },
                    {
                        "key": "02h:00m",
                        "value": "0.00%"
                    },
                    {
                        "key": "04h:00m",
                        "value": "0.00%"
                    },
                    {
                        "key": "08h:00m",
                        "value": "0.00%"
                    },
                    {
                        "key": "24h:00m",
                        "value": "0.00%"
                    }
                ],
                "percentileRanksRaw": [
                    {
                        "key": "15m:00s",
                        "value": "0.00%"
                    },
                    {
                        "key": "01h:00m",
                        "value": "0.00%"
                    },
                    {
                        "key": "02h:00m",
                        "value": "0.00%"
                    },
                    {
                        "key": "04h:00m",
                        "value": "0.00%"
                    },
                    {
                        "key": "08h:00m",
                        "value": "0.00%"
                    },
                    {
                        "key": "24h:00m",
                        "value": "0.00%"
                    }
                ]
            },
            "overallTTR": {
                "friendly": "27m:27s",
                "raw": 1647,
                "friendlyNoBusiness": "27m:27s",
                "rawNoBusiness": 1647,
                "percentileRanks": [
                    {
                        "key": "15m:00s",
                        "value": "0.00%"
                    },
                    {
                        "key": "01h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "02h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "04h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "08h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "24h:00m",
                        "value": "100.00%"
                    }
                ],
                "percentileRanksRaw": [
                    {
                        "key": "15m:00s",
                        "value": "0.00%"
                    },
                    {
                        "key": "01h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "02h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "04h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "08h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "24h:00m",
                        "value": "100.00%"
                    }
                ]
            },
            "overallTTC": {
                "friendly": "N\/A",
                "raw": null,
                "friendlyNoBusiness": "N\/A",
                "rawNoBusiness": null
            }
        }
    ],
    "args": {
        "model": {
            "icon": "building",
            "id": null,
            "model_type": "Internal",
            "name": "My Company"
        },
        "modelCom": {
            "id": 1,
            "name": "Top Revenue Customers",
            "email_usernames": [
                "jesus59@ferry.com",
                "rlynch@gleason.com"
            ],
            "customer_domains": [
                "schumm.com",
                "armstrong.biz"
            ],
            "model_type": "Customer Group",
            "icon": "user-friends"
        }
    }
}
 
        

Request   

GET api/reports/comparative

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".

to  string optional  

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

model  string optional  

Name, email address or domain you want statistics for. Use the models endpoint to get a list.

model_type  string optional  

Model Type of the model being queried. Use "Customer" for email address and domain.

exclude_cc  boolean optional  

Should we exclude CC messages from the statistics.

model_com  string optional  

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

model_type_com  string optional  

Model Type of the model you are communicating with. Use "Customer" for email address and domain.

exclude_cc_com  boolean optional  

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

exclusive  boolean optional  

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

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.

thread_status  string optional  

A comma separated list (no spaces) of any combination of the following: 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.

classification  string optional  

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

messageType  string optional  

A comma separated list (no spaces) of any combination of the following: 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.

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.

no_reply_for  integer optional  

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

per_page  integer optional  

For paginated results, how many results per page. Max 200.

direction  string optional  

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

page  integer optional  

For paginated results, which page to get.

Interactions - Report

requires authentication

Interactions Report Data

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

let params = {
    "from": "2020-01-01",
    "to": "2020-01-08",
    "model": "My Company",
    "model_type": "Internal",
    "exclude_cc": "",
    "model_com": "Top Revenue Customers",
    "model_type_com": "Customer Group",
    "exclude_cc_com": "",
    "exclusive": "",
    "label": "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",
    "agentOne": "Joe Blogs",
    "agentTwo": "Jane Doe",
    "agentThree": "Peter Rabbit",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

let 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();
$response = $client->get(
    'https://portal.timetoreply.com/api/reports/interactions',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
        ],
        'query' => [
            'from'=> '2020-01-01',
            'to'=> '2020-01-08',
            'model'=> 'My Company',
            'model_type'=> 'Internal',
            'exclude_cc'=> '',
            'model_com'=> 'Top Revenue Customers',
            'model_type_com'=> 'Customer Group',
            'exclude_cc_com'=> '',
            'exclusive'=> '',
            'label'=> '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',
            'agentOne'=> 'Joe Blogs',
            'agentTwo'=> 'Jane Doe',
            'agentThree'=> 'Peter Rabbit',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

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

Request   

GET api/reports/interactions

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".

to  string optional  

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

model  string optional  

Name, email address or domain you want statistics for. Use the models endpoint to get a list.

model_type  string optional  

Model Type of the model being queried. Use "Customer" for email address and domain.

exclude_cc  boolean optional  

Should we exclude CC messages from the statistics.

model_com  string optional  

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

model_type_com  string optional  

Model Type of the model you are communicating with. Use "Customer" for email address and domain.

exclude_cc_com  boolean optional  

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

exclusive  boolean optional  

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

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.

thread_status  string optional  

A comma separated list (no spaces) of any combination of the following: 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.

classification  string optional  

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

messageType  string optional  

A comma separated list (no spaces) of any combination of the following: 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.

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.

no_reply_for  integer optional  

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

per_page  integer optional  

For paginated results, how many results per page. Max 200.

direction  string optional  

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

page  integer optional  

For paginated results, which page to get.

agentOne  string optional  

Name of the first agent you want to load interactions report for. Note, if an agent is provided as model, these options will be ignored.

agentTwo  string optional  

Name of the second agent you want to load interactions report for. Note, if an agent is provided as model, these options will be ignored.

agentThree  string optional  

Name of the third agent you want to load interactions report for. Note, if an agent is provided as model, these options will be ignored.

Interactions - Report

requires authentication

Interactions Report Data

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

let params = {
    "from": "2020-01-01",
    "to": "2020-01-08",
    "model": "My Company",
    "model_type": "Internal",
    "exclude_cc": "",
    "model_com": "Top Revenue Customers",
    "model_type_com": "Customer Group",
    "exclude_cc_com": "",
    "exclusive": "",
    "label": "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",
    "agentOne": "Joe Blogs",
    "agentTwo": "Jane Doe",
    "agentThree": "Peter Rabbit",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

let 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();
$response = $client->get(
    'https://portal.timetoreply.com/api/reports/customer',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
        ],
        'query' => [
            'from'=> '2020-01-01',
            'to'=> '2020-01-08',
            'model'=> 'My Company',
            'model_type'=> 'Internal',
            'exclude_cc'=> '',
            'model_com'=> 'Top Revenue Customers',
            'model_type_com'=> 'Customer Group',
            'exclude_cc_com'=> '',
            'exclusive'=> '',
            'label'=> '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',
            'agentOne'=> 'Joe Blogs',
            'agentTwo'=> 'Jane Doe',
            'agentThree'=> 'Peter Rabbit',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

Show headers
            cache-control: no-cache, private
content-type: application/json
tracking-events: []
 
            
                
{
    "domains": {
        "current_page": 1,
        "data": [
            {
                "name": "schumm.com",
                "threads": {
                    "total": 2,
                    "internal": 0,
                    "inbound": 1,
                    "outbound": 1,
                    "sentInternally": 0,
                    "awaitCustomer": 1,
                    "awaitAgent": 1,
                    "closed": 0,
                    "haveReplies": 2,
                    "haveInitialReplies": 1
                },
                "messages": {
                    "received": {
                        "count": 2,
                        "initial": 1,
                        "replies": 1,
                        "replyAll": 0,
                        "forward": 0,
                        "initialReplies": 0,
                        "dailyStats": {
                            "2021-06-02 00:00:00": 2
                        }
                    },
                    "sent": {
                        "count": 3,
                        "initial": 1,
                        "replies": 2,
                        "replyAll": 0,
                        "forward": 0,
                        "initialReplies": 0,
                        "dailyStats": []
                    }
                },
                "initialTTR": {
                    "friendly": "40s",
                    "raw": 40,
                    "friendlyNoBusiness": "40s",
                    "rawNoBusiness": 40,
                    "percentileRanks": [
                        {
                            "key": "15m:00s",
                            "value": "100.00%"
                        },
                        {
                            "key": "01h:00m",
                            "value": "100.00%"
                        },
                        {
                            "key": "02h:00m",
                            "value": "100.00%"
                        },
                        {
                            "key": "04h:00m",
                            "value": "100.00%"
                        },
                        {
                            "key": "08h:00m",
                            "value": "100.00%"
                        },
                        {
                            "key": "24h:00m",
                            "value": "100.00%"
                        }
                    ],
                    "percentileRanksRaw": [
                        {
                            "key": "15m:00s",
                            "value": "100.00%"
                        },
                        {
                            "key": "01h:00m",
                            "value": "100.00%"
                        },
                        {
                            "key": "02h:00m",
                            "value": "100.00%"
                        },
                        {
                            "key": "04h:00m",
                            "value": "100.00%"
                        },
                        {
                            "key": "08h:00m",
                            "value": "100.00%"
                        },
                        {
                            "key": "24h:00m",
                            "value": "100.00%"
                        }
                    ]
                },
                "overallTTF": {
                    "friendly": "N\/A",
                    "raw": null,
                    "friendlyNoBusiness": "N\/A",
                    "rawNoBusiness": null,
                    "percentileRanks": [
                        {
                            "key": "15m:00s",
                            "value": "0.00%"
                        },
                        {
                            "key": "01h:00m",
                            "value": "0.00%"
                        },
                        {
                            "key": "02h:00m",
                            "value": "0.00%"
                        },
                        {
                            "key": "04h:00m",
                            "value": "0.00%"
                        },
                        {
                            "key": "08h:00m",
                            "value": "0.00%"
                        },
                        {
                            "key": "24h:00m",
                            "value": "0.00%"
                        }
                    ],
                    "percentileRanksRaw": [
                        {
                            "key": "15m:00s",
                            "value": "0.00%"
                        },
                        {
                            "key": "01h:00m",
                            "value": "0.00%"
                        },
                        {
                            "key": "02h:00m",
                            "value": "0.00%"
                        },
                        {
                            "key": "04h:00m",
                            "value": "0.00%"
                        },
                        {
                            "key": "08h:00m",
                            "value": "0.00%"
                        },
                        {
                            "key": "24h:00m",
                            "value": "0.00%"
                        }
                    ]
                },
                "overallTTR": {
                    "friendly": "08m:19s",
                    "raw": 499.5,
                    "friendlyNoBusiness": "08m:19s",
                    "rawNoBusiness": 499.5,
                    "percentileRanks": [
                        {
                            "key": "15m:00s",
                            "value": "100.00%"
                        },
                        {
                            "key": "01h:00m",
                            "value": "100.00%"
                        },
                        {
                            "key": "02h:00m",
                            "value": "100.00%"
                        },
                        {
                            "key": "04h:00m",
                            "value": "100.00%"
                        },
                        {
                            "key": "08h:00m",
                            "value": "100.00%"
                        },
                        {
                            "key": "24h:00m",
                            "value": "100.00%"
                        }
                    ],
                    "percentileRanksRaw": [
                        {
                            "key": "15m:00s",
                            "value": "100.00%"
                        },
                        {
                            "key": "01h:00m",
                            "value": "100.00%"
                        },
                        {
                            "key": "02h:00m",
                            "value": "100.00%"
                        },
                        {
                            "key": "04h:00m",
                            "value": "100.00%"
                        },
                        {
                            "key": "08h:00m",
                            "value": "100.00%"
                        },
                        {
                            "key": "24h:00m",
                            "value": "100.00%"
                        }
                    ]
                },
                "overallTTC": {
                    "friendly": "N\/A",
                    "raw": null,
                    "friendlyNoBusiness": "N\/A",
                    "rawNoBusiness": null
                }
            },
            {
                "name": "armstrong.biz",
                "threads": {
                    "total": 1,
                    "internal": 0,
                    "inbound": 1,
                    "outbound": 0,
                    "sentInternally": 0,
                    "awaitCustomer": 1,
                    "awaitAgent": 0,
                    "closed": 0,
                    "haveReplies": 2,
                    "haveInitialReplies": 1
                },
                "messages": {
                    "received": {
                        "count": 2,
                        "initial": 1,
                        "replies": 1,
                        "replyAll": 0,
                        "forward": 0,
                        "initialReplies": 0,
                        "dailyStats": {
                            "2021-06-02 00:00:00": 2
                        }
                    },
                    "sent": {
                        "count": 2,
                        "initial": 0,
                        "replies": 2,
                        "replyAll": 0,
                        "forward": 0,
                        "initialReplies": 0,
                        "dailyStats": []
                    }
                },
                "initialTTR": {
                    "friendly": "01h:20m:46s",
                    "raw": 4846,
                    "friendlyNoBusiness": "09h:50m:33s",
                    "rawNoBusiness": 35433,
                    "percentileRanks": [
                        {
                            "key": "15m:00s",
                            "value": "0.00%"
                        },
                        {
                            "key": "01h:00m",
                            "value": "0.00%"
                        },
                        {
                            "key": "02h:00m",
                            "value": "100.00%"
                        },
                        {
                            "key": "04h:00m",
                            "value": "100.00%"
                        },
                        {
                            "key": "08h:00m",
                            "value": "100.00%"
                        },
                        {
                            "key": "24h:00m",
                            "value": "100.00%"
                        }
                    ],
                    "percentileRanksRaw": [
                        {
                            "key": "15m:00s",
                            "value": "0.00%"
                        },
                        {
                            "key": "01h:00m",
                            "value": "0.00%"
                        },
                        {
                            "key": "02h:00m",
                            "value": "0.00%"
                        },
                        {
                            "key": "04h:00m",
                            "value": "0.00%"
                        },
                        {
                            "key": "08h:00m",
                            "value": "0.00%"
                        },
                        {
                            "key": "24h:00m",
                            "value": "100.00%"
                        }
                    ]
                },
                "overallTTF": {
                    "friendly": "N\/A",
                    "raw": null,
                    "friendlyNoBusiness": "N\/A",
                    "rawNoBusiness": null,
                    "percentileRanks": [
                        {
                            "key": "15m:00s",
                            "value": "0.00%"
                        },
                        {
                            "key": "01h:00m",
                            "value": "0.00%"
                        },
                        {
                            "key": "02h:00m",
                            "value": "0.00%"
                        },
                        {
                            "key": "04h:00m",
                            "value": "0.00%"
                        },
                        {
                            "key": "08h:00m",
                            "value": "0.00%"
                        },
                        {
                            "key": "24h:00m",
                            "value": "0.00%"
                        }
                    ],
                    "percentileRanksRaw": [
                        {
                            "key": "15m:00s",
                            "value": "0.00%"
                        },
                        {
                            "key": "01h:00m",
                            "value": "0.00%"
                        },
                        {
                            "key": "02h:00m",
                            "value": "0.00%"
                        },
                        {
                            "key": "04h:00m",
                            "value": "0.00%"
                        },
                        {
                            "key": "08h:00m",
                            "value": "0.00%"
                        },
                        {
                            "key": "24h:00m",
                            "value": "0.00%"
                        }
                    ]
                },
                "overallTTR": {
                    "friendly": "44m:43s",
                    "raw": 2683,
                    "friendlyNoBusiness": "04h:59m:36s",
                    "rawNoBusiness": 17976.5,
                    "percentileRanks": [
                        {
                            "key": "15m:00s",
                            "value": "29.39%"
                        },
                        {
                            "key": "01h:00m",
                            "value": "100.00%"
                        },
                        {
                            "key": "02h:00m",
                            "value": "100.00%"
                        },
                        {
                            "key": "04h:00m",
                            "value": "100.00%"
                        },
                        {
                            "key": "08h:00m",
                            "value": "100.00%"
                        },
                        {
                            "key": "24h:00m",
                            "value": "100.00%"
                        }
                    ],
                    "percentileRanksRaw": [
                        {
                            "key": "15m:00s",
                            "value": "25.54%"
                        },
                        {
                            "key": "01h:00m",
                            "value": "29.41%"
                        },
                        {
                            "key": "02h:00m",
                            "value": "34.57%"
                        },
                        {
                            "key": "04h:00m",
                            "value": "44.88%"
                        },
                        {
                            "key": "08h:00m",
                            "value": "100.00%"
                        },
                        {
                            "key": "24h:00m",
                            "value": "100.00%"
                        }
                    ]
                },
                "overallTTC": {
                    "friendly": "N\/A",
                    "raw": null,
                    "friendlyNoBusiness": "N\/A",
                    "rawNoBusiness": null
                }
            }
        ],
        "first_page_url": "https:\/\/portal.timetoreply.com\/api\/reports\/customer?page=1",
        "from": 1,
        "last_page": 1,
        "last_page_url": "https:\/\/portal.timetoreply.com\/api\/reports\/customer?page=1",
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "https:\/\/portal.timetoreply.com\/api\/reports\/customer?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "next_page_url": null,
        "path": "https:\/\/portal.timetoreply.com\/api\/reports\/customer",
        "per_page": 25,
        "prev_page_url": null,
        "to": 2,
        "total": 2
    },
    "emails": {
        "current_page": 1,
        "data": [
            {
                "name": "jesus59@ferry.com",
                "threads": {
                    "total": 2,
                    "internal": 0,
                    "inbound": 1,
                    "outbound": 1,
                    "sentInternally": 0,
                    "awaitCustomer": 1,
                    "awaitAgent": 0,
                    "closed": 1,
                    "haveReplies": 1,
                    "haveInitialReplies": 1
                },
                "messages": {
                    "received": {
                        "count": 1,
                        "initial": 0,
                        "replies": 0,
                        "replyAll": 0,
                        "forward": 0,
                        "initialReplies": 0,
                        "dailyStats": []
                    },
                    "sent": {
                        "count": 2,
                        "initial": 0,
                        "replies": 0,
                        "replyAll": 0,
                        "forward": 0,
                        "initialReplies": 0,
                        "dailyStats": []
                    }
                },
                "initialTTR": {
                    "friendly": "27m:27s",
                    "raw": 1647,
                    "friendlyNoBusiness": "27m:27s",
                    "rawNoBusiness": 1647,
                    "percentileRanks": [
                        {
                            "key": "15m:00s",
                            "value": "0.00%"
                        },
                        {
                            "key": "01h:00m",
                            "value": "100.00%"
                        },
                        {
                            "key": "02h:00m",
                            "value": "100.00%"
                        },
                        {
                            "key": "04h:00m",
                            "value": "100.00%"
                        },
                        {
                            "key": "08h:00m",
                            "value": "100.00%"
                        },
                        {
                            "key": "24h:00m",
                            "value": "100.00%"
                        }
                    ],
                    "percentileRanksRaw": [
                        {
                            "key": "15m:00s",
                            "value": "0.00%"
                        },
                        {
                            "key": "01h:00m",
                            "value": "100.00%"
                        },
                        {
                            "key": "02h:00m",
                            "value": "100.00%"
                        },
                        {
                            "key": "04h:00m",
                            "value": "100.00%"
                        },
                        {
                            "key": "08h:00m",
                            "value": "100.00%"
                        },
                        {
                            "key": "24h:00m",
                            "value": "100.00%"
                        }
                    ]
                },
                "overallTTF": {
                    "friendly": "N\/A",
                    "raw": null,
                    "friendlyNoBusiness": "N\/A",
                    "rawNoBusiness": null,
                    "percentileRanks": [],
                    "percentileRanksRaw": []
                },
                "overallTTR": {
                    "friendly": "27m:27s",
                    "raw": 1647,
                    "friendlyNoBusiness": "27m:27s",
                    "rawNoBusiness": 1647,
                    "percentileRanks": [],
                    "percentileRanksRaw": []
                },
                "overallTTC": {
                    "friendly": "N\/A",
                    "raw": null,
                    "friendlyNoBusiness": "N\/A",
                    "rawNoBusiness": null
                }
            },
            {
                "name": "rlynch@gleason.com",
                "threads": {
                    "total": 1,
                    "internal": 0,
                    "inbound": 0,
                    "outbound": 1,
                    "sentInternally": 0,
                    "awaitCustomer": 1,
                    "awaitAgent": 0,
                    "closed": 0,
                    "haveReplies": 0,
                    "haveInitialReplies": 0
                },
                "messages": {
                    "received": {
                        "count": 0,
                        "initial": 0,
                        "replies": 0,
                        "replyAll": 0,
                        "forward": 0,
                        "initialReplies": 0,
                        "dailyStats": null
                    },
                    "sent": {
                        "count": 1,
                        "initial": 0,
                        "replies": 0,
                        "replyAll": 0,
                        "forward": 0,
                        "initialReplies": 0,
                        "dailyStats": []
                    }
                },
                "initialTTR": {
                    "friendly": "N\/A",
                    "raw": null,
                    "friendlyNoBusiness": "N\/A",
                    "rawNoBusiness": null,
                    "percentileRanks": [
                        {
                            "key": "15m:00s",
                            "value": "0.00%"
                        },
                        {
                            "key": "01h:00m",
                            "value": "0.00%"
                        },
                        {
                            "key": "02h:00m",
                            "value": "0.00%"
                        },
                        {
                            "key": "04h:00m",
                            "value": "0.00%"
                        },
                        {
                            "key": "08h:00m",
                            "value": "0.00%"
                        },
                        {
                            "key": "24h:00m",
                            "value": "0.00%"
                        }
                    ],
                    "percentileRanksRaw": [
                        {
                            "key": "15m:00s",
                            "value": "0.00%"
                        },
                        {
                            "key": "01h:00m",
                            "value": "0.00%"
                        },
                        {
                            "key": "02h:00m",
                            "value": "0.00%"
                        },
                        {
                            "key": "04h:00m",
                            "value": "0.00%"
                        },
                        {
                            "key": "08h:00m",
                            "value": "0.00%"
                        },
                        {
                            "key": "24h:00m",
                            "value": "0.00%"
                        }
                    ]
                },
                "overallTTF": {
                    "friendly": "N\/A",
                    "raw": null,
                    "friendlyNoBusiness": "N\/A",
                    "rawNoBusiness": null,
                    "percentileRanks": [],
                    "percentileRanksRaw": []
                },
                "overallTTR": {
                    "friendly": "N\/A",
                    "raw": null,
                    "friendlyNoBusiness": "N\/A",
                    "rawNoBusiness": null,
                    "percentileRanks": [],
                    "percentileRanksRaw": []
                },
                "overallTTC": {
                    "friendly": "N\/A",
                    "raw": null,
                    "friendlyNoBusiness": "N\/A",
                    "rawNoBusiness": null
                }
            }
        ],
        "first_page_url": "https:\/\/portal.timetoreply.com\/api\/reports\/customer?page=1",
        "from": 1,
        "last_page": 1,
        "last_page_url": "https:\/\/portal.timetoreply.com\/api\/reports\/customer?page=1",
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "https:\/\/portal.timetoreply.com\/api\/reports\/customer?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "next_page_url": null,
        "path": "https:\/\/portal.timetoreply.com\/api\/reports\/customer",
        "per_page": 25,
        "prev_page_url": null,
        "to": 2,
        "total": 2
    }
}
 
        

Request   

GET api/reports/customer

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".

to  string optional  

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

model  string optional  

Name, email address or domain you want statistics for. Use the models endpoint to get a list.

model_type  string optional  

Model Type of the model being queried. Use "Customer" for email address and domain.

exclude_cc  boolean optional  

Should we exclude CC messages from the statistics.

model_com  string optional  

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

model_type_com  string optional  

Model Type of the model you are communicating with. Use "Customer" for email address and domain.

exclude_cc_com  boolean optional  

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

exclusive  boolean optional  

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

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.

thread_status  string optional  

A comma separated list (no spaces) of any combination of the following: 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.

classification  string optional  

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

messageType  string optional  

A comma separated list (no spaces) of any combination of the following: 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.

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.

no_reply_for  integer optional  

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

per_page  integer optional  

For paginated results, how many results per page. Max 200.

direction  string optional  

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

page  integer optional  

For paginated results, which page to get.

agentOne  string optional  

Name of the first agent you want to load interactions report for. Note, if an agent is provided as model, these options will be ignored.

agentTwo  string optional  

Name of the second agent you want to load interactions report for. Note, if an agent is provided as model, these options will be ignored.

agentThree  string optional  

Name of the third agent you want to load interactions report for. Note, if an agent is provided as model, these options will be ignored.

Overview - Report

requires authentication

Overview Report Data

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

let params = {
    "from": "2020-01-01",
    "to": "2020-01-08",
    "model": "timetoreply.com",
    "model_type": "Customer",
    "exclude_cc": "",
    "model_com": "Top Revenue Customers",
    "model_type_com": "Customer Group",
    "exclude_cc_com": "",
    "exclusive": "",
    "label": "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]));

let 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();
$response = $client->get(
    'https://portal.timetoreply.com/api/reports/overview',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
        ],
        'query' => [
            'from'=> '2020-01-01',
            'to'=> '2020-01-08',
            'model'=> 'timetoreply.com',
            'model_type'=> 'Customer',
            'exclude_cc'=> '',
            'model_com'=> 'Top Revenue Customers',
            'model_type_com'=> 'Customer Group',
            'exclude_cc_com'=> '',
            'exclusive'=> '',
            'label'=> '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));

Example response (200):

Show headers
            cache-control: no-cache, private
content-type: application/json
tracking-events: []
 
            
                
{
    "stats": {
        "threads": {
            "total": 6,
            "internal": 0,
            "inbound": 3,
            "outbound": 3,
            "sentInternally": 0,
            "awaitCustomer": 4,
            "awaitAgent": 1,
            "closed": 1,
            "haveReplies": 4,
            "haveRepliesFromAgents": 3,
            "completionRatio": "50.00%"
        },
        "messages": {
            "count": 13,
            "initial": 6,
            "replies": 6,
            "replyAll": 1,
            "forward": 0,
            "received": {
                "count": 5,
                "initial": 3,
                "replies": 2,
                "replyAll": 0,
                "forward": 0,
                "initialReplies": 1,
                "dayOfWeek": {
                    "Friday": 0,
                    "Monday": 0,
                    "Saturday": 0,
                    "Sunday": 0,
                    "Thursday": 0,
                    "Tuesday": 0,
                    "Wednesday": 2.5
                },
                "hourOfDay": {
                    "00:00": 0.143,
                    "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.143,
                    "11:00": 0.143,
                    "12:00": 0.143,
                    "13:00": 0.143,
                    "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
                }
            },
            "sent": {
                "count": 8,
                "initial": 3,
                "replies": 4,
                "replyAll": 1,
                "forward": 0,
                "initialReplies": 3,
                "dayOfWeek": {
                    "Friday": 1,
                    "Monday": 1,
                    "Saturday": 0,
                    "Sunday": 0,
                    "Thursday": 1,
                    "Tuesday": 0,
                    "Wednesday": 2.5
                },
                "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.714,
                    "11:00": 0.143,
                    "12:00": 0.143,
                    "13:00": 0.143,
                    "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": "26m:42s",
            "raw": 1602.4,
            "friendlyNoBusiness": "02h:08m:39s",
            "rawNoBusiness": 7719.8,
            "percentileRanks": [
                {
                    "key": "15m:00s",
                    "value": "45.70%"
                },
                {
                    "key": "01h:00m",
                    "value": "100.00%"
                },
                {
                    "key": "02h:00m",
                    "value": "100.00%"
                },
                {
                    "key": "04h:00m",
                    "value": "100.00%"
                },
                {
                    "key": "08h:00m",
                    "value": "100.00%"
                },
                {
                    "key": "24h:00m",
                    "value": "100.00%"
                }
            ],
            "percentileRanksRaw": [
                {
                    "key": "15m:00s",
                    "value": "45.70%"
                },
                {
                    "key": "01h:00m",
                    "value": "62.67%"
                },
                {
                    "key": "02h:00m",
                    "value": "66.84%"
                },
                {
                    "key": "04h:00m",
                    "value": "75.20%"
                },
                {
                    "key": "08h:00m",
                    "value": "100.00%"
                },
                {
                    "key": "24h:00m",
                    "value": "100.00%"
                }
            ]
        },
        "initialTTR": {
            "friendly": "36m:17s",
            "raw": 2177.6666666666665,
            "friendlyNoBusiness": "03h:26m:13s",
            "rawNoBusiness": 12373.333333333334,
            "percentileRanks": [
                {
                    "key": "15m:00s",
                    "value": "34.12%"
                },
                {
                    "key": "01h:00m",
                    "value": "100.00%"
                },
                {
                    "key": "02h:00m",
                    "value": "100.00%"
                },
                {
                    "key": "04h:00m",
                    "value": "100.00%"
                },
                {
                    "key": "08h:00m",
                    "value": "100.00%"
                },
                {
                    "key": "24h:00m",
                    "value": "100.00%"
                }
            ],
            "percentileRanksRaw": [
                {
                    "key": "15m:00s",
                    "value": "33.44%"
                },
                {
                    "key": "01h:00m",
                    "value": "38.53%"
                },
                {
                    "key": "02h:00m",
                    "value": "45.31%"
                },
                {
                    "key": "04h:00m",
                    "value": "58.87%"
                },
                {
                    "key": "08h:00m",
                    "value": "100.00%"
                },
                {
                    "key": "24h:00m",
                    "value": "100.00%"
                }
            ]
        },
        "overallTTF": {
            "friendly": "N\/A",
            "raw": null,
            "friendlyNoBusiness": "N\/A",
            "rawNoBusiness": null,
            "percentileRanks": [
                {
                    "key": "15m:00s",
                    "value": "0.00%"
                },
                {
                    "key": "01h:00m",
                    "value": "0.00%"
                },
                {
                    "key": "02h:00m",
                    "value": "0.00%"
                },
                {
                    "key": "04h:00m",
                    "value": "0.00%"
                },
                {
                    "key": "08h:00m",
                    "value": "0.00%"
                },
                {
                    "key": "24h:00m",
                    "value": "0.00%"
                }
            ],
            "percentileRanksRaw": [
                {
                    "key": "15m:00s",
                    "value": "0.00%"
                },
                {
                    "key": "01h:00m",
                    "value": "0.00%"
                },
                {
                    "key": "02h:00m",
                    "value": "0.00%"
                },
                {
                    "key": "04h:00m",
                    "value": "0.00%"
                },
                {
                    "key": "08h:00m",
                    "value": "0.00%"
                },
                {
                    "key": "24h:00m",
                    "value": "0.00%"
                }
            ]
        },
        "overallTTC": {
            "friendly": "N\/A",
            "raw": null,
            "friendlyNoBusiness": "N\/A",
            "rawNoBusiness": null,
            "percentileRanks": [
                {
                    "key": "15m:00s",
                    "value": "0.00%"
                },
                {
                    "key": "01h:00m",
                    "value": "0.00%"
                },
                {
                    "key": "02h:00m",
                    "value": "0.00%"
                },
                {
                    "key": "04h:00m",
                    "value": "0.00%"
                },
                {
                    "key": "08h:00m",
                    "value": "0.00%"
                },
                {
                    "key": "24h:00m",
                    "value": "0.00%"
                }
            ],
            "percentileRanksRaw": [
                {
                    "key": "15m:00s",
                    "value": "0.00%"
                },
                {
                    "key": "01h:00m",
                    "value": "0.00%"
                },
                {
                    "key": "02h:00m",
                    "value": "0.00%"
                },
                {
                    "key": "04h:00m",
                    "value": "0.00%"
                },
                {
                    "key": "08h:00m",
                    "value": "0.00%"
                },
                {
                    "key": "24h:00m",
                    "value": "0.00%"
                }
            ]
        },
        "dailyStats": [
            {
                "timestamp": 1622588400000,
                "date": "Wed, 2nd Jun",
                "messages": {
                    "sent": 4,
                    "forward": 0,
                    "reply": 4,
                    "received": 4
                },
                "overallTTR": {
                    "raw": 1591.25,
                    "rawNoBusiness": 9238
                },
                "overallTTF": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "initialTTR": {
                    "raw": 2443,
                    "rawNoBusiness": 17736.5
                },
                "threads": {
                    "total": 2,
                    "haveRepliesFromAgents": 2,
                    "noReplyFromAgents": 0,
                    "completionRatio": 100
                }
            },
            {
                "timestamp": 1622674800000,
                "date": "Thu, 3rd Jun",
                "messages": {
                    "sent": 1,
                    "forward": 0,
                    "reply": 0,
                    "received": 0
                },
                "overallTTR": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "overallTTF": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "initialTTR": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "threads": {
                    "total": 1,
                    "haveRepliesFromAgents": 0,
                    "noReplyFromAgents": 0,
                    "completionRatio": 0
                }
            },
            {
                "timestamp": 1622761200000,
                "date": "Fri, 4th Jun",
                "messages": {
                    "sent": 1,
                    "forward": 0,
                    "reply": 0,
                    "received": 0
                },
                "overallTTR": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "overallTTF": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "initialTTR": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "threads": {
                    "total": 1,
                    "haveRepliesFromAgents": 0,
                    "noReplyFromAgents": 0,
                    "completionRatio": 0
                }
            },
            {
                "timestamp": 1622847600000,
                "date": "Sat, 5th Jun",
                "messages": {
                    "sent": 0,
                    "forward": 0,
                    "reply": 0,
                    "received": 0
                },
                "overallTTR": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "overallTTF": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "initialTTR": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "threads": {
                    "total": 0,
                    "haveRepliesFromAgents": 0,
                    "noReplyFromAgents": 0,
                    "completionRatio": 0
                }
            },
            {
                "timestamp": 1622934000000,
                "date": "Sun, 6th Jun",
                "messages": {
                    "sent": 0,
                    "forward": 0,
                    "reply": 0,
                    "received": 0
                },
                "overallTTR": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "overallTTF": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "initialTTR": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "threads": {
                    "total": 0,
                    "haveRepliesFromAgents": 0,
                    "noReplyFromAgents": 0,
                    "completionRatio": 0
                }
            },
            {
                "timestamp": 1623020400000,
                "date": "Mon, 7th Jun",
                "messages": {
                    "sent": 1,
                    "forward": 0,
                    "reply": 0,
                    "received": 0
                },
                "overallTTR": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "overallTTF": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "initialTTR": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "threads": {
                    "total": 1,
                    "haveRepliesFromAgents": 0,
                    "noReplyFromAgents": 0,
                    "completionRatio": 0
                }
            },
            {
                "timestamp": 1623106800000,
                "date": "Tue, 8th Jun",
                "messages": {
                    "sent": 0,
                    "forward": 0,
                    "reply": 0,
                    "received": 0
                },
                "overallTTR": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "overallTTF": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "initialTTR": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "threads": {
                    "total": 0,
                    "haveRepliesFromAgents": 0,
                    "noReplyFromAgents": 0,
                    "completionRatio": 0
                }
            },
            {
                "timestamp": 1623193200000,
                "date": "Wed, 9th Jun",
                "messages": {
                    "sent": 1,
                    "forward": 0,
                    "reply": 1,
                    "received": 1
                },
                "overallTTR": {
                    "raw": 1647,
                    "rawNoBusiness": 1647
                },
                "overallTTF": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "initialTTR": {
                    "raw": 1647,
                    "rawNoBusiness": 1647
                },
                "threads": {
                    "total": 1,
                    "haveRepliesFromAgents": 1,
                    "noReplyFromAgents": 0,
                    "completionRatio": 100
                }
            }
        ]
    },
    "all_agent_stats": [
        {
            "name": "n.ullrich@timetoreply.com",
            "threads": {
                "total": 4,
                "internal": 0,
                "inbound": 2,
                "outbound": 2,
                "sentInternally": 0,
                "awaitCustomer": 3,
                "awaitAgent": 1,
                "closed": 0,
                "haveReplies": 4,
                "haveInitialReplies": 2
            },
            "messages": {
                "received": {
                    "count": 2,
                    "initial": 0,
                    "replies": 2,
                    "replyAll": 0,
                    "forward": 0,
                    "initialReplies": 0,
                    "dailyStats": {
                        "2021-06-02 00:00:00": 2
                    }
                },
                "sent": {
                    "count": 6,
                    "initial": 2,
                    "replies": 4,
                    "replyAll": 0,
                    "forward": 0,
                    "initialReplies": 0,
                    "dailyStats": {
                        "2021-06-02 00:00:00": 4,
                        "2021-06-03 00:00:00": 1,
                        "2021-06-04 00:00:00": 0,
                        "2021-06-05 00:00:00": 0,
                        "2021-06-06 00:00:00": 0,
                        "2021-06-07 00:00:00": 1
                    }
                }
            },
            "initialTTR": {
                "friendly": "40m:43s",
                "raw": 2443,
                "friendlyNoBusiness": "04h:55m:36s",
                "rawNoBusiness": 17736.5,
                "percentileRanks": [
                    {
                        "key": "15m:00s",
                        "value": "33.95%"
                    },
                    {
                        "key": "01h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "02h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "04h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "08h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "24h:00m",
                        "value": "100.00%"
                    }
                ],
                "percentileRanksRaw": [
                    {
                        "key": "15m:00s",
                        "value": "26.21%"
                    },
                    {
                        "key": "01h:00m",
                        "value": "30.03%"
                    },
                    {
                        "key": "02h:00m",
                        "value": "35.11%"
                    },
                    {
                        "key": "04h:00m",
                        "value": "45.29%"
                    },
                    {
                        "key": "08h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "24h:00m",
                        "value": "100.00%"
                    }
                ]
            },
            "overallTTF": {
                "friendly": "N\/A",
                "raw": null,
                "friendlyNoBusiness": "N\/A",
                "rawNoBusiness": null,
                "percentileRanks": [
                    {
                        "key": "15m:00s",
                        "value": "0.00%"
                    },
                    {
                        "key": "01h:00m",
                        "value": "0.00%"
                    },
                    {
                        "key": "02h:00m",
                        "value": "0.00%"
                    },
                    {
                        "key": "04h:00m",
                        "value": "0.00%"
                    },
                    {
                        "key": "08h:00m",
                        "value": "0.00%"
                    },
                    {
                        "key": "24h:00m",
                        "value": "0.00%"
                    }
                ],
                "percentileRanksRaw": [
                    {
                        "key": "15m:00s",
                        "value": "0.00%"
                    },
                    {
                        "key": "01h:00m",
                        "value": "0.00%"
                    },
                    {
                        "key": "02h:00m",
                        "value": "0.00%"
                    },
                    {
                        "key": "04h:00m",
                        "value": "0.00%"
                    },
                    {
                        "key": "08h:00m",
                        "value": "0.00%"
                    },
                    {
                        "key": "24h:00m",
                        "value": "0.00%"
                    }
                ]
            },
            "overallTTR": {
                "friendly": "26m:31s",
                "raw": 1591.25,
                "friendlyNoBusiness": "02h:33m:58s",
                "rawNoBusiness": 9238,
                "percentileRanks": [
                    {
                        "key": "15m:00s",
                        "value": "51.86%"
                    },
                    {
                        "key": "01h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "02h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "04h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "08h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "24h:00m",
                        "value": "100.00%"
                    }
                ],
                "percentileRanksRaw": [
                    {
                        "key": "15m:00s",
                        "value": "50.23%"
                    },
                    {
                        "key": "01h:00m",
                        "value": "54.10%"
                    },
                    {
                        "key": "02h:00m",
                        "value": "59.25%"
                    },
                    {
                        "key": "04h:00m",
                        "value": "69.56%"
                    },
                    {
                        "key": "08h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "24h:00m",
                        "value": "100.00%"
                    }
                ]
            },
            "overallTTC": {
                "friendly": "N\/A",
                "raw": null,
                "friendlyNoBusiness": "N\/A",
                "rawNoBusiness": null
            }
        },
        {
            "name": "l.turner@timetoreply.com",
            "threads": {
                "total": 2,
                "internal": 0,
                "inbound": 1,
                "outbound": 1,
                "sentInternally": 0,
                "awaitCustomer": 1,
                "awaitAgent": 0,
                "closed": 1,
                "haveReplies": 1,
                "haveInitialReplies": 1
            },
            "messages": {
                "received": {
                    "count": 1,
                    "initial": 1,
                    "replies": 0,
                    "replyAll": 0,
                    "forward": 0,
                    "initialReplies": 0,
                    "dailyStats": {
                        "2021-06-09 00:00:00": 1
                    }
                },
                "sent": {
                    "count": 2,
                    "initial": 1,
                    "replies": 0,
                    "replyAll": 1,
                    "forward": 0,
                    "initialReplies": 0,
                    "dailyStats": {
                        "2021-06-04 00:00:00": 1,
                        "2021-06-05 00:00:00": 0,
                        "2021-06-06 00:00:00": 0,
                        "2021-06-07 00:00:00": 0,
                        "2021-06-08 00:00:00": 0,
                        "2021-06-09 00:00:00": 1
                    }
                }
            },
            "initialTTR": {
                "friendly": "27m:27s",
                "raw": 1647,
                "friendlyNoBusiness": "27m:27s",
                "rawNoBusiness": 1647,
                "percentileRanks": [
                    {
                        "key": "15m:00s",
                        "value": "0.00%"
                    },
                    {
                        "key": "01h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "02h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "04h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "08h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "24h:00m",
                        "value": "100.00%"
                    }
                ],
                "percentileRanksRaw": [
                    {
                        "key": "15m:00s",
                        "value": "0.00%"
                    },
                    {
                        "key": "01h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "02h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "04h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "08h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "24h:00m",
                        "value": "100.00%"
                    }
                ]
            },
            "overallTTF": {
                "friendly": "N\/A",
                "raw": null,
                "friendlyNoBusiness": "N\/A",
                "rawNoBusiness": null,
                "percentileRanks": [
                    {
                        "key": "15m:00s",
                        "value": "0.00%"
                    },
                    {
                        "key": "01h:00m",
                        "value": "0.00%"
                    },
                    {
                        "key": "02h:00m",
                        "value": "0.00%"
                    },
                    {
                        "key": "04h:00m",
                        "value": "0.00%"
                    },
                    {
                        "key": "08h:00m",
                        "value": "0.00%"
                    },
                    {
                        "key": "24h:00m",
                        "value": "0.00%"
                    }
                ],
                "percentileRanksRaw": [
                    {
                        "key": "15m:00s",
                        "value": "0.00%"
                    },
                    {
                        "key": "01h:00m",
                        "value": "0.00%"
                    },
                    {
                        "key": "02h:00m",
                        "value": "0.00%"
                    },
                    {
                        "key": "04h:00m",
                        "value": "0.00%"
                    },
                    {
                        "key": "08h:00m",
                        "value": "0.00%"
                    },
                    {
                        "key": "24h:00m",
                        "value": "0.00%"
                    }
                ]
            },
            "overallTTR": {
                "friendly": "27m:27s",
                "raw": 1647,
                "friendlyNoBusiness": "27m:27s",
                "rawNoBusiness": 1647,
                "percentileRanks": [
                    {
                        "key": "15m:00s",
                        "value": "0.00%"
                    },
                    {
                        "key": "01h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "02h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "04h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "08h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "24h:00m",
                        "value": "100.00%"
                    }
                ],
                "percentileRanksRaw": [
                    {
                        "key": "15m:00s",
                        "value": "0.00%"
                    },
                    {
                        "key": "01h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "02h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "04h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "08h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "24h:00m",
                        "value": "100.00%"
                    }
                ]
            },
            "overallTTC": {
                "friendly": "N\/A",
                "raw": null,
                "friendlyNoBusiness": "N\/A",
                "rawNoBusiness": null
            }
        }
    ],
    "all_domain_stats": [],
    "all_customer_stats": [
        {
            "name": "jesus59@ferry.com",
            "threads": {
                "total": 2,
                "internal": 0,
                "inbound": 1,
                "outbound": 1,
                "sentInternally": 0,
                "awaitCustomer": 1,
                "awaitAgent": 0,
                "closed": 1,
                "haveReplies": 1,
                "haveInitialReplies": 1
            },
            "messages": {
                "received": {
                    "count": 1,
                    "initial": 1,
                    "replies": 0,
                    "replyAll": 0,
                    "forward": 0,
                    "initialReplies": 0,
                    "dailyStats": {
                        "2021-06-09 00:00:00": 1
                    }
                },
                "sent": {
                    "count": 2,
                    "initial": 1,
                    "replies": 0,
                    "replyAll": 1,
                    "forward": 0,
                    "initialReplies": 0,
                    "dailyStats": []
                }
            },
            "initialTTR": {
                "friendly": "27m:27s",
                "raw": 1647,
                "friendlyNoBusiness": "27m:27s",
                "rawNoBusiness": 1647,
                "percentileRanks": [
                    {
                        "key": "15m:00s",
                        "value": "0.00%"
                    },
                    {
                        "key": "01h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "02h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "04h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "08h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "24h:00m",
                        "value": "100.00%"
                    }
                ],
                "percentileRanksRaw": [
                    {
                        "key": "15m:00s",
                        "value": "0.00%"
                    },
                    {
                        "key": "01h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "02h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "04h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "08h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "24h:00m",
                        "value": "100.00%"
                    }
                ]
            },
            "overallTTF": {
                "friendly": "N\/A",
                "raw": null,
                "friendlyNoBusiness": "N\/A",
                "rawNoBusiness": null,
                "percentileRanks": [
                    {
                        "key": "15m:00s",
                        "value": "0.00%"
                    },
                    {
                        "key": "01h:00m",
                        "value": "0.00%"
                    },
                    {
                        "key": "02h:00m",
                        "value": "0.00%"
                    },
                    {
                        "key": "04h:00m",
                        "value": "0.00%"
                    },
                    {
                        "key": "08h:00m",
                        "value": "0.00%"
                    },
                    {
                        "key": "24h:00m",
                        "value": "0.00%"
                    }
                ],
                "percentileRanksRaw": [
                    {
                        "key": "15m:00s",
                        "value": "0.00%"
                    },
                    {
                        "key": "01h:00m",
                        "value": "0.00%"
                    },
                    {
                        "key": "02h:00m",
                        "value": "0.00%"
                    },
                    {
                        "key": "04h:00m",
                        "value": "0.00%"
                    },
                    {
                        "key": "08h:00m",
                        "value": "0.00%"
                    },
                    {
                        "key": "24h:00m",
                        "value": "0.00%"
                    }
                ]
            },
            "overallTTR": {
                "friendly": "27m:27s",
                "raw": 1647,
                "friendlyNoBusiness": "27m:27s",
                "rawNoBusiness": 1647,
                "percentileRanks": [
                    {
                        "key": "15m:00s",
                        "value": "0.00%"
                    },
                    {
                        "key": "01h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "02h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "04h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "08h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "24h:00m",
                        "value": "100.00%"
                    }
                ],
                "percentileRanksRaw": [
                    {
                        "key": "15m:00s",
                        "value": "0.00%"
                    },
                    {
                        "key": "01h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "02h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "04h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "08h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "24h:00m",
                        "value": "100.00%"
                    }
                ]
            },
            "overallTTC": {
                "friendly": "N\/A",
                "raw": null,
                "friendlyNoBusiness": "N\/A",
                "rawNoBusiness": null
            }
        },
        {
            "name": "schumm.com",
            "threads": {
                "total": 2,
                "internal": 0,
                "inbound": 1,
                "outbound": 1,
                "sentInternally": 0,
                "awaitCustomer": 1,
                "awaitAgent": 1,
                "closed": 0,
                "haveReplies": 2,
                "haveInitialReplies": 1
            },
            "messages": {
                "received": {
                    "count": 2,
                    "initial": 1,
                    "replies": 1,
                    "replyAll": 0,
                    "forward": 0,
                    "initialReplies": 0,
                    "dailyStats": {
                        "2021-06-02 00:00:00": 2
                    }
                },
                "sent": {
                    "count": 3,
                    "initial": 1,
                    "replies": 2,
                    "replyAll": 0,
                    "forward": 0,
                    "initialReplies": 0,
                    "dailyStats": []
                }
            },
            "initialTTR": {
                "friendly": "40s",
                "raw": 40,
                "friendlyNoBusiness": "40s",
                "rawNoBusiness": 40,
                "percentileRanks": [
                    {
                        "key": "15m:00s",
                        "value": "100.00%"
                    },
                    {
                        "key": "01h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "02h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "04h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "08h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "24h:00m",
                        "value": "100.00%"
                    }
                ],
                "percentileRanksRaw": [
                    {
                        "key": "15m:00s",
                        "value": "100.00%"
                    },
                    {
                        "key": "01h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "02h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "04h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "08h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "24h:00m",
                        "value": "100.00%"
                    }
                ]
            },
            "overallTTF": {
                "friendly": "N\/A",
                "raw": null,
                "friendlyNoBusiness": "N\/A",
                "rawNoBusiness": null,
                "percentileRanks": [
                    {
                        "key": "15m:00s",
                        "value": "0.00%"
                    },
                    {
                        "key": "01h:00m",
                        "value": "0.00%"
                    },
                    {
                        "key": "02h:00m",
                        "value": "0.00%"
                    },
                    {
                        "key": "04h:00m",
                        "value": "0.00%"
                    },
                    {
                        "key": "08h:00m",
                        "value": "0.00%"
                    },
                    {
                        "key": "24h:00m",
                        "value": "0.00%"
                    }
                ],
                "percentileRanksRaw": [
                    {
                        "key": "15m:00s",
                        "value": "0.00%"
                    },
                    {
                        "key": "01h:00m",
                        "value": "0.00%"
                    },
                    {
                        "key": "02h:00m",
                        "value": "0.00%"
                    },
                    {
                        "key": "04h:00m",
                        "value": "0.00%"
                    },
                    {
                        "key": "08h:00m",
                        "value": "0.00%"
                    },
                    {
                        "key": "24h:00m",
                        "value": "0.00%"
                    }
                ]
            },
            "overallTTR": {
                "friendly": "08m:19s",
                "raw": 499.5,
                "friendlyNoBusiness": "08m:19s",
                "rawNoBusiness": 499.5,
                "percentileRanks": [
                    {
                        "key": "15m:00s",
                        "value": "100.00%"
                    },
                    {
                        "key": "01h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "02h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "04h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "08h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "24h:00m",
                        "value": "100.00%"
                    }
                ],
                "percentileRanksRaw": [
                    {
                        "key": "15m:00s",
                        "value": "100.00%"
                    },
                    {
                        "key": "01h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "02h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "04h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "08h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "24h:00m",
                        "value": "100.00%"
                    }
                ]
            },
            "overallTTC": {
                "friendly": "N\/A",
                "raw": null,
                "friendlyNoBusiness": "N\/A",
                "rawNoBusiness": null
            }
        }
    ],
    "total": 3,
    "page": 1,
    "args": {
        "model": {
            "icon": "building",
            "id": null,
            "model_type": "Internal",
            "name": "My Company"
        },
        "modelCom": {
            "id": 1,
            "name": "Top Revenue Customers",
            "email_usernames": [
                "jesus59@ferry.com",
                "rlynch@gleason.com"
            ],
            "customer_domains": [
                "schumm.com",
                "armstrong.biz"
            ],
            "model_type": "Customer Group",
            "icon": "user-friends"
        }
    }
}
 
        

Request   

GET api/reports/overview

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".

to  string optional  

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

model  string optional  

Name, email address or domain you want statistics for. Use the models endpoint to get a list.

model_type  string optional  

Model Type of the model being queried. Use "Customer" for email address and domain.

exclude_cc  boolean optional  

Should we exclude CC messages from the statistics.

model_com  string optional  

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

model_type_com  string optional  

Model Type of the model you are communicating with. Use "Customer" for email address and domain.

exclude_cc_com  boolean optional  

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

exclusive  boolean optional  

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

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.

thread_status  string optional  

A comma separated list (no spaces) of any combination of the following: 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.

classification  string optional  

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

messageType  string optional  

A comma separated list (no spaces) of any combination of the following: 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.

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.

no_reply_for  integer optional  

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

per_page  integer optional  

For paginated results, how many results per page. Max 200.

sort_by  string optional  

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

direction  string optional  

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

page  integer optional  

For paginated results, which page to get.

Productivity - Report

requires authentication

Productivity Report Data

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

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

let 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();
$response = $client->get(
    'https://portal.timetoreply.com/api/reports/productivity',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
        ],
        'query' => [
            'date'=> '2020-01-01',
            'model'=> 'My Company',
            'model_type'=> 'Internal',
            'model_com'=> 'Top Revenue Customers',
            'model_type_com'=> 'Customer Group',
            'label'=> 'INBOX',
            'per_page'=> '2',
            'sort_by'=> 'threads.total',
            'direction'=> 'desc',
            'page'=> '1',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

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 (0.00%)",
                "meta": {
                    "tooltip": "The percentage of sent emails that were replies, regardless of business hours."
                },
                "headerClass": "has-tooltip"
            },
            {
                "field": "messages_sent_initial_percent",
                "label": "% New Emails Sent",
                "sortable": true,
                "visible": true,
                "subheading": "0 (0.00%)",
                "meta": {
                    "tooltip": "The percentage of sent emails that were new emails (i.e. not a reply or a forward) regardless of business hours."
                },
                "headerClass": "has-tooltip"
            },
            {
                "field": "messages_sent_forwards_percent",
                "label": "% Forwards Sent",
                "sortable": true,
                "visible": true,
                "subheading": "0 (0.00%)",
                "meta": {
                    "tooltip": "The percentage of sent emails that were emails that were forwards regardless of business hours."
                },
                "headerClass": "has-tooltip"
            }
        ],
        "data": [],
        "default_sort": [
            "messages_sent_count",
            "desc"
        ],
        "default_sort_direction": "desc",
        "loading": false,
        "per_page": 2,
        "total": 0,
        "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,
                "subheading": "N\/A",
                "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,
                "subheading": "N\/A",
                "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,
                "subheading": "0 (0.00%)",
                "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)"
                },
                "headerClass": "has-tooltip"
            },
            {
                "field": "out_business_hours",
                "label": "Sent Outside Business Hours",
                "sortable": true,
                "visible": true,
                "subheading": "0 (0.00%)",
                "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)"
                },
                "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": [],
        "default_sort": [
            "first_activity",
            "asc"
        ],
        "default_sort_direction": "desc",
        "loading": false,
        "per_page": 2,
        "total": 0,
        "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 (0.00%)",
                "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."
                },
                "headerClass": "has-tooltip"
            },
            {
                "field": "threads_outbound",
                "label": "Outbound Conversations",
                "sortable": true,
                "visible": true,
                "subheading": "0 (0.00%)",
                "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."
                },
                "headerClass": "has-tooltip"
            },
            {
                "field": "threads_internal",
                "label": "Internal Conversations",
                "sortable": true,
                "visible": true,
                "subheading": "0 (0.00%)",
                "meta": {
                    "tooltip": "The number of conversations where all participants have been in your company."
                },
                "headerClass": "has-tooltip"
            },
            {
                "field": "threads_await_agent",
                "label": "Conversations waiting for a reply",
                "sortable": true,
                "visible": true,
                "subheading": "0 (0.00%)",
                "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\"."
                },
                "headerClass": "has-tooltip",
                "cellClass": "has-background-white-ter"
            },
            {
                "field": "threads_closed",
                "label": "Conversations closed",
                "sortable": true,
                "visible": true,
                "subheading": "0 (0.00%)",
                "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"
                },
                "headerClass": "has-tooltip",
                "cellClass": "has-background-white-ter"
            }
        ],
        "data": [],
        "default_sort": [
            "threads_count",
            "desc"
        ],
        "default_sort_direction": "desc",
        "loading": false,
        "per_page": 2,
        "total": 0,
        "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,
                "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,
                "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,
                "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,
                "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": [],
        "default_sort": [
            "initialTTR",
            "asc"
        ],
        "default_sort_direction": "asc",
        "loading": false,
        "per_page": 2,
        "total": 0,
        "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_900",
                "label": "Replies under 15m:00s",
                "sortable": true,
                "visible": true,
                "subheading": "0.00%",
                "meta": {
                    "tooltip": "Percentage of replies that happened in under 15m:00s (takes business hours into account)"
                },
                "headerClass": "has-tooltip"
            },
            {
                "field": "replies_under_3600",
                "label": "Replies under 01h:00m",
                "sortable": true,
                "visible": true,
                "subheading": "0.00%",
                "meta": {
                    "tooltip": "Percentage of replies that happened in under 01h:00m (takes business hours into account)"
                },
                "headerClass": "has-tooltip"
            },
            {
                "field": "replies_under_7200",
                "label": "Replies under 02h:00m",
                "sortable": true,
                "visible": true,
                "subheading": "0.00%",
                "meta": {
                    "tooltip": "Percentage of replies that happened in under 02h:00m (takes business hours into account)"
                },
                "headerClass": "has-tooltip"
            },
            {
                "field": "replies_under_14400",
                "label": "Replies under 04h:00m",
                "sortable": true,
                "visible": true,
                "subheading": "0.00%",
                "meta": {
                    "tooltip": "Percentage of replies that happened in under 04h:00m (takes business hours into account)"
                },
                "headerClass": "has-tooltip"
            },
            {
                "field": "replies_under_28800",
                "label": "Replies under 08h:00m",
                "sortable": true,
                "visible": true,
                "subheading": "0.00%",
                "meta": {
                    "tooltip": "Percentage of replies that happened in under 08h:00m (takes business hours into account)"
                },
                "headerClass": "has-tooltip"
            },
            {
                "field": "replies_under_86400",
                "label": "Replies under 24h:00m",
                "sortable": true,
                "visible": true,
                "subheading": "0.00%",
                "meta": {
                    "tooltip": "Percentage of replies that happened in under 24h:00m (takes business hours into account)"
                },
                "headerClass": "has-tooltip"
            }
        ],
        "data": [],
        "default_sort": [
            "replies_under_900",
            "desc"
        ],
        "default_sort_direction": "desc",
        "loading": false,
        "per_page": 2,
        "total": 0,
        "page": 1
    },
    "stats": {
        "messages": {
            "received": {
                "hourOfDay": []
            },
            "sent": {
                "hourOfDay": []
            }
        }
    },
    "page": 1,
    "total": 0,
    "args": {
        "model": {
            "icon": "building",
            "id": null,
            "model_type": "Internal",
            "name": "My Company"
        },
        "modelCom": {
            "id": 1,
            "name": "Top Revenue Customers",
            "email_usernames": [
                "jesus59@ferry.com",
                "rlynch@gleason.com"
            ],
            "customer_domains": [
                "schumm.com",
                "armstrong.biz"
            ],
            "model_type": "Customer Group",
            "icon": "user-friends"
        }
    }
}
 
        

Request   

GET api/reports/productivity

Query Parameters

date  string optional  

The date of your request in the format "YYYY-MM-DD".

model  string optional  

Name, email address or domain you want statistics for. Use the models endpoint to get a list.

model_type  string optional  

Model Type of the model being queried. Use "Customer" for email address and domain.

model_com  string optional  

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

model_type_com  string optional  

Model Type of the model you are communicating with. Use "Customer" for email address and domain.

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.

sort_by  string optional  

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

direction  string optional  

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

page  integer optional  

For paginated results, which page to get.

Ratio - Report

requires authentication

Ratio Report Data

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

let params = {
    "from": "2020-01-01",
    "to": "2020-01-08",
    "model": "My Company",
    "model_type": "Internal",
    "exclude_cc": "",
    "model_com": "Top Revenue Customers",
    "model_type_com": "Customer Group",
    "exclude_cc_com": "",
    "exclusive": "",
    "label": "INBOX",
    "thread_type": "inbound",
    "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]));

let 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();
$response = $client->get(
    'https://portal.timetoreply.com/api/reports/ratio',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
        ],
        'query' => [
            'from'=> '2020-01-01',
            'to'=> '2020-01-08',
            'model'=> 'My Company',
            'model_type'=> 'Internal',
            'exclude_cc'=> '',
            'model_com'=> 'Top Revenue Customers',
            'model_type_com'=> 'Customer Group',
            'exclude_cc_com'=> '',
            'exclusive'=> '',
            'label'=> 'INBOX',
            'thread_type'=> 'inbound',
            '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));

Example response (200):

Show headers
            cache-control: no-cache, private
content-type: application/json
tracking-events: []
 
            
                
{
    "stats": {
        "threads": {
            "total": 3,
            "internal": 0,
            "inbound": 3,
            "outbound": 0,
            "sentInternally": 0,
            "awaitCustomer": 2,
            "awaitAgent": 0,
            "closed": 1,
            "haveReplies": 3,
            "haveRepliesFromAgents": 3,
            "completionRatio": "100.00%"
        },
        "messages": {
            "count": 10,
            "initial": 3,
            "replies": 6,
            "replyAll": 1,
            "forward": 0,
            "received": {
                "count": 5,
                "initial": 3,
                "replies": 2,
                "replyAll": 0,
                "forward": 0,
                "initialReplies": 0,
                "dayOfWeek": {
                    "Friday": 0,
                    "Monday": 0,
                    "Saturday": 0,
                    "Sunday": 0,
                    "Thursday": 0,
                    "Tuesday": 0,
                    "Wednesday": 2.5
                },
                "hourOfDay": {
                    "00:00": 0.143,
                    "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.143,
                    "11:00": 0.143,
                    "12:00": 0.143,
                    "13:00": 0.143,
                    "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
                }
            },
            "sent": {
                "count": 5,
                "initial": 0,
                "replies": 4,
                "replyAll": 1,
                "forward": 0,
                "initialReplies": 3,
                "dayOfWeek": {
                    "Friday": 0,
                    "Monday": 0,
                    "Saturday": 0,
                    "Sunday": 0,
                    "Thursday": 0,
                    "Tuesday": 0,
                    "Wednesday": 2.5
                },
                "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.286,
                    "11:00": 0.143,
                    "12:00": 0.143,
                    "13:00": 0.143,
                    "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": "26m:42s",
            "raw": 1602.4,
            "friendlyNoBusiness": "02h:08m:39s",
            "rawNoBusiness": 7719.8,
            "percentileRanks": [
                {
                    "key": "15m:00s",
                    "value": "45.70%"
                },
                {
                    "key": "01h:00m",
                    "value": "100.00%"
                },
                {
                    "key": "02h:00m",
                    "value": "100.00%"
                },
                {
                    "key": "04h:00m",
                    "value": "100.00%"
                },
                {
                    "key": "08h:00m",
                    "value": "100.00%"
                },
                {
                    "key": "24h:00m",
                    "value": "100.00%"
                }
            ],
            "percentileRanksRaw": [
                {
                    "key": "15m:00s",
                    "value": "45.70%"
                },
                {
                    "key": "01h:00m",
                    "value": "62.67%"
                },
                {
                    "key": "02h:00m",
                    "value": "66.84%"
                },
                {
                    "key": "04h:00m",
                    "value": "75.20%"
                },
                {
                    "key": "08h:00m",
                    "value": "100.00%"
                },
                {
                    "key": "24h:00m",
                    "value": "100.00%"
                }
            ]
        },
        "initialTTR": {
            "friendly": "36m:17s",
            "raw": 2177.6666666666665,
            "friendlyNoBusiness": "03h:26m:13s",
            "rawNoBusiness": 12373.333333333334,
            "percentileRanks": [
                {
                    "key": "15m:00s",
                    "value": "34.12%"
                },
                {
                    "key": "01h:00m",
                    "value": "100.00%"
                },
                {
                    "key": "02h:00m",
                    "value": "100.00%"
                },
                {
                    "key": "04h:00m",
                    "value": "100.00%"
                },
                {
                    "key": "08h:00m",
                    "value": "100.00%"
                },
                {
                    "key": "24h:00m",
                    "value": "100.00%"
                }
            ],
            "percentileRanksRaw": [
                {
                    "key": "15m:00s",
                    "value": "33.44%"
                },
                {
                    "key": "01h:00m",
                    "value": "38.53%"
                },
                {
                    "key": "02h:00m",
                    "value": "45.31%"
                },
                {
                    "key": "04h:00m",
                    "value": "58.87%"
                },
                {
                    "key": "08h:00m",
                    "value": "100.00%"
                },
                {
                    "key": "24h:00m",
                    "value": "100.00%"
                }
            ]
        },
        "overallTTF": {
            "friendly": "N\/A",
            "raw": null,
            "friendlyNoBusiness": "N\/A",
            "rawNoBusiness": null,
            "percentileRanks": [
                {
                    "key": "15m:00s",
                    "value": "0.00%"
                },
                {
                    "key": "01h:00m",
                    "value": "0.00%"
                },
                {
                    "key": "02h:00m",
                    "value": "0.00%"
                },
                {
                    "key": "04h:00m",
                    "value": "0.00%"
                },
                {
                    "key": "08h:00m",
                    "value": "0.00%"
                },
                {
                    "key": "24h:00m",
                    "value": "0.00%"
                }
            ],
            "percentileRanksRaw": [
                {
                    "key": "15m:00s",
                    "value": "0.00%"
                },
                {
                    "key": "01h:00m",
                    "value": "0.00%"
                },
                {
                    "key": "02h:00m",
                    "value": "0.00%"
                },
                {
                    "key": "04h:00m",
                    "value": "0.00%"
                },
                {
                    "key": "08h:00m",
                    "value": "0.00%"
                },
                {
                    "key": "24h:00m",
                    "value": "0.00%"
                }
            ]
        },
        "overallTTC": {
            "friendly": "N\/A",
            "raw": null,
            "friendlyNoBusiness": "N\/A",
            "rawNoBusiness": null,
            "percentileRanks": [
                {
                    "key": "15m:00s",
                    "value": "0.00%"
                },
                {
                    "key": "01h:00m",
                    "value": "0.00%"
                },
                {
                    "key": "02h:00m",
                    "value": "0.00%"
                },
                {
                    "key": "04h:00m",
                    "value": "0.00%"
                },
                {
                    "key": "08h:00m",
                    "value": "0.00%"
                },
                {
                    "key": "24h:00m",
                    "value": "0.00%"
                }
            ],
            "percentileRanksRaw": [
                {
                    "key": "15m:00s",
                    "value": "0.00%"
                },
                {
                    "key": "01h:00m",
                    "value": "0.00%"
                },
                {
                    "key": "02h:00m",
                    "value": "0.00%"
                },
                {
                    "key": "04h:00m",
                    "value": "0.00%"
                },
                {
                    "key": "08h:00m",
                    "value": "0.00%"
                },
                {
                    "key": "24h:00m",
                    "value": "0.00%"
                }
            ]
        },
        "dailyStats": [
            {
                "timestamp": 1622588400000,
                "date": "Wed, 2nd Jun",
                "messages": {
                    "sent": 4,
                    "forward": 0,
                    "reply": 4,
                    "received": 4
                },
                "overallTTR": {
                    "raw": 1591.25,
                    "rawNoBusiness": 9238
                },
                "overallTTF": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "initialTTR": {
                    "raw": 2443,
                    "rawNoBusiness": 17736.5,
                    "ttr_ratio": 2.46
                },
                "threads": {
                    "total": 2,
                    "haveRepliesFromAgents": 2,
                    "noReplyFromAgents": 0,
                    "completionRatio": 100,
                    "haveCustomerSuccess": 2,
                    "haveInitialRepliesFromAgents": 2
                }
            },
            {
                "timestamp": 1622674800000,
                "date": "Thu, 3rd Jun",
                "messages": {
                    "sent": 0,
                    "forward": 0,
                    "reply": 0,
                    "received": 0
                },
                "overallTTR": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "overallTTF": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "initialTTR": {
                    "raw": null,
                    "rawNoBusiness": null,
                    "ttr_ratio": 0
                },
                "threads": {
                    "total": 0,
                    "haveRepliesFromAgents": 0,
                    "noReplyFromAgents": 0,
                    "completionRatio": 0,
                    "haveCustomerSuccess": 0,
                    "haveInitialRepliesFromAgents": 0
                }
            },
            {
                "timestamp": 1622761200000,
                "date": "Fri, 4th Jun",
                "messages": {
                    "sent": 0,
                    "forward": 0,
                    "reply": 0,
                    "received": 0
                },
                "overallTTR": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "overallTTF": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "initialTTR": {
                    "raw": null,
                    "rawNoBusiness": null,
                    "ttr_ratio": 0
                },
                "threads": {
                    "total": 0,
                    "haveRepliesFromAgents": 0,
                    "noReplyFromAgents": 0,
                    "completionRatio": 0,
                    "haveCustomerSuccess": 0,
                    "haveInitialRepliesFromAgents": 0
                }
            },
            {
                "timestamp": 1622847600000,
                "date": "Sat, 5th Jun",
                "messages": {
                    "sent": 0,
                    "forward": 0,
                    "reply": 0,
                    "received": 0
                },
                "overallTTR": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "overallTTF": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "initialTTR": {
                    "raw": null,
                    "rawNoBusiness": null,
                    "ttr_ratio": 0
                },
                "threads": {
                    "total": 0,
                    "haveRepliesFromAgents": 0,
                    "noReplyFromAgents": 0,
                    "completionRatio": 0,
                    "haveCustomerSuccess": 0,
                    "haveInitialRepliesFromAgents": 0
                }
            },
            {
                "timestamp": 1622934000000,
                "date": "Sun, 6th Jun",
                "messages": {
                    "sent": 0,
                    "forward": 0,
                    "reply": 0,
                    "received": 0
                },
                "overallTTR": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "overallTTF": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "initialTTR": {
                    "raw": null,
                    "rawNoBusiness": null,
                    "ttr_ratio": 0
                },
                "threads": {
                    "total": 0,
                    "haveRepliesFromAgents": 0,
                    "noReplyFromAgents": 0,
                    "completionRatio": 0,
                    "haveCustomerSuccess": 0,
                    "haveInitialRepliesFromAgents": 0
                }
            },
            {
                "timestamp": 1623020400000,
                "date": "Mon, 7th Jun",
                "messages": {
                    "sent": 0,
                    "forward": 0,
                    "reply": 0,
                    "received": 0
                },
                "overallTTR": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "overallTTF": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "initialTTR": {
                    "raw": null,
                    "rawNoBusiness": null,
                    "ttr_ratio": 0
                },
                "threads": {
                    "total": 0,
                    "haveRepliesFromAgents": 0,
                    "noReplyFromAgents": 0,
                    "completionRatio": 0,
                    "haveCustomerSuccess": 0,
                    "haveInitialRepliesFromAgents": 0
                }
            },
            {
                "timestamp": 1623106800000,
                "date": "Tue, 8th Jun",
                "messages": {
                    "sent": 0,
                    "forward": 0,
                    "reply": 0,
                    "received": 0
                },
                "overallTTR": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "overallTTF": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "initialTTR": {
                    "raw": null,
                    "rawNoBusiness": null,
                    "ttr_ratio": 0
                },
                "threads": {
                    "total": 0,
                    "haveRepliesFromAgents": 0,
                    "noReplyFromAgents": 0,
                    "completionRatio": 0,
                    "haveCustomerSuccess": 0,
                    "haveInitialRepliesFromAgents": 0
                }
            },
            {
                "timestamp": 1623193200000,
                "date": "Wed, 9th Jun",
                "messages": {
                    "sent": 1,
                    "forward": 0,
                    "reply": 1,
                    "received": 1
                },
                "overallTTR": {
                    "raw": 1647,
                    "rawNoBusiness": 1647
                },
                "overallTTF": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "initialTTR": {
                    "raw": 1647,
                    "rawNoBusiness": 1647,
                    "ttr_ratio": 0
                },
                "threads": {
                    "total": 1,
                    "haveRepliesFromAgents": 1,
                    "noReplyFromAgents": 0,
                    "completionRatio": 100,
                    "haveCustomerSuccess": 0,
                    "haveInitialRepliesFromAgents": 1
                }
            }
        ]
    },
    "all_agent_stats": [
        {
            "name": "n.ullrich@timetoreply.com",
            "threads": {
                "total": 2,
                "internal": 0,
                "inbound": 2,
                "outbound": 0,
                "sentInternally": 0,
                "awaitCustomer": 2,
                "awaitAgent": 0,
                "closed": 0,
                "haveReplies": 4,
                "haveInitialReplies": 2,
                "haveContactSuccess": 2,
                "successRate": 100,
                "ttrRatio": 2.46,
                "initialReplyRate": 100,
                "timeToContactSuccess": 3477,
                "timeToContactSuccessFriendly": "57m:57s"
            },
            "messages": {
                "received": {
                    "count": 2,
                    "initial": 0,
                    "replies": 2,
                    "replyAll": 0,
                    "forward": 0,
                    "initialReplies": 0,
                    "dailyStats": {
                        "2021-06-02 00:00:00": 2
                    }
                },
                "sent": {
                    "count": 4,
                    "initial": 0,
                    "replies": 4,
                    "replyAll": 0,
                    "forward": 0,
                    "initialReplies": 0,
                    "dailyStats": {
                        "2021-06-02 00:00:00": 4
                    }
                }
            },
            "initialTTR": {
                "friendly": "40m:43s",
                "raw": 2443,
                "friendlyNoBusiness": "04h:55m:36s",
                "rawNoBusiness": 17736.5,
                "percentileRanks": [
                    {
                        "key": "15m:00s",
                        "value": "33.95%"
                    },
                    {
                        "key": "01h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "02h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "04h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "08h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "24h:00m",
                        "value": "100.00%"
                    }
                ],
                "percentileRanksRaw": [
                    {
                        "key": "15m:00s",
                        "value": "26.21%"
                    },
                    {
                        "key": "01h:00m",
                        "value": "30.03%"
                    },
                    {
                        "key": "02h:00m",
                        "value": "35.11%"
                    },
                    {
                        "key": "04h:00m",
                        "value": "45.29%"
                    },
                    {
                        "key": "08h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "24h:00m",
                        "value": "100.00%"
                    }
                ]
            },
            "overallTTF": {
                "friendly": "N\/A",
                "raw": null,
                "friendlyNoBusiness": "N\/A",
                "rawNoBusiness": null,
                "percentileRanks": [
                    {
                        "key": "15m:00s",
                        "value": "0.00%"
                    },
                    {
                        "key": "01h:00m",
                        "value": "0.00%"
                    },
                    {
                        "key": "02h:00m",
                        "value": "0.00%"
                    },
                    {
                        "key": "04h:00m",
                        "value": "0.00%"
                    },
                    {
                        "key": "08h:00m",
                        "value": "0.00%"
                    },
                    {
                        "key": "24h:00m",
                        "value": "0.00%"
                    }
                ],
                "percentileRanksRaw": [
                    {
                        "key": "15m:00s",
                        "value": "0.00%"
                    },
                    {
                        "key": "01h:00m",
                        "value": "0.00%"
                    },
                    {
                        "key": "02h:00m",
                        "value": "0.00%"
                    },
                    {
                        "key": "04h:00m",
                        "value": "0.00%"
                    },
                    {
                        "key": "08h:00m",
                        "value": "0.00%"
                    },
                    {
                        "key": "24h:00m",
                        "value": "0.00%"
                    }
                ]
            },
            "overallTTR": {
                "friendly": "26m:31s",
                "raw": 1591.25,
                "friendlyNoBusiness": "02h:33m:58s",
                "rawNoBusiness": 9238,
                "percentileRanks": [
                    {
                        "key": "15m:00s",
                        "value": "51.86%"
                    },
                    {
                        "key": "01h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "02h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "04h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "08h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "24h:00m",
                        "value": "100.00%"
                    }
                ],
                "percentileRanksRaw": [
                    {
                        "key": "15m:00s",
                        "value": "50.23%"
                    },
                    {
                        "key": "01h:00m",
                        "value": "54.10%"
                    },
                    {
                        "key": "02h:00m",
                        "value": "59.25%"
                    },
                    {
                        "key": "04h:00m",
                        "value": "69.56%"
                    },
                    {
                        "key": "08h:00m",
                        "value": "100.00%"
                    },
                    {
                        "key": "24h:00m",
                        "value": "100.00%"
                    }
                ]
            },
            "overallTTC": {
                "friendly": "N\/A",
                "raw": null,
                "friendlyNoBusiness": "N\/A",
                "rawNoBusiness": null
            }
        },
        {
            "name": "support@timetoreply.com",
            "threads": {
                "total": 2,
                "internal": 0,
                "inbound": 2,
                "outbound": 0,
                "sentInternally": 0,
                "awaitCustomer": 2,
                "awaitAgent": 0,
                "closed": 0,
                "haveReplies": 0,
                "haveInitialReplies": 0,
                "haveContactSuccess": 0,
                "successRate": 0,
                "ttrRatio": 0,
                "initialReplyRate": 0,
                "timeToContactSuccess": null,
                "timeToContactSuccessFriendly": "N\/A"
            },
            "messages": {
                "received": {
                    "count": 2,
                    "initial": 2,
                    "replies": 0,
                    "replyAll": 0,
                    "forward": 0,
                    "initialReplies": 0,
                    "dailyStats": {
                        "2021-06-02 00:00:00": 2
                    }
                },
                "sent": {
                    "count": 0,
                    "initial": 0,
                    "replies": 0,
                    "replyAll": 0,
                    "forward": 0,
                    "initialReplies": 0,
                    "dailyStats": null
                }
            },
            "initialTTR": {
                "friendly": "N\/A",
                "raw": null,
                "friendlyNoBusiness": "N\/A",
                "rawNoBusiness": null,
                "percentileRanks": null,
                "percentileRanksRaw": null
            },
            "overallTTF": {
                "friendly": "N\/A",
                "raw": null,
                "friendlyNoBusiness": "N\/A",
                "rawNoBusiness": null,
                "percentileRanks": null,
                "percentileRanksRaw": null
            },
            "overallTTR": {
                "friendly": "N\/A",
                "raw": null,
                "friendlyNoBusiness": "N\/A",
                "rawNoBusiness": null,
                "percentileRanks": null,
                "percentileRanksRaw": null
            },
            "overallTTC": {
                "friendly": "N\/A",
                "raw": null,
                "friendlyNoBusiness": "N\/A",
                "rawNoBusiness": null
            }
        }
    ],
    "total": 3,
    "overall": {
        "total": 3,
        "have_initial_reply": 3,
        "success": 2,
        "avg_convo_length": 4,
        "have_initial_reply_rate": 100,
        "success_rate": 66.67,
        "success_time": 3477,
        "success_time_friendly": "57m:57s",
        "customer_reply_time": 1034,
        "customer_reply_time_friendly": "17m:14s",
        "avg_initial_reply_time": 2177.6666666666665,
        "avg_initial_reply_time_friendly": "36m:17s",
        "ttr_ratio": 1.84
    },
    "contact_rate_data": {
        "total": [
            1,
            1,
            1,
            0,
            0
        ],
        "have_initial_reply": [
            1,
            1,
            1,
            0,
            0
        ],
        "success": [
            1,
            0,
            1,
            0,
            0
        ],
        "avg_convo_length": [
            4,
            0,
            4,
            0,
            0
        ],
        "have_initial_reply_rate": [
            100,
            100,
            100,
            0,
            0
        ],
        "success_rate": [
            100,
            null,
            100,
            null,
            null
        ],
        "success_time": [
            571,
            0,
            6383,
            0,
            0
        ],
        "success_time_friendly": [
            "09m:31s",
            "00s",
            "01h:46m:23s",
            "00s",
            "00s"
        ],
        "customer_reply_time": [
            531,
            null,
            1537,
            null,
            null
        ],
        "customer_reply_time_friendly": [
            "08m:51s",
            "N\/A",
            "25m:37s",
            "N\/A",
            "N\/A"
        ],
        "avg_initial_reply_time": [
            40,
            1647,
            4846,
            null,
            null
        ],
        "avg_initial_reply_time_friendly": [
            "40s",
            "27m:27s",
            "01h:20m:46s",
            "N\/A",
            "N\/A"
        ],
        "ttr_ratio": [
            150,
            0,
            1.24,
            0,
            0
        ]
    },
    "page": 1,
    "ttr_categories": [
        "< 15m",
        "15m - 1h",
        "1h - 4h",
        "4h - 8h",
        "> 8h"
    ],
    "args": {
        "model": {
            "icon": "building",
            "id": null,
            "model_type": "Internal",
            "name": "My Company"
        },
        "modelCom": {
            "id": 1,
            "name": "Top Revenue Customers",
            "email_usernames": [
                "jesus59@ferry.com",
                "rlynch@gleason.com"
            ],
            "customer_domains": [
                "schumm.com",
                "armstrong.biz"
            ],
            "model_type": "Customer Group",
            "icon": "user-friends"
        }
    }
}
 
        

Request   

GET api/reports/ratio

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".

to  string optional  

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

model  string optional  

Name, email address or domain you want statistics for. Use the models endpoint to get a list.

model_type  string optional  

Model Type of the model being queried. Use "Customer" for email address and domain.

exclude_cc  boolean optional  

Should we exclude CC messages from the statistics.

model_com  string optional  

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

model_type_com  string optional  

Model Type of the model you are communicating with. Use "Customer" for email address and domain.

exclude_cc_com  boolean optional  

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

exclusive  boolean optional  

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

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  

This field is provided simply for compatibility with other methods. It will always be set to "inbound" for this report.

thread_status  string optional  

A comma separated list (no spaces) of any combination of the following: 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.

classification  string optional  

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

messageType  string optional  

A comma separated list (no spaces) of any combination of the following: 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.

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.

no_reply_for  integer optional  

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

per_page  integer optional  

For paginated results, how many results per page. Max 200.

sort_by  string optional  

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

direction  string optional  

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

page  integer optional  

For paginated results, which page to get.

SLA - Report

requires authentication

SLA Report Data

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

let params = {
    "from": "2020-01-01",
    "to": "2020-01-08",
    "model": "timetoreply.com",
    "model_type": "Customer",
    "exclude_cc": "",
    "model_com": "Top Revenue Customers",
    "model_type_com": "Customer Group",
    "exclude_cc_com": "",
    "exclusive": "",
    "label": "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]));

let 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();
$response = $client->get(
    'https://portal.timetoreply.com/api/reports/sla',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
        ],
        'query' => [
            'from'=> '2020-01-01',
            'to'=> '2020-01-08',
            'model'=> 'timetoreply.com',
            'model_type'=> 'Customer',
            'exclude_cc'=> '',
            'model_com'=> 'Top Revenue Customers',
            'model_type_com'=> 'Customer Group',
            'exclude_cc_com'=> '',
            'exclusive'=> '',
            'label'=> '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));

Example response (200):

Show headers
            cache-control: no-cache, private
content-type: application/json
tracking-events: []
 
            
                
{
    "stats": {
        "threads": {
            "total": 6,
            "internal": 0,
            "inbound": 3,
            "outbound": 3,
            "sentInternally": 0,
            "awaitCustomer": 4,
            "awaitAgent": 1,
            "closed": 1,
            "haveReplies": 4,
            "haveRepliesFromAgents": 3,
            "completionRatio": "50.00%"
        },
        "messages": {
            "count": 13,
            "initial": 6,
            "replies": 6,
            "replyAll": 1,
            "forward": 0,
            "received": {
                "count": 5,
                "initial": 3,
                "replies": 2,
                "replyAll": 0,
                "forward": 0,
                "initialReplies": 1,
                "dayOfWeek": {
                    "Friday": 0,
                    "Monday": 0,
                    "Saturday": 0,
                    "Sunday": 0,
                    "Thursday": 0,
                    "Tuesday": 0,
                    "Wednesday": 2.5
                },
                "hourOfDay": {
                    "00:00": 0.143,
                    "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.143,
                    "11:00": 0.143,
                    "12:00": 0.143,
                    "13:00": 0.143,
                    "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
                }
            },
            "sent": {
                "count": 8,
                "initial": 3,
                "replies": 4,
                "replyAll": 1,
                "forward": 0,
                "initialReplies": 3,
                "dayOfWeek": {
                    "Friday": 1,
                    "Monday": 1,
                    "Saturday": 0,
                    "Sunday": 0,
                    "Thursday": 1,
                    "Tuesday": 0,
                    "Wednesday": 2.5
                },
                "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.714,
                    "11:00": 0.143,
                    "12:00": 0.143,
                    "13:00": 0.143,
                    "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": "26m:42s",
            "raw": 1602.4,
            "friendlyNoBusiness": "02h:08m:39s",
            "rawNoBusiness": 7719.8,
            "percentileRanks": [
                {
                    "key": "02h:00m",
                    "value": "100.00%"
                }
            ],
            "percentileRanksRaw": [
                {
                    "key": "02h:00m",
                    "value": "66.84%"
                }
            ]
        },
        "initialTTR": {
            "friendly": "36m:17s",
            "raw": 2177.6666666666665,
            "friendlyNoBusiness": "03h:26m:13s",
            "rawNoBusiness": 12373.333333333334,
            "percentileRanks": [
                {
                    "key": "02h:00m",
                    "value": "100.00%"
                }
            ],
            "percentileRanksRaw": [
                {
                    "key": "02h:00m",
                    "value": "45.31%"
                }
            ]
        },
        "overallTTF": {
            "friendly": "N\/A",
            "raw": null,
            "friendlyNoBusiness": "N\/A",
            "rawNoBusiness": null,
            "percentileRanks": [
                {
                    "key": "02h:00m",
                    "value": "0.00%"
                }
            ],
            "percentileRanksRaw": [
                {
                    "key": "02h:00m",
                    "value": "0.00%"
                }
            ]
        },
        "overallTTC": {
            "friendly": "N\/A",
            "raw": null,
            "friendlyNoBusiness": "N\/A",
            "rawNoBusiness": null,
            "percentileRanks": [
                {
                    "key": "02h:00m",
                    "value": "0.00%"
                }
            ],
            "percentileRanksRaw": [
                {
                    "key": "02h:00m",
                    "value": "0.00%"
                }
            ]
        },
        "dailyStats": [
            {
                "timestamp": 1622588400000,
                "date": "Wed, 2nd Jun",
                "messages": {
                    "sent": 4,
                    "forward": 0,
                    "reply": 4,
                    "received": 4
                },
                "overallTTR": {
                    "raw": 1591.25,
                    "rawNoBusiness": 9238
                },
                "overallTTF": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "initialTTR": {
                    "raw": 2443,
                    "rawNoBusiness": 17736.5
                },
                "threads": {
                    "total": 2,
                    "haveRepliesFromAgents": 2,
                    "noReplyFromAgents": 0,
                    "completionRatio": 100
                }
            },
            {
                "timestamp": 1622674800000,
                "date": "Thu, 3rd Jun",
                "messages": {
                    "sent": 1,
                    "forward": 0,
                    "reply": 0,
                    "received": 0
                },
                "overallTTR": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "overallTTF": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "initialTTR": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "threads": {
                    "total": 1,
                    "haveRepliesFromAgents": 0,
                    "noReplyFromAgents": 0,
                    "completionRatio": 0
                }
            },
            {
                "timestamp": 1622761200000,
                "date": "Fri, 4th Jun",
                "messages": {
                    "sent": 1,
                    "forward": 0,
                    "reply": 0,
                    "received": 0
                },
                "overallTTR": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "overallTTF": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "initialTTR": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "threads": {
                    "total": 1,
                    "haveRepliesFromAgents": 0,
                    "noReplyFromAgents": 0,
                    "completionRatio": 0
                }
            },
            {
                "timestamp": 1622847600000,
                "date": "Sat, 5th Jun",
                "messages": {
                    "sent": 0,
                    "forward": 0,
                    "reply": 0,
                    "received": 0
                },
                "overallTTR": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "overallTTF": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "initialTTR": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "threads": {
                    "total": 0,
                    "haveRepliesFromAgents": 0,
                    "noReplyFromAgents": 0,
                    "completionRatio": 0
                }
            },
            {
                "timestamp": 1622934000000,
                "date": "Sun, 6th Jun",
                "messages": {
                    "sent": 0,
                    "forward": 0,
                    "reply": 0,
                    "received": 0
                },
                "overallTTR": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "overallTTF": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "initialTTR": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "threads": {
                    "total": 0,
                    "haveRepliesFromAgents": 0,
                    "noReplyFromAgents": 0,
                    "completionRatio": 0
                }
            },
            {
                "timestamp": 1623020400000,
                "date": "Mon, 7th Jun",
                "messages": {
                    "sent": 1,
                    "forward": 0,
                    "reply": 0,
                    "received": 0
                },
                "overallTTR": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "overallTTF": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "initialTTR": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "threads": {
                    "total": 1,
                    "haveRepliesFromAgents": 0,
                    "noReplyFromAgents": 0,
                    "completionRatio": 0
                }
            },
            {
                "timestamp": 1623106800000,
                "date": "Tue, 8th Jun",
                "messages": {
                    "sent": 0,
                    "forward": 0,
                    "reply": 0,
                    "received": 0
                },
                "overallTTR": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "overallTTF": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "initialTTR": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "threads": {
                    "total": 0,
                    "haveRepliesFromAgents": 0,
                    "noReplyFromAgents": 0,
                    "completionRatio": 0
                }
            },
            {
                "timestamp": 1623193200000,
                "date": "Wed, 9th Jun",
                "messages": {
                    "sent": 1,
                    "forward": 0,
                    "reply": 1,
                    "received": 1
                },
                "overallTTR": {
                    "raw": 1647,
                    "rawNoBusiness": 1647
                },
                "overallTTF": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "initialTTR": {
                    "raw": 1647,
                    "rawNoBusiness": 1647
                },
                "threads": {
                    "total": 1,
                    "haveRepliesFromAgents": 1,
                    "noReplyFromAgents": 0,
                    "completionRatio": 100
                }
            }
        ]
    },
    "previous_period": {
        "threads": {
            "total": 2,
            "internal": 0,
            "inbound": 2,
            "outbound": 0,
            "sentInternally": 0,
            "awaitCustomer": 2,
            "awaitAgent": 0,
            "closed": 0,
            "haveReplies": 2,
            "haveRepliesFromAgents": 2,
            "completionRatio": "100.00%"
        },
        "messages": {
            "count": 8,
            "initial": 2,
            "replies": 6,
            "replyAll": 0,
            "forward": 0,
            "received": {
                "count": 4,
                "initial": 2,
                "replies": 2,
                "replyAll": 0,
                "forward": 0,
                "initialReplies": 0,
                "dayOfWeek": {
                    "Friday": 0,
                    "Monday": 0,
                    "Saturday": 0,
                    "Sunday": 0,
                    "Thursday": 0,
                    "Tuesday": 0,
                    "Wednesday": 4
                },
                "hourOfDay": {
                    "00:00": 0.143,
                    "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.143,
                    "11:00": 0,
                    "12:00": 0.143,
                    "13:00": 0.143,
                    "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
                }
            },
            "sent": {
                "count": 4,
                "initial": 0,
                "replies": 4,
                "replyAll": 0,
                "forward": 0,
                "initialReplies": 2,
                "dayOfWeek": {
                    "Friday": 0,
                    "Monday": 0,
                    "Saturday": 0,
                    "Sunday": 0,
                    "Thursday": 0,
                    "Tuesday": 0,
                    "Wednesday": 4
                },
                "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.286,
                    "11:00": 0,
                    "12:00": 0.143,
                    "13:00": 0.143,
                    "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": "26m:31s",
            "raw": 1591.25,
            "friendlyNoBusiness": "02h:33m:58s",
            "rawNoBusiness": 9238,
            "percentileRanks": [
                {
                    "key": "02h:00m",
                    "value": "100.00%"
                }
            ],
            "percentileRanksRaw": [
                {
                    "key": "02h:00m",
                    "value": "59.25%"
                }
            ]
        },
        "initialTTR": {
            "friendly": "40m:43s",
            "raw": 2443,
            "friendlyNoBusiness": "04h:55m:36s",
            "rawNoBusiness": 17736.5,
            "percentileRanks": [
                {
                    "key": "02h:00m",
                    "value": "100.00%"
                }
            ],
            "percentileRanksRaw": [
                {
                    "key": "02h:00m",
                    "value": "35.11%"
                }
            ]
        },
        "overallTTF": {
            "friendly": "N\/A",
            "raw": null,
            "friendlyNoBusiness": "N\/A",
            "rawNoBusiness": null,
            "percentileRanks": [
                {
                    "key": "02h:00m",
                    "value": "0.00%"
                }
            ],
            "percentileRanksRaw": [
                {
                    "key": "02h:00m",
                    "value": "0.00%"
                }
            ]
        },
        "overallTTC": {
            "friendly": "N\/A",
            "raw": null,
            "friendlyNoBusiness": "N\/A",
            "rawNoBusiness": null,
            "percentileRanks": [
                {
                    "key": "02h:00m",
                    "value": "0.00%"
                }
            ],
            "percentileRanksRaw": [
                {
                    "key": "02h:00m",
                    "value": "0.00%"
                }
            ]
        },
        "dailyStats": [
            {
                "timestamp": 1622588400000,
                "date": "Wed, 2nd Jun",
                "messages": {
                    "sent": 4,
                    "forward": 0,
                    "reply": 4,
                    "received": 4
                },
                "overallTTR": {
                    "raw": 1591.25,
                    "rawNoBusiness": 9238
                },
                "overallTTF": {
                    "raw": null,
                    "rawNoBusiness": null
                },
                "initialTTR": {
                    "raw": 2443,
                    "rawNoBusiness": 17736.5
                },
                "threads": {
                    "total": 2,
                    "haveRepliesFromAgents": 2,
                    "noReplyFromAgents": 0,
                    "completionRatio": 100
                }
            }
        ]
    },
    "all_agent_stats": [
        {
            "name": "n.ullrich@timetoreply.com",
            "threads": {
                "total": 4,
                "internal": 0,
                "inbound": 2,
                "outbound": 2,
                "sentInternally": 0,
                "awaitCustomer": 3,
                "awaitAgent": 1,
                "closed": 0,
                "haveReplies": 4,
                "haveInitialReplies": 2
            },
            "messages": {
                "received": {
                    "count": 2,
                    "initial": 0,
                    "replies": 2,
                    "replyAll": 0,
                    "forward": 0,
                    "initialReplies": 0,
                    "dailyStats": {
                        "2021-06-02 00:00:00": 2
                    }
                },
                "sent": {
                    "count": 6,
                    "initial": 2,
                    "replies": 4,
                    "replyAll": 0,
                    "forward": 0,
                    "initialReplies": 0,
                    "dailyStats": {
                        "2021-06-02 00:00:00": 4,
                        "2021-06-03 00:00:00": 1,
                        "2021-06-04 00:00:00": 0,
                        "2021-06-05 00:00:00": 0,
                        "2021-06-06 00:00:00": 0,
                        "2021-06-07 00:00:00": 1
                    }
                }
            },
            "initialTTR": {
                "friendly": "40m:43s",
                "raw": 2443,
                "friendlyNoBusiness": "04h:55m:36s",
                "rawNoBusiness": 17736.5,
                "percentileRanks": [
                    {
                        "key": "02h:00m",
                        "value": "100.00%"
                    }
                ],
                "percentileRanksRaw": [
                    {
                        "key": "02h:00m",
                        "value": "35.11%"
                    }
                ]
            },
            "overallTTF": {
                "friendly": "N\/A",
                "raw": null,
                "friendlyNoBusiness": "N\/A",
                "rawNoBusiness": null,
                "percentileRanks": [
                    {
                        "key": "02h:00m",
                        "value": "0.00%"
                    }
                ],
                "percentileRanksRaw": [
                    {
                        "key": "02h:00m",
                        "value": "0.00%"
                    }
                ]
            },
            "overallTTR": {
                "friendly": "26m:31s",
                "raw": 1591.25,
                "friendlyNoBusiness": "02h:33m:58s",
                "rawNoBusiness": 9238,
                "percentileRanks": [
                    {
                        "key": "02h:00m",
                        "value": "100.00%"
                    }
                ],
                "percentileRanksRaw": [
                    {
                        "key": "02h:00m",
                        "value": "59.25%"
                    }
                ]
            },
            "overallTTC": {
                "friendly": "N\/A",
                "raw": null,
                "friendlyNoBusiness": "N\/A",
                "rawNoBusiness": null
            }
        },
        {
            "name": "l.turner@timetoreply.com",
            "threads": {
                "total": 2,
                "internal": 0,
                "inbound": 1,
                "outbound": 1,
                "sentInternally": 0,
                "awaitCustomer": 1,
                "awaitAgent": 0,
                "closed": 1,
                "haveReplies": 1,
                "haveInitialReplies": 1
            },
            "messages": {
                "received": {
                    "count": 1,
                    "initial": 1,
                    "replies": 0,
                    "replyAll": 0,
                    "forward": 0,
                    "initialReplies": 0,
                    "dailyStats": {
                        "2021-06-09 00:00:00": 1
                    }
                },
                "sent": {
                    "count": 2,
                    "initial": 1,
                    "replies": 0,
                    "replyAll": 1,
                    "forward": 0,
                    "initialReplies": 0,
                    "dailyStats": {
                        "2021-06-04 00:00:00": 1,
                        "2021-06-05 00:00:00": 0,
                        "2021-06-06 00:00:00": 0,
                        "2021-06-07 00:00:00": 0,
                        "2021-06-08 00:00:00": 0,
                        "2021-06-09 00:00:00": 1
                    }
                }
            },
            "initialTTR": {
                "friendly": "27m:27s",
                "raw": 1647,
                "friendlyNoBusiness": "27m:27s",
                "rawNoBusiness": 1647,
                "percentileRanks": [
                    {
                        "key": "02h:00m",
                        "value": "100.00%"
                    }
                ],
                "percentileRanksRaw": [
                    {
                        "key": "02h:00m",
                        "value": "100.00%"
                    }
                ]
            },
            "overallTTF": {
                "friendly": "N\/A",
                "raw": null,
                "friendlyNoBusiness": "N\/A",
                "rawNoBusiness": null,
                "percentileRanks": [
                    {
                        "key": "02h:00m",
                        "value": "0.00%"
                    }
                ],
                "percentileRanksRaw": [
                    {
                        "key": "02h:00m",
                        "value": "0.00%"
                    }
                ]
            },
            "overallTTR": {
                "friendly": "27m:27s",
                "raw": 1647,
                "friendlyNoBusiness": "27m:27s",
                "rawNoBusiness": 1647,
                "percentileRanks": [
                    {
                        "key": "02h:00m",
                        "value": "100.00%"
                    }
                ],
                "percentileRanksRaw": [
                    {
                        "key": "02h:00m",
                        "value": "100.00%"
                    }
                ]
            },
            "overallTTC": {
                "friendly": "N\/A",
                "raw": null,
                "friendlyNoBusiness": "N\/A",
                "rawNoBusiness": null
            }
        }
    ],
    "all_domain_stats": [],
    "all_customer_stats": [
        {
            "name": "jesus59@ferry.com",
            "threads": {
                "total": 2,
                "internal": 0,
                "inbound": 1,
                "outbound": 1,
                "sentInternally": 0,
                "awaitCustomer": 1,
                "awaitAgent": 0,
                "closed": 1,
                "haveReplies": 1,
                "haveInitialReplies": 1
            },
            "messages": {
                "received": {
                    "count": 1,
                    "initial": 1,
                    "replies": 0,
                    "replyAll": 0,
                    "forward": 0,
                    "initialReplies": 0,
                    "dailyStats": {
                        "2021-06-09 00:00:00": 1
                    }
                },
                "sent": {
                    "count": 2,
                    "initial": 1,
                    "replies": 0,
                    "replyAll": 1,
                    "forward": 0,
                    "initialReplies": 0,
                    "dailyStats": []
                }
            },
            "initialTTR": {
                "friendly": "27m:27s",
                "raw": 1647,
                "friendlyNoBusiness": "27m:27s",
                "rawNoBusiness": 1647,
                "percentileRanks": [
                    {
                        "key": "02h:00m",
                        "value": "100.00%"
                    }
                ],
                "percentileRanksRaw": [
                    {
                        "key": "02h:00m",
                        "value": "100.00%"
                    }
                ]
            },
            "overallTTF": {
                "friendly": "N\/A",
                "raw": null,
                "friendlyNoBusiness": "N\/A",
                "rawNoBusiness": null,
                "percentileRanks": [
                    {
                        "key": "02h:00m",
                        "value": "0.00%"
                    }
                ],
                "percentileRanksRaw": [
                    {
                        "key": "02h:00m",
                        "value": "0.00%"
                    }
                ]
            },
            "overallTTR": {
                "friendly": "27m:27s",
                "raw": 1647,
                "friendlyNoBusiness": "27m:27s",
                "rawNoBusiness": 1647,
                "percentileRanks": [
                    {
                        "key": "02h:00m",
                        "value": "100.00%"
                    }
                ],
                "percentileRanksRaw": [
                    {
                        "key": "02h:00m",
                        "value": "100.00%"
                    }
                ]
            },
            "overallTTC": {
                "friendly": "N\/A",
                "raw": null,
                "friendlyNoBusiness": "N\/A",
                "rawNoBusiness": null
            }
        },
        {
            "name": "schumm.com",
            "threads": {
                "total": 2,
                "internal": 0,
                "inbound": 1,
                "outbound": 1,
                "sentInternally": 0,
                "awaitCustomer": 1,
                "awaitAgent": 1,
                "closed": 0,
                "haveReplies": 2,
                "haveInitialReplies": 1
            },
            "messages": {
                "received": {
                    "count": 2,
                    "initial": 1,
                    "replies": 1,
                    "replyAll": 0,
                    "forward": 0,
                    "initialReplies": 0,
                    "dailyStats": {
                        "2021-06-02 00:00:00": 2
                    }
                },
                "sent": {
                    "count": 3,
                    "initial": 1,
                    "replies": 2,
                    "replyAll": 0,
                    "forward": 0,
                    "initialReplies": 0,
                    "dailyStats": []
                }
            },
            "initialTTR": {
                "friendly": "40s",
                "raw": 40,
                "friendlyNoBusiness": "40s",
                "rawNoBusiness": 40,
                "percentileRanks": [
                    {
                        "key": "02h:00m",
                        "value": "100.00%"
                    }
                ],
                "percentileRanksRaw": [
                    {
                        "key": "02h:00m",
                        "value": "100.00%"
                    }
                ]
            },
            "overallTTF": {
                "friendly": "N\/A",
                "raw": null,
                "friendlyNoBusiness": "N\/A",
                "rawNoBusiness": null,
                "percentileRanks": [
                    {
                        "key": "02h:00m",
                        "value": "0.00%"
                    }
                ],
                "percentileRanksRaw": [
                    {
                        "key": "02h:00m",
                        "value": "0.00%"
                    }
                ]
            },
            "overallTTR": {
                "friendly": "08m:19s",
                "raw": 499.5,
                "friendlyNoBusiness": "08m:19s",
                "rawNoBusiness": 499.5,
                "percentileRanks": [
                    {
                        "key": "02h:00m",
                        "value": "100.00%"
                    }
                ],
                "percentileRanksRaw": [
                    {
                        "key": "02h:00m",
                        "value": "100.00%"
                    }
                ]
            },
            "overallTTC": {
                "friendly": "N\/A",
                "raw": null,
                "friendlyNoBusiness": "N\/A",
                "rawNoBusiness": null
            }
        }
    ],
    "total": 3,
    "page": 1,
    "args": {
        "model": {
            "icon": "building",
            "id": null,
            "model_type": "Internal",
            "name": "My Company"
        },
        "modelCom": {
            "id": 1,
            "name": "Top Revenue Customers",
            "email_usernames": [
                "jesus59@ferry.com",
                "rlynch@gleason.com"
            ],
            "customer_domains": [
                "schumm.com",
                "armstrong.biz"
            ],
            "model_type": "Customer Group",
            "icon": "user-friends"
        }
    }
}
 
        

Request   

GET api/reports/sla

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".

to  string optional  

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

model  string optional  

Name, email address or domain you want statistics for. Use the models endpoint to get a list.

model_type  string optional  

Model Type of the model being queried. Use "Customer" for email address and domain.

exclude_cc  boolean optional  

Should we exclude CC messages from the statistics.

model_com  string optional  

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

model_type_com  string optional  

Model Type of the model you are communicating with. Use "Customer" for email address and domain.

exclude_cc_com  boolean optional  

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

exclusive  boolean optional  

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

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.

thread_status  string optional  

A comma separated list (no spaces) of any combination of the following: 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.

classification  string optional  

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

messageType  string optional  

A comma separated list (no spaces) of any combination of the following: 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.

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.

no_reply_for  integer optional  

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

per_page  integer optional  

For paginated results, how many results per page. Max 200.

sort_by  string optional  

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

direction  string optional  

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

page  integer optional  

For paginated results, which page to get.

init_ttr_goal  string optional  

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

overall_ttr_goal  string optional  

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

overall_ttc_goal  string optional  

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

Trend - Report

requires authentication

Trend Report Data

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

let params = {
    "model": "My Company",
    "model_type": "Internal",
    "exclude_cc": "",
    "model_com": "Top Revenue Customers",
    "model_type_com": "Customer Group",
    "exclude_cc_com": "",
    "exclusive": "",
    "label": "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]));

let 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();
$response = $client->get(
    'https://portal.timetoreply.com/api/reports/trend',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
        ],
        'query' => [
            'model'=> 'My Company',
            'model_type'=> 'Internal',
            'exclude_cc'=> '',
            'model_com'=> 'Top Revenue Customers',
            'model_type_com'=> 'Customer Group',
            'exclude_cc_com'=> '',
            'exclusive'=> '',
            'label'=> '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));

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": [],
            "colour": "#000000"
        },
        "messages.sent.count": {
            "title": "Emails Sent",
            "type": "number",
            "data": [
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0
            ],
            "agentData": [],
            "colour": "#cccccc"
        },
        "messages.sent.initial": {
            "title": "New Emails Sent",
            "type": "number",
            "data": [
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0
            ],
            "agentData": [],
            "colour": "#32CC5D"
        },
        "messages.sent.allReplies": {
            "title": "Replies Sent",
            "type": "number",
            "data": [
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0
            ],
            "agentData": [],
            "colour": "#2979AA"
        },
        "messages.sent.forward": {
            "title": "Forwards Sent",
            "type": "number",
            "data": [
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0
            ],
            "agentData": [],
            "colour": "#cc3232"
        },
        "initialTTR.raw": {
            "title": "Avg. First Reply Time",
            "type": "replyTime",
            "data": [
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null
            ],
            "agentData": [],
            "colour": "#000000"
        },
        "overallTTR.raw": {
            "title": "Avg. Overall Reply Time",
            "type": "replyTime",
            "data": [
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null
            ],
            "agentData": [],
            "colour": "#cccccc"
        },
        "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": "#32CC5D"
        },
        "threads.total": {
            "title": "Conversations",
            "type": "number",
            "data": [
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0
            ],
            "agentData": [],
            "colour": "#2979AA"
        },
        "threads.ttr_ratio": {
            "title": "timetoreply Ratio",
            "type": "number",
            "data": [
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0
            ],
            "agentData": [],
            "colour": "#cc3232"
        },
        "threads.success_rate": {
            "title": "Contact Success Rate",
            "type": "percentage",
            "data": [
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0
            ],
            "agentData": [],
            "colour": "#000000"
        },
        "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": "#cccccc"
        }
    },
    "dates": [
        "Feb 2019",
        "Mar 2019",
        "Apr 2019",
        "May 2019",
        "Jun 2019",
        "Jul 2019",
        "Aug 2019",
        "Sep 2019",
        "Oct 2019",
        "Nov 2019",
        "Dec 2019",
        "Jan to date"
    ],
    "total": 0,
    "page": 1
}
 
        

Request   

GET api/reports/trend

Query Parameters

model  string optional  

Name, email address or domain you want statistics for. Use the models endpoint to get a list.

model_type  string optional  

Model Type of the model being queried. Use "Customer" for email address and domain.

exclude_cc  boolean optional  

Should we exclude CC messages from the statistics.

model_com  string optional  

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

model_type_com  string optional  

Model Type of the model you are communicating with. Use "Customer" for email address and domain.

exclude_cc_com  boolean optional  

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

exclusive  boolean optional  

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

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.

thread_status  string optional  

A comma separated list (no spaces) of any combination of the following: 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.

classification  string optional  

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

messageType  string optional  

A comma separated list (no spaces) of any combination of the following: 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.

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.

no_reply_for  integer optional  

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

date  string optional  

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

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".

period_type  string optional  

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

Tools

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"
);

let 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();
$response = $client->delete(
    'https://portal.timetoreply.com/api/tools/settings/message-filters/advanced/1',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

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

Request   

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

URL Parameters

message_filter_group  integer  

The ID of the Advanced Filter to delete.

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"
);

let params = {
    "per_page": "15",
    "page": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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

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": "&laquo; Previous",
            "active": false
        },
        {
            "url": "https:\/\/portal.timetoreply.com\/api\/tools\/settings\/message-filters\/advanced?page=1",
            "label": "1",
            "active": true
        },
        {
            "url": null,
            "label": "Next &raquo;",
            "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

Query Parameters

per_page  number optional  

The number of mailboxes to show per page.

page  number optional  

The page number.

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"
);

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

let body = {
    "filterName": "From Does Not Contain no-reply",
    "filters": [
        {
            "field": "From",
            "operator": "does not contain",
            "type": "and",
            "value": "no-reply"
        },
        {
            "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();
$response = $client->post(
    'https://portal.timetoreply.com/api/tools/settings/message-filters/advanced',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
        ],
        'json' => [
            'filterName' => 'From Does Not Contain no-reply',
            'filters' => [
                [
                    'field' => 'From',
                    'operator' => 'does not contain',
                    'type' => 'and',
                    'value' => 'no-reply',
                ],
                [
                    'field' => 'From',
                    'operator' => 'does not contain',
                    'type' => 'and',
                    'value' => 'no-reply',
                ],
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

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",
    "active": true
}
 
        

Request   

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

Body Parameters

filterName  string  

The name of the Advanced Filter.

filters  object[] optional  

An array of Filters objects.


filters[].field  string  

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

filters[].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.

filters[].type  string  

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

filters[].value  string  

The value of the filter.

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"
);

let 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();
$response = $client->patch(
    'https://portal.timetoreply.com/api/tools/settings/message-filters/advanced/1/toggle',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

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}/toggle

URL Parameters

message_filter_group  integer  

The ID of the Advanced Filter to toggle.

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"
);

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

let body = {
    "filterName": "From Does Not Contain no-reply",
    "filters": [
        {
            "field": "From",
            "operator": "does not contain",
            "type": "and",
            "value": "no-reply"
        },
        {
            "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();
$response = $client->patch(
    'https://portal.timetoreply.com/api/tools/settings/message-filters/advanced/1',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
        ],
        'json' => [
            'filterName' => 'From Does Not Contain no-reply',
            'filters' => [
                [
                    'field' => 'From',
                    'operator' => 'does not contain',
                    'type' => 'and',
                    'value' => 'no-reply',
                ],
                [
                    'field' => 'From',
                    'operator' => 'does not contain',
                    'type' => 'and',
                    'value' => 'no-reply',
                ],
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

Show headers
            cache-control: no-cache, private
content-type: application/json
tracking-events: []
 
            
                
{
    "id": 1,
    "company_id": 1,
    "name": "From Does Not Contain no-reply",
    "active": false,
    "message_filters": [
        {
            "id": 4,
            "message_filter_group_id": 1,
            "field": "From",
            "operator": "does not contain",
            "type": "and",
            "value": "no-reply"
        },
        {
            "id": 5,
            "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}

URL Parameters

message_filter_group  integer  

The ID of the Advanced Filter to update.

Body Parameters

filterName  string  

The name of the Advanced Filter.

filters  object[] optional  

An array of Filters objects.


filters[].field  string  

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

filters[].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.

filters[].type  string  

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

filters[].value  string  

The value of the filter.

Alerts - Delete

requires authentication

Delete an alert

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

let 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();
$response = $client->delete(
    'https://portal.timetoreply.com/api/tools/alerts/1',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

                
{
    "status": "Alert deleted successfully"
}
 
        

Request   

DELETE api/tools/alerts/{alert}

URL Parameters

alert  integer  

The ID of the alert you would like to delete.

Alerts - Show

requires authentication

Show a single Alert

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

let 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();
$response = $client->get(
    'https://portal.timetoreply.com/api/tools/alerts/1',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

Show headers
            cache-control: no-cache, private
content-type: application/json
tracking-events: []
 
            
                
{
    "id": 1,
    "name": "Top Customers Alert",
    "hours": 1,
    "type": "external",
    "notify_types": [
        "custom_emails",
        "all_agents"
    ],
    "custom_emails": [
        "custom_alert_email@timetoreply.com"
    ],
    "enabled": true,
    "create_crm_tasks": false,
    "selected_entities": [
        {
            "id": 1,
            "name": "CATEGORY_FORUMS",
            "model_type": "Label",
            "icon": "tag"
        },
        {
            "id": 2,
            "name": "STARRED",
            "model_type": "Label",
            "icon": "tag"
        },
        {
            "id": 1,
            "name": "top@customer.com",
            "email_usernames": [
                "top@customer.com"
            ],
            "model_type": "Customer",
            "icon": "user"
        },
        {
            "id": 1,
            "name": "Top Revenue Customers",
            "email_usernames": [
                "jesus59@ferry.com",
                "rlynch@gleason.com"
            ],
            "customer_domains": [
                "schumm.com",
                "armstrong.biz"
            ],
            "model_type": "Customer Group",
            "icon": "user-friends"
        }
    ],
    "selected_model": null,
    "in_conversation": false,
    "exclude_emails": [],
    "exclude_domains": []
}
 
        

Request   

GET api/tools/alerts/{alert}

URL Parameters

alert  integer  

The ID of the alert.

Alerts - Store

requires authentication

Save an Alert

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

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

let body = {
    "name": "Important Customers Alert",
    "hours": 1,
    "notify_types": [
        "all_agents",
        "custom_emails"
    ],
    "custom_emails": [
        "custom@timetoreply.com"
    ],
    "enabled": true,
    "create_crm_tasks": false,
    "type": "external",
    "selected_model": {
        "type": "Team",
        "id": 1
    },
    "selected_entities": [
        {
            "type": "Label",
            "id": 1
        },
        {
            "type": "Label",
            "id": 1
        }
    ],
    "send_to_customers": false,
    "in_conversation": false,
    "exclude_emails": [
        "notifications@example.com"
    ],
    "exclude_domains": [
        "example.com"
    ],
    "internal": false
}

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://portal.timetoreply.com/api/tools/alerts',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'Important Customers Alert',
            'hours' => 1,
            'notify_types' => [
                'all_agents',
                'custom_emails',
            ],
            'custom_emails' => [
                'custom@timetoreply.com',
            ],
            'enabled' => true,
            'create_crm_tasks' => false,
            'type' => 'external',
            'selected_model' => [
                'type' => 'Team',
                'id' => 1,
            ],
            'selected_entities' => [
                [
                    'type' => 'Label',
                    'id' => 1,
                ],
                [
                    'type' => 'Label',
                    'id' => 1,
                ],
            ],
            'send_to_customers' => false,
            'in_conversation' => false,
            'exclude_emails' => [
                'notifications@example.com',
            ],
            'exclude_domains' => [
                'example.com',
            ],
            'internal' => false,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

Show headers
            cache-control: no-cache, private
content-type: application/json
tracking-events: []
 
            
                
{
    "id": 3,
    "name": "Important Customers Alert",
    "hours": 1,
    "type": "external",
    "notify_types": [
        "all_agents",
        "custom_emails"
    ],
    "custom_emails": [
        "custom@timetoreply.com"
    ],
    "enabled": true,
    "create_crm_tasks": false,
    "selected_entities": [
        {
            "id": 1,
            "name": "CATEGORY_FORUMS",
            "model_type": "Label",
            "icon": "tag"
        }
    ],
    "selected_model": {
        "id": 1,
        "name": "US Sales Team",
        "email_usernames": [
            "h.herman@timetoreply.com",
            "l.turner@timetoreply.com",
            "n.ullrich@timetoreply.com"
        ],
        "model_type": "Team",
        "icon": "handshake"
    },
    "in_conversation": false,
    "exclude_emails": [],
    "exclude_domains": []
}
 
        

Request   

POST api/tools/alerts

Body Parameters

name  string  

The name of the alert.

hours  integer  

The number of hours since the last email before we should send a report.

notify_types  string[]  

An array of the notify types.

custom_emails  string[] optional  

An array of custom email addresses to send notification to. Only applies when "custom_emails" is selected.

enabled  boolean  

Whether the alert should be enabled or not.

create_crm_tasks  boolean optional  

type  string  

The type of Alert. Must be one of external,internal,anybody.

selected_model  object  

selected_model.type  string  

The type of entity within your company that the alert should fire for.

selected_model.id  integer optional  

The ID of the entity within your company that you want the alert to fire for. Leave as null when selecting "Internal" above.

selected_entities  object[] optional  

An array of objects describing which entities should trigger the alert.


selected_entities[].type  string  

The type of entity.

selected_entities[].id  integer  

The id of the entity.

send_to_customers  boolean optional  

in_conversation  boolean optional  

exclude_emails  string[] optional  

If you want to exclude emails sent from specific email addresses.

exclude_domains  string[] optional  

If you want to exclude emails sent from specific domains.

internal  boolean  

Is this an internal alert or a customer alert.

Alerts - Update

requires authentication

Update a Report

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

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

let body = {
    "name": "Important Customers Alert",
    "hours": 1,
    "notify_types": [
        "all_agents",
        "custom_emails"
    ],
    "custom_emails": [
        "custom@timetoreply.com"
    ],
    "enabled": true,
    "create_crm_tasks": false,
    "type": "external",
    "selected_model": {
        "type": "Team",
        "id": 1
    },
    "selected_entities": [
        {
            "type": "Label",
            "id": 1
        },
        {
            "type": "Label",
            "id": 1
        }
    ],
    "send_to_customers": false,
    "in_conversation": false,
    "exclude_emails": [
        "notifications@example.com"
    ],
    "exclude_domains": [
        "example.com"
    ],
    "internal": false
}

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->put(
    'https://portal.timetoreply.com/api/tools/alerts/1',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'Important Customers Alert',
            'hours' => 1,
            'notify_types' => [
                'all_agents',
                'custom_emails',
            ],
            'custom_emails' => [
                'custom@timetoreply.com',
            ],
            'enabled' => true,
            'create_crm_tasks' => false,
            'type' => 'external',
            'selected_model' => [
                'type' => 'Team',
                'id' => 1,
            ],
            'selected_entities' => [
                [
                    'type' => 'Label',
                    'id' => 1,
                ],
                [
                    'type' => 'Label',
                    'id' => 1,
                ],
            ],
            'send_to_customers' => false,
            'in_conversation' => false,
            'exclude_emails' => [
                'notifications@example.com',
            ],
            'exclude_domains' => [
                'example.com',
            ],
            'internal' => false,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

Show headers
            cache-control: no-cache, private
content-type: application/json
tracking-events: []
 
            
                
{
    "id": 1,
    "name": "Important Customers Alert",
    "hours": 1,
    "type": "external",
    "notify_types": [
        "all_agents",
        "custom_emails"
    ],
    "custom_emails": [
        "custom@timetoreply.com"
    ],
    "enabled": true,
    "create_crm_tasks": false,
    "selected_entities": [
        {
            "id": 1,
            "name": "CATEGORY_FORUMS",
            "model_type": "Label",
            "icon": "tag"
        }
    ],
    "selected_model": {
        "id": 1,
        "name": "US Sales Team",
        "email_usernames": [
            "h.herman@timetoreply.com",
            "l.turner@timetoreply.com",
            "n.ullrich@timetoreply.com"
        ],
        "model_type": "Team",
        "icon": "handshake"
    },
    "in_conversation": false,
    "exclude_emails": [],
    "exclude_domains": []
}
 
        

Request   

PUT api/tools/alerts/{alert}

PATCH api/tools/alerts/{alert}

URL Parameters

report  integer  

The ID of the report you would like to update.

Body Parameters

name  string  

The name of the alert.

hours  integer  

The number of hours since the last email before we should send a report.

notify_types  string[]  

An array of the notify types.

custom_emails  string[] optional  

An array of custom email addresses to send notification to. Only applies when "custom_emails" is selected.

enabled  boolean  

Whether the alert should be enabled or not.

create_crm_tasks  boolean optional  

type  string  

The type of Alert. Must be one of external,internal,anybody.

selected_model  object  

selected_model.type  string  

The type of entity within your company that the alert should fire for.

selected_model.id  integer optional  

The ID of the entity within your company that you want the alert to fire for. Leave as null when selecting "Internal" above.

selected_entities  object[] optional  

An array of objects describing which entities should trigger the alert.


selected_entities[].type  string  

The type of entity.

selected_entities[].id  integer  

The id of the entity.

send_to_customers  boolean optional  

in_conversation  boolean optional  

exclude_emails  string[] optional  

If you want to exclude emails sent from specific email addresses.

exclude_domains  string[] optional  

If you want to exclude emails sent from specific domains.

internal  boolean  

Is this an internal alert or a customer alert.

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"
);

let 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();
$response = $client->delete(
    'https://portal.timetoreply.com/api/tools/company/business-hours/1',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
        ],
        'json' => [
            'forModel' => 'company',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

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/{business_hour}

URL Parameters

business_hour  integer  

The ID of the set of business hours to delete.

Body Parameters

forModel  string  

Must be one of company or agent.

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"
);

let params = {
    "forModel": "company",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

let 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();
$response = $client->get(
    'https://portal.timetoreply.com/api/tools/company/business-hours',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
        ],
        'query' => [
            'forModel'=> 'company',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

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

Query Parameters

forModel  string optional  

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

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"
);

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

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

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

Example response (500):

Show headers
            cache-control: no-cache, private
content-type: application/json
tracking-events: []
 
            
                
{
    "message": "Attempted to lazy load [company] on model [App\\Models\\Thread] but lazy loading is disabled.",
    "exception": "Illuminate\\Database\\LazyLoadingViolationException",
    "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Database\/Eloquent\/Concerns\/HasAttributes.php",
    "line": 475,
    "trace": [
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Database\/Eloquent\/Concerns\/HasAttributes.php",
            "line": 442,
            "function": "handleLazyLoadingViolation",
            "class": "Illuminate\\Database\\Eloquent\\Model",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Database\/Eloquent\/Concerns\/HasAttributes.php",
            "line": 397,
            "function": "getRelationValue",
            "class": "Illuminate\\Database\\Eloquent\\Model",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Database\/Eloquent\/Model.php",
            "line": 1899,
            "function": "getAttribute",
            "class": "Illuminate\\Database\\Eloquent\\Model",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/app\/Services\/ThreadService.php",
            "line": 1571,
            "function": "__get",
            "class": "Illuminate\\Database\\Eloquent\\Model",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/app\/Services\/ThreadService.php",
            "line": 1550,
            "function": "determineThreadType",
            "class": "App\\Services\\ThreadService",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/app\/Jobs\/RecalculateChunkForCompany.php",
            "line": 280,
            "function": "updateThreadAttributes",
            "class": "App\\Services\\ThreadService",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Container\/BoundMethod.php",
            "line": 36,
            "function": "handle",
            "class": "App\\Jobs\\RecalculateChunkForCompany",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Container\/Util.php",
            "line": 40,
            "function": "Illuminate\\Container\\{closure}",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Container\/BoundMethod.php",
            "line": 93,
            "function": "unwrapIfClosure",
            "class": "Illuminate\\Container\\Util",
            "type": "::"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Container\/BoundMethod.php",
            "line": 37,
            "function": "callBoundMethod",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Container\/Container.php",
            "line": 614,
            "function": "call",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Bus\/Dispatcher.php",
            "line": 128,
            "function": "call",
            "class": "Illuminate\\Container\\Container",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php",
            "line": 128,
            "function": "Illuminate\\Bus\\{closure}",
            "class": "Illuminate\\Bus\\Dispatcher",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php",
            "line": 103,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Bus\/Dispatcher.php",
            "line": 132,
            "function": "then",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Queue\/CallQueuedHandler.php",
            "line": 120,
            "function": "dispatchNow",
            "class": "Illuminate\\Bus\\Dispatcher",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php",
            "line": 128,
            "function": "Illuminate\\Queue\\{closure}",
            "class": "Illuminate\\Queue\\CallQueuedHandler",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php",
            "line": 103,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Queue\/CallQueuedHandler.php",
            "line": 122,
            "function": "then",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Queue\/CallQueuedHandler.php",
            "line": 70,
            "function": "dispatchThroughMiddleware",
            "class": "Illuminate\\Queue\\CallQueuedHandler",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Queue\/Jobs\/Job.php",
            "line": 98,
            "function": "call",
            "class": "Illuminate\\Queue\\CallQueuedHandler",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Queue\/SyncQueue.php",
            "line": 43,
            "function": "fire",
            "class": "Illuminate\\Queue\\Jobs\\Job",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Queue\/Queue.php",
            "line": 57,
            "function": "push",
            "class": "Illuminate\\Queue\\SyncQueue",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Bus\/Dispatcher.php",
            "line": 246,
            "function": "pushOn",
            "class": "Illuminate\\Queue\\Queue",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Bus\/Dispatcher.php",
            "line": 229,
            "function": "pushCommandToQueue",
            "class": "Illuminate\\Bus\\Dispatcher",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Bus\/Dispatcher.php",
            "line": 77,
            "function": "dispatchToQueue",
            "class": "Illuminate\\Bus\\Dispatcher",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Bus\/PendingDispatch.php",
            "line": 202,
            "function": "dispatch",
            "class": "Illuminate\\Bus\\Dispatcher",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/app\/Console\/Commands\/Company\/RecalculateAllForCompany.php",
            "line": 67,
            "function": "__destruct",
            "class": "Illuminate\\Foundation\\Bus\\PendingDispatch",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Database\/Concerns\/BuildsQueries.php",
            "line": 137,
            "function": "App\\Console\\Commands\\Company\\{closure}",
            "class": "App\\Console\\Commands\\Company\\RecalculateAllForCompany",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/app\/Console\/Commands\/Company\/RecalculateAllForCompany.php",
            "line": 69,
            "function": "chunkById",
            "class": "Illuminate\\Database\\Eloquent\\Builder",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Container\/BoundMethod.php",
            "line": 36,
            "function": "handle",
            "class": "App\\Console\\Commands\\Company\\RecalculateAllForCompany",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Container\/Util.php",
            "line": 40,
            "function": "Illuminate\\Container\\{closure}",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Container\/BoundMethod.php",
            "line": 93,
            "function": "unwrapIfClosure",
            "class": "Illuminate\\Container\\Util",
            "type": "::"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Container\/BoundMethod.php",
            "line": 37,
            "function": "callBoundMethod",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Container\/Container.php",
            "line": 614,
            "function": "call",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Console\/Command.php",
            "line": 136,
            "function": "call",
            "class": "Illuminate\\Container\\Container",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/symfony\/console\/Command\/Command.php",
            "line": 288,
            "function": "execute",
            "class": "Illuminate\\Console\\Command",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/laravel\/framework\/src\/Illuminate\/Console\/Command.php",
            "line": 121,
            "function": "run",
            "class": "Symfony\\Component\\Console\\Command\\Command",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/symfony\/console\/Application.php",
            "line": 974,
            "function": "run",
            "class": "Illuminate\\Console\\Command",
            "type": "->"
        },
        {
            "file": "\/home\/vagrant\/Laravel\/portal.timetoreply.com\/vendor\/symfony\/console\/Application.php",
            &qu