MENU navbar-image

Introduction

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

Authentication

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

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

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

Rate Limiting

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

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

Dates and Times

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

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

Nomenclature

General

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

Authenticating requests

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

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

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

Reports

Overview

Overview - Report

requires authentication

Overview Report Data

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

const params = {
    "from": "2020-01-01",
    "to": "2020-01-08",
    "model": "My Company",
    "model_type": "Internal",
    "exclude_cc": "0",
    "model_com": "1",
    "model_type_com": "Contact Group",
    "exclude_cc_com": "0",
    "exclusive": "0",
    "label[0]": "INBOX",
    "labels_and_or": "AND",
    "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",
    "waiting_for_response": "customer-has-response,waiting-for-response",
    "replies_over": "15",
    "message_replies_over": "15",
    "message_replies_under": "15",
    "no_reply_for": "15",
    "sort_by": "threads.total",
    "direction": "desc",
    "per_page_agents": "2",
    "page_agents": "1",
    "per_page_contacts": "2",
    "page_contacts": "1",
    "per_page_domains": "2",
    "page_domains": "1",
    "closed_over": "15",
    "viewId": "1",
    "showHourOfDayForAgents": "0",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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

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

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
tracking-events: []
server-timing: bootstrap;desc="Bootstrap";dur=1650.5749225616, app;desc="App";dur=88, total;desc="Total";dur=1652.5700092316,
x-ttr-server: homestead-rob
 

{
    "message": "Unauthenticated."
}
 

Request   

GET api/reports/overview

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

from   string  optional    

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

to   string  optional    

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

model   string  optional    

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

model_type   string  optional    

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

exclude_cc   boolean  optional    

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

model_com   string  optional    

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

model_type_com   string  optional    

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

exclude_cc_com   boolean  optional    

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

exclusive   boolean  optional    

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

search   string  optional    

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

label   string[]  optional    

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

labels_and_or   string  optional    

Should we filter by all labels or any labels. Must be either "AND" or "OR". Example: AND

thread_type   string  optional    

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

thread_status   string  optional    

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

has_replies   string  optional    

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

classification   string  optional    

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

messageType   string  optional    

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

waiting_for_response   string  optional    

A comma separated list (no spaces) of any combination of the following: customer-has-response,waiting-for-response. Example: customer-has-response,waiting-for-response

replies_over   integer  optional    

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

message_replies_over   integer  optional    

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

message_replies_under   integer  optional    

Limit results to messages where the reply time was under X minutes. Example: 15

no_reply_for   integer  optional    

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

sort_by   string  optional    

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

direction   string  optional    

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

per_page_agents   integer  optional    

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

page_agents   integer  optional    

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

per_page_contacts   integer  optional    

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

page_contacts   integer  optional    

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

per_page_domains   integer  optional    

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

page_domains   integer  optional    

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

closed_over   integer  optional    

Limit results to conversations closed over X minutes. Example: 15

viewId   integer  optional    

The ID of the view you want to use. This will pull in all the filters and settings from that view. Example: 1

showHourOfDayForAgents   boolean  optional    

Should we show the hour of day for agents. Example: false

Productivity

Productivity - Report

requires authentication

Productivity Report Data

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

const params = {
    "date": "2020-01-01",
    "model": "My Company",
    "model_type": "Internal",
    "model_com": "1",
    "model_type_com": "Contact Group",
    "per_page": "2",
    "page": "1",
    "sort_by_email_volumes": "messages_sent_count",
    "direction_email_volumes": "desc",
    "sort_by_conversations": "threads_count",
    "direction_conversations": "desc",
    "sort_by_average_reply_times": "initialTTR",
    "direction_average_reply_times": "desc",
    "sort_by_responsiveness": "replies_under_7200",
    "direction_responsiveness": "desc",
    "sort_by_activity": "first_activity",
    "direction_activity": "desc",
    "viewId": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/reports/productivity';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'date' => '2020-01-01',
            'model' => 'My Company',
            'model_type' => 'Internal',
            'model_com' => '1',
            'model_type_com' => 'Contact Group',
            'per_page' => '2',
            'page' => '1',
            'sort_by_email_volumes' => 'messages_sent_count',
            'direction_email_volumes' => 'desc',
            'sort_by_conversations' => 'threads_count',
            'direction_conversations' => 'desc',
            'sort_by_average_reply_times' => 'initialTTR',
            'direction_average_reply_times' => 'desc',
            'sort_by_responsiveness' => 'replies_under_7200',
            'direction_responsiveness' => 'desc',
            'sort_by_activity' => 'first_activity',
            'direction_activity' => 'desc',
            'viewId' => '1',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://portal.timetoreply.com/api/reports/productivity?date=2020-01-01&model=My+Company&model_type=Internal&model_com=1&model_type_com=Contact+Group&per_page=2&page=1&sort_by_email_volumes=messages_sent_count&direction_email_volumes=desc&sort_by_conversations=threads_count&direction_conversations=desc&sort_by_average_reply_times=initialTTR&direction_average_reply_times=desc&sort_by_responsiveness=replies_under_7200&direction_responsiveness=desc&sort_by_activity=first_activity&direction_activity=desc&viewId=1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
tracking-events: []
server-timing: bootstrap;desc="Bootstrap";dur=1658.5068702698, app;desc="App";dur=90, total;desc="Total";dur=1660.4540348053,
x-ttr-server: homestead-rob
 

{
    "message": "Unauthenticated."
}
 

Request   

GET api/reports/productivity

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

date   string  optional    

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

model   string  optional    

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

model_type   string  optional    

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

model_com   string  optional    

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

model_type_com   string  optional    

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

per_page   integer  optional    

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

page   integer  optional    

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

sort_by_email_volumes   string  optional    

Field Name to sort email volumes by. Defaults to messages_sent_count. Example: messages_sent_count

direction_email_volumes   string  optional    

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

sort_by_conversations   string  optional    

Field Name to sort conversations by. Defaults to threads_count. Example: threads_count

direction_conversations   string  optional    

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

sort_by_average_reply_times   string  optional    

Field Name to sort average reply times by. Defaults to initialTTR. Example: initialTTR

direction_average_reply_times   string  optional    

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

sort_by_responsiveness   string  optional    

Field Name to sort responsiveness by. Defaults to replies_under_7200. Example: replies_under_7200

direction_responsiveness   string  optional    

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

sort_by_activity   string  optional    

Field Name to sort activity by. Defaults to first_activity. Example: first_activity

direction_activity   string  optional    

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

viewId   integer  optional    

The ID of the view you want to use. This will pull in all the filters and settings from that view. Example: 1

Comparative

Comparative - Report

requires authentication

Comparative Report Data

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

const params = {
    "from": "2020-01-01",
    "to": "2020-01-08",
    "model": "My Company",
    "model_type": "Internal",
    "exclude_cc": "0",
    "model_com": "1",
    "model_type_com": "Contact Group",
    "exclude_cc_com": "0",
    "exclusive": "0",
    "label[0]": "INBOX",
    "labels_and_or": "AND",
    "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",
    "waiting_for_response": "customer-has-response,waiting-for-response",
    "replies_over": "15",
    "message_replies_over": "15",
    "message_replies_under": "15",
    "no_reply_for": "15",
    "per_page": "2",
    "direction": "desc",
    "page": "1",
    "closed_over": "15",
    "viewId": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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

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

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
tracking-events: []
server-timing: bootstrap;desc="Bootstrap";dur=1665.6820774078, app;desc="App";dur=92, total;desc="Total";dur=1667.4959659576,
x-ttr-server: homestead-rob
 

{
    "message": "Unauthenticated."
}
 

Request   

GET api/reports/comparative

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

from   string  optional    

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

to   string  optional    

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

model   string  optional    

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

model_type   string  optional    

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

exclude_cc   boolean  optional    

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

model_com   string  optional    

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

model_type_com   string  optional    

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

exclude_cc_com   boolean  optional    

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

exclusive   boolean  optional    

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

search   string  optional    

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

label   string[]  optional    

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

labels_and_or   string  optional    

Should we filter by all labels or any labels. Must be either "AND" or "OR". Example: AND

thread_type   string  optional    

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

thread_status   string  optional    

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

has_replies   string  optional    

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

classification   string  optional    

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

messageType   string  optional    

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

waiting_for_response   string  optional    

A comma separated list (no spaces) of any combination of the following: customer-has-response,waiting-for-response. Example: customer-has-response,waiting-for-response

replies_over   integer  optional    

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

message_replies_over   integer  optional    

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

message_replies_under   integer  optional    

Limit results to messages where the reply time was under X minutes. Example: 15

no_reply_for   integer  optional    

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

per_page   integer  optional    

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

direction   string  optional    

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

page   integer  optional    

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

closed_over   integer  optional    

Limit results to conversations closed over X minutes. Example: 15

viewId   integer  optional    

The ID of the view you want to use. This will pull in all the filters and settings from that view. Example: 1

Interactions

Interactions - Report

requires authentication

Interactions Report Data

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

const params = {
    "from": "2020-01-01",
    "to": "2020-01-08",
    "model": "1",
    "model_type": "Mailbox",
    "exclude_cc": "0",
    "model_com": "1",
    "model_type_com": "Contact Group",
    "exclude_cc_com": "0",
    "exclusive": "0",
    "label[0]": "INBOX",
    "labels_and_or": "AND",
    "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",
    "waiting_for_response": "customer-has-response,waiting-for-response",
    "replies_over": "15",
    "message_replies_over": "15",
    "message_replies_under": "15",
    "no_reply_for": "15",
    "per_page": "2",
    "direction": "desc",
    "page": "1",
    "closed_over": "15",
    "viewId": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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

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

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
tracking-events: []
server-timing: bootstrap;desc="Bootstrap";dur=1673.4828948975, app;desc="App";dur=94, total;desc="Total";dur=1675.4200458527,
x-ttr-server: homestead-rob
 

{
    "message": "Unauthenticated."
}
 

Request   

GET api/reports/interactions

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

from   string  optional    

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

to   string  optional    

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

model   string  optional    

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

model_type   string  optional    

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

exclude_cc   boolean  optional    

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

model_com   string  optional    

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

model_type_com   string  optional    

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

exclude_cc_com   boolean  optional    

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

exclusive   boolean  optional    

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

search   string  optional    

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

label   string[]  optional    

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

labels_and_or   string  optional    

Should we filter by all labels or any labels. Must be either "AND" or "OR". Example: AND

thread_type   string  optional    

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

thread_status   string  optional    

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

has_replies   string  optional    

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

classification   string  optional    

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

messageType   string  optional    

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

waiting_for_response   string  optional    

A comma separated list (no spaces) of any combination of the following: customer-has-response,waiting-for-response. Example: customer-has-response,waiting-for-response

replies_over   integer  optional    

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

message_replies_over   integer  optional    

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

message_replies_under   integer  optional    

Limit results to messages where the reply time was under X minutes. Example: 15

no_reply_for   integer  optional    

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

per_page   integer  optional    

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

direction   string  optional    

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

page   integer  optional    

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

closed_over   integer  optional    

Limit results to conversations closed over X minutes. Example: 15

viewId   integer  optional    

The ID of the view you want to use. This will pull in all the filters and settings from that view. Example: 1

SLA

SLA - Report

requires authentication

SLA Report Data

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

const params = {
    "from": "2020-01-01",
    "to": "2020-01-08",
    "model": "My Company",
    "model_type": "Internal",
    "exclude_cc": "0",
    "model_com": "1",
    "model_type_com": "Contact Group",
    "exclude_cc_com": "0",
    "exclusive": "0",
    "label[0]": "INBOX",
    "labels_and_or": "AND",
    "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",
    "waiting_for_response": "customer-has-response,waiting-for-response",
    "replies_over": "15",
    "message_replies_over": "15",
    "message_replies_under": "15",
    "no_reply_for": "15",
    "sort_by": "threads.total",
    "direction": "desc",
    "per_page_agents": "2",
    "page_agents": "1",
    "per_page_contacts": "2",
    "page_contacts": "1",
    "per_page_domains": "2",
    "page_domains": "1",
    "closed_over": "15",
    "viewId": "1",
    "init_ttr_goal": "02:00:00",
    "overall_ttr_goal": "02:00:00",
    "overall_ttc_goal": "02:00:00",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/reports/sla';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'from' => '2020-01-01',
            'to' => '2020-01-08',
            'model' => 'My Company',
            'model_type' => 'Internal',
            'exclude_cc' => '0',
            'model_com' => '1',
            'model_type_com' => 'Contact Group',
            'exclude_cc_com' => '0',
            'exclusive' => '0',
            'label[0]' => 'INBOX',
            'labels_and_or' => 'AND',
            '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',
            'waiting_for_response' => 'customer-has-response,waiting-for-response',
            'replies_over' => '15',
            'message_replies_over' => '15',
            'message_replies_under' => '15',
            'no_reply_for' => '15',
            'sort_by' => 'threads.total',
            'direction' => 'desc',
            'per_page_agents' => '2',
            'page_agents' => '1',
            'per_page_contacts' => '2',
            'page_contacts' => '1',
            'per_page_domains' => '2',
            'page_domains' => '1',
            'closed_over' => '15',
            'viewId' => '1',
            'init_ttr_goal' => '02:00:00',
            'overall_ttr_goal' => '02:00:00',
            'overall_ttc_goal' => '02:00:00',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://portal.timetoreply.com/api/reports/sla?from=2020-01-01&to=2020-01-08&model=My+Company&model_type=Internal&exclude_cc=&model_com=1&model_type_com=Contact+Group&exclude_cc_com=&exclusive=&label[]=INBOX&labels_and_or=AND&thread_type=inbound%2Coutbound%2Cinternal&thread_status=internal%2Cawait-customer%2Cclosed%2Cawait-agent&has_replies=hasReplies%2ChasForwards%2ChasNoRepliesOrForwards&classification=calculating%2Cfirst%2Creply%2Creply-all%2Cforward&messageType=inbound%2Coutbound%2Cinternal&waiting_for_response=customer-has-response%2Cwaiting-for-response&replies_over=15&message_replies_over=15&message_replies_under=15&no_reply_for=15&sort_by=threads.total&direction=desc&per_page_agents=2&page_agents=1&per_page_contacts=2&page_contacts=1&per_page_domains=2&page_domains=1&closed_over=15&viewId=1&init_ttr_goal=02%3A00%3A00&overall_ttr_goal=02%3A00%3A00&overall_ttc_goal=02%3A00%3A00" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
tracking-events: []
server-timing: bootstrap;desc="Bootstrap";dur=1681.0350418091, app;desc="App";dur=96, total;desc="Total";dur=1682.9400062561,
x-ttr-server: homestead-rob
 

{
    "message": "Unauthenticated."
}
 

Request   

GET api/reports/sla

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

from   string  optional    

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

to   string  optional    

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

model   string  optional    

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

model_type   string  optional    

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

exclude_cc   boolean  optional    

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

model_com   string  optional    

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

model_type_com   string  optional    

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

exclude_cc_com   boolean  optional    

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

exclusive   boolean  optional    

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

search   string  optional    

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

label   string[]  optional    

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

labels_and_or   string  optional    

Should we filter by all labels or any labels. Must be either "AND" or "OR". Example: AND

thread_type   string  optional    

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

thread_status   string  optional    

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

has_replies   string  optional    

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

classification   string  optional    

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

messageType   string  optional    

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

waiting_for_response   string  optional    

A comma separated list (no spaces) of any combination of the following: customer-has-response,waiting-for-response. Example: customer-has-response,waiting-for-response

replies_over   integer  optional    

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

message_replies_over   integer  optional    

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

message_replies_under   integer  optional    

Limit results to messages where the reply time was under X minutes. Example: 15

no_reply_for   integer  optional    

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

sort_by   string  optional    

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

direction   string  optional    

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

per_page_agents   integer  optional    

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

page_agents   integer  optional    

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

per_page_contacts   integer  optional    

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

page_contacts   integer  optional    

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

per_page_domains   integer  optional    

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

page_domains   integer  optional    

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

closed_over   integer  optional    

Limit results to conversations closed over X minutes. Example: 15

viewId   integer  optional    

The ID of the view you want to use. This will pull in all the filters and settings from that view. Example: 1

init_ttr_goal   string  optional    

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

overall_ttr_goal   string  optional    

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

overall_ttc_goal   string  optional    

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

Trend

Trend - Report

requires authentication

Trend Report Data

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

const params = {
    "model": "My Company",
    "model_type": "Internal",
    "exclude_cc": "0",
    "model_com": "1",
    "model_type_com": "Contact Group",
    "exclude_cc_com": "0",
    "exclusive": "0",
    "label[0]": "INBOX",
    "labels_and_or": "AND",
    "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",
    "waiting_for_response": "customer-has-response,waiting-for-response",
    "replies_over": "15",
    "message_replies_over": "15",
    "message_replies_under": "15",
    "no_reply_for": "15",
    "date": "2020-01-01",
    "periods": "12",
    "period_type": "Months",
    "show_agents": "1",
    "closed_over": "15",
    "viewId": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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

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

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
tracking-events: []
server-timing: bootstrap;desc="Bootstrap";dur=1688.5199546814, app;desc="App";dur=98, total;desc="Total";dur=1690.3970241547,
x-ttr-server: homestead-rob
 

{
    "message": "Unauthenticated."
}
 

Request   

GET api/reports/trend

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

model   string  optional    

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

model_type   string  optional    

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

exclude_cc   boolean  optional    

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

model_com   string  optional    

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

model_type_com   string  optional    

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

exclude_cc_com   boolean  optional    

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

exclusive   boolean  optional    

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

search   string  optional    

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

label   string[]  optional    

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

labels_and_or   string  optional    

Should we filter by all labels or any labels. Must be either "AND" or "OR". Example: AND

thread_type   string  optional    

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

thread_status   string  optional    

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

has_replies   string  optional    

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

classification   string  optional    

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

messageType   string  optional    

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

waiting_for_response   string  optional    

A comma separated list (no spaces) of any combination of the following: customer-has-response,waiting-for-response. Example: customer-has-response,waiting-for-response

replies_over   integer  optional    

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

message_replies_over   integer  optional    

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

message_replies_under   integer  optional    

Limit results to messages where the reply time was under X minutes. Example: 15

no_reply_for   integer  optional    

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

date   string  optional    

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

periods   integer  optional    

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

period_type   string  optional    

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

show_agents   boolean  optional    

Should we show the individual mailboxes in the report. Example: true

closed_over   integer  optional    

Limit results to conversations closed over X minutes. Example: 15

viewId   integer  optional    

The ID of the view you want to use. This will pull in all the filters and settings from that view. Example: 1

Contacts

Contacts - Report

requires authentication

Contacts Report Data

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

const params = {
    "from": "2020-01-01",
    "to": "2020-01-08",
    "model": "My Company",
    "model_type": "Internal",
    "exclude_cc": "0",
    "model_com": "1",
    "model_type_com": "Contact Group",
    "exclude_cc_com": "0",
    "exclusive": "0",
    "label[0]": "INBOX",
    "labels_and_or": "AND",
    "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",
    "waiting_for_response": "customer-has-response,waiting-for-response",
    "replies_over": "15",
    "message_replies_over": "15",
    "message_replies_under": "15",
    "no_reply_for": "15",
    "page_emails": "1",
    "per_page_emails": "2",
    "direction_emails": "desc",
    "sort_by_emails": "threads.total",
    "page_domains": "1",
    "per_page_domains": "2",
    "direction_domains": "desc",
    "sort_by_domains": "threads.total",
    "closed_over": "15",
    "viewId": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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

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

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
tracking-events: []
server-timing: bootstrap;desc="Bootstrap";dur=1696.1100101471, app;desc="App";dur=100, total;desc="Total";dur=1697.9649066925,
x-ttr-server: homestead-rob
 

{
    "message": "Unauthenticated."
}
 

Request   

GET api/reports/contact

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

from   string  optional    

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

to   string  optional    

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

model   string  optional    

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

model_type   string  optional    

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

exclude_cc   boolean  optional    

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

model_com   string  optional    

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

model_type_com   string  optional    

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

exclude_cc_com   boolean  optional    

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

exclusive   boolean  optional    

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

search   string  optional    

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

label   string[]  optional    

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

labels_and_or   string  optional    

Should we filter by all labels or any labels. Must be either "AND" or "OR". Example: AND

thread_type   string  optional    

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

thread_status   string  optional    

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

has_replies   string  optional    

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

classification   string  optional    

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

messageType   string  optional    

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

waiting_for_response   string  optional    

A comma separated list (no spaces) of any combination of the following: customer-has-response,waiting-for-response. Example: customer-has-response,waiting-for-response

replies_over   integer  optional    

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

message_replies_over   integer  optional    

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

message_replies_under   integer  optional    

Limit results to messages where the reply time was under X minutes. Example: 15

no_reply_for   integer  optional    

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

page_emails   integer  optional    

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

per_page_emails   integer  optional    

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

direction_emails   string  optional    

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

sort_by_emails   string  optional    

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

page_domains   integer  optional    

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

per_page_domains   integer  optional    

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

direction_domains   string  optional    

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

sort_by_domains   string  optional    

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

closed_over   integer  optional    

Limit results to conversations closed over X minutes. Example: 15

viewId   integer  optional    

The ID of the view you want to use. This will pull in all the filters and settings from that view. Example: 1

Teams

Teams - Report

requires authentication

Teams Report Data

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

const params = {
    "from": "2020-01-01",
    "to": "2020-01-08",
    "model": "1",
    "model_type": "Team",
    "exclude_cc": "0",
    "model_com": "1",
    "model_type_com": "Contact Group",
    "exclude_cc_com": "0",
    "exclusive": "0",
    "label[0]": "INBOX",
    "labels_and_or": "AND",
    "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",
    "waiting_for_response": "customer-has-response,waiting-for-response",
    "replies_over": "15",
    "message_replies_over": "15",
    "message_replies_under": "15",
    "no_reply_for": "15",
    "per_page": "2",
    "sort_by": "threads.total",
    "direction": "desc",
    "page": "1",
    "closed_over": "15",
    "viewId": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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

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

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
tracking-events: []
server-timing: bootstrap;desc="Bootstrap";dur=1703.6070823669, app;desc="App";dur=102, total;desc="Total";dur=1705.5070400238,
x-ttr-server: homestead-rob
 

{
    "message": "Unauthenticated."
}
 

Request   

GET api/reports/teams

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

from   string  optional    

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

to   string  optional    

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

model   string  optional    

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

model_type   string  optional    

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

exclude_cc   boolean  optional    

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

model_com   string  optional    

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

model_type_com   string  optional    

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

exclude_cc_com   boolean  optional    

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

exclusive   boolean  optional    

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

search   string  optional    

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

label   string[]  optional    

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

labels_and_or   string  optional    

Should we filter by all labels or any labels. Must be either "AND" or "OR". Example: AND

thread_type   string  optional    

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

thread_status   string  optional    

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

has_replies   string  optional    

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

classification   string  optional    

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

messageType   string  optional    

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

waiting_for_response   string  optional    

A comma separated list (no spaces) of any combination of the following: customer-has-response,waiting-for-response. Example: customer-has-response,waiting-for-response

replies_over   integer  optional    

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

message_replies_over   integer  optional    

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

message_replies_under   integer  optional    

Limit results to messages where the reply time was under X minutes. Example: 15

no_reply_for   integer  optional    

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

per_page   integer  optional    

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

sort_by   string  optional    

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

direction   string  optional    

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

page   integer  optional    

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

closed_over   integer  optional    

Limit results to conversations closed over X minutes. Example: 15

viewId   integer  optional    

The ID of the view you want to use. This will pull in all the filters and settings from that view. Example: 1

Group Mailboxes

Group Mailboxes - Report

requires authentication

Group Mailboxes Report Data

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

const params = {
    "from": "2020-01-01",
    "to": "2020-01-08",
    "model": "1",
    "model_type": "Group Mailbox",
    "exclude_cc": "0",
    "model_com": "1",
    "model_type_com": "Contact Group",
    "exclude_cc_com": "0",
    "exclusive": "0",
    "label[0]": "INBOX",
    "labels_and_or": "AND",
    "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",
    "waiting_for_response": "customer-has-response,waiting-for-response",
    "replies_over": "15",
    "message_replies_over": "15",
    "message_replies_under": "15",
    "no_reply_for": "15",
    "per_page": "2",
    "sort_by": "threads.total",
    "direction": "desc",
    "page": "1",
    "closed_over": "15",
    "viewId": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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

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

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
tracking-events: []
server-timing: bootstrap;desc="Bootstrap";dur=1711.0409736633, app;desc="App";dur=104, total;desc="Total";dur=1712.9049301147,
x-ttr-server: homestead-rob
 

{
    "message": "Unauthenticated."
}
 

Request   

GET api/reports/group-mailboxes

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

from   string  optional    

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

to   string  optional    

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

model   string  optional    

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

model_type   string  optional    

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

exclude_cc   boolean  optional    

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

model_com   string  optional    

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

model_type_com   string  optional    

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

exclude_cc_com   boolean  optional    

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

exclusive   boolean  optional    

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

search   string  optional    

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

label   string[]  optional    

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

labels_and_or   string  optional    

Should we filter by all labels or any labels. Must be either "AND" or "OR". Example: AND

thread_type   string  optional    

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

thread_status   string  optional    

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

has_replies   string  optional    

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

classification   string  optional    

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

messageType   string  optional    

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

waiting_for_response   string  optional    

A comma separated list (no spaces) of any combination of the following: customer-has-response,waiting-for-response. Example: customer-has-response,waiting-for-response

replies_over   integer  optional    

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

message_replies_over   integer  optional    

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

message_replies_under   integer  optional    

Limit results to messages where the reply time was under X minutes. Example: 15

no_reply_for   integer  optional    

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

per_page   integer  optional    

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

sort_by   string  optional    

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

direction   string  optional    

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

page   integer  optional    

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

closed_over   integer  optional    

Limit results to conversations closed over X minutes. Example: 15

viewId   integer  optional    

The ID of the view you want to use. This will pull in all the filters and settings from that view. Example: 1

Alerts

Alerts - Report

requires authentication

Alerts Report Data

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

const params = {
    "days": "7",
    "team": "1",
    "agent": "1",
    "page_live": "1",
    "per_page_live": "10",
    "page_handled": "1",
    "per_page_handled": "10",
    "sort": "desc",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/reports/alerts';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'days' => '7',
            'team' => '1',
            'agent' => '1',
            'page_live' => '1',
            'per_page_live' => '10',
            'page_handled' => '1',
            'per_page_handled' => '10',
            'sort' => 'desc',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://portal.timetoreply.com/api/reports/alerts?days=7&team=1&agent=1&page_live=1&per_page_live=10&page_handled=1&per_page_handled=10&sort=desc" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
tracking-events: []
server-timing: bootstrap;desc="Bootstrap";dur=1719.28191185, app;desc="App";dur=106, total;desc="Total";dur=1721.1730480194,
x-ttr-server: homestead-rob
 

{
    "message": "Unauthenticated."
}
 

Request   

GET api/reports/alerts

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

days   integer  optional    

The number of days to go back in time. Example: 7

team   integer  optional    

The ID of the team to filter by. Example: 1

agent   integer  optional    

The ID of the mailbox to filter by. Example: 1

page_live   integer  optional    

The page number for the live messages. Example: 1

per_page_live   integer  optional    

The number of live messages per page. Example: 10

page_handled   integer  optional    

The page number for the handled messages. Example: 1

per_page_handled   integer  optional    

The number of handled messages per page. Example: 10

sort   string  optional    

The sort order for the messages. Example: desc

Mailbox Alerts

Alerts - Report

requires authentication

Alerts Report Data for a specific mailbox

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

const params = {
    "days": "7",
    "page": "1",
    "per_page": "10",
    "sort": "desc",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/reports/alerts/1';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'days' => '7',
            'page' => '1',
            'per_page' => '10',
            'sort' => 'desc',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://portal.timetoreply.com/api/reports/alerts/1?days=7&page=1&per_page=10&sort=desc" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
tracking-events: []
server-timing: bootstrap;desc="Bootstrap";dur=1745.5770969391, app;desc="App";dur=109, total;desc="Total";dur=1748.7089633942,
x-ttr-server: homestead-rob
 

{
    "message": "Unauthenticated."
}
 

Request   

GET api/reports/alerts/{agent_id}

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

agent_id   integer     

The ID of the agent. Example: 1

agent   string     

The ID of the mailbox to filter by. Example: 1

Query Parameters

days   integer  optional    

The number of days to go back in time. Example: 7

page   integer  optional    

The page number for the messages. Example: 1

per_page   integer  optional    

The number of messages per page. Example: 10

sort   string  optional    

The sort order for the messages. Example: desc

Logs

Conversations

Conversations - Report

requires authentication

Conversation (Thread) Logs data The full list of available columns for the "columns" parameter are:

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

const params = {
    "from": "2020-01-01",
    "to": "2020-01-08",
    "model": "My Company",
    "model_type": "Internal",
    "exclude_cc": "0",
    "model_com": "1",
    "model_type_com": "Contact Group",
    "exclude_cc_com": "0",
    "exclusive": "0",
    "label[0]": "INBOX",
    "labels_and_or": "AND",
    "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",
    "waiting_for_response": "customer-has-response,waiting-for-response",
    "replies_over": "15",
    "message_replies_over": "15",
    "message_replies_under": "15",
    "no_reply_for": "15",
    "per_page": "2",
    "sort_by": "last_received_at_date_time",
    "direction": "desc",
    "page": "1",
    "closed_over": "15",
    "columns[0]": "id",
    "columns[1]": "init_agent_reply_time",
    "viewId": "1",
    "unfilteredView": "0",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://portal.timetoreply.com/api/logs/conversations';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'from' => '2020-01-01',
            'to' => '2020-01-08',
            'model' => 'My Company',
            'model_type' => 'Internal',
            'exclude_cc' => '0',
            'model_com' => '1',
            'model_type_com' => 'Contact Group',
            'exclude_cc_com' => '0',
            'exclusive' => '0',
            'label[0]' => 'INBOX',
            'labels_and_or' => 'AND',
            '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',
            'waiting_for_response' => 'customer-has-response,waiting-for-response',
            'replies_over' => '15',
            'message_replies_over' => '15',
            'message_replies_under' => '15',
            'no_reply_for' => '15',
            'per_page' => '2',
            'sort_by' => 'last_received_at_date_time',
            'direction' => 'desc',
            'page' => '1',
            'closed_over' => '15',
            'columns[0]' => 'id',
            'columns[1]' => 'init_agent_reply_time',
            'viewId' => '1',
            'unfilteredView' => '0',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "https://portal.timetoreply.com/api/logs/conversations?from=2020-01-01&to=2020-01-08&model=My+Company&model_type=Internal&exclude_cc=&model_com=1&model_type_com=Contact+Group&exclude_cc_com=&exclusive=&label[]=INBOX&labels_and_or=AND&thread_type=inbound%2Coutbound%2Cinternal&thread_status=internal%2Cawait-customer%2Cclosed%2Cawait-agent&has_replies=hasReplies%2ChasForwards%2ChasNoRepliesOrForwards&classification=calculating%2Cfirst%2Creply%2Creply-all%2Cforward&messageType=inbound%2Coutbound%2Cinternal&waiting_for_response=customer-has-response%2Cwaiting-for-response&replies_over=15&message_replies_over=15&message_replies_under=15&no_reply_for=15&per_page=2&sort_by=last_received_at_date_time&direction=desc&page=1&closed_over=15&columns[]=id&columns[]=init_agent_reply_time&viewId=1&unfilteredView=" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
tracking-events: []
server-timing: bootstrap;desc="Bootstrap";dur=1632.052898407, app;desc="App";dur=84, total;desc="Total";dur=1635.0159645081,
x-ttr-server: homestead-rob
 

{
    "message": "Unauthenticated."
}
 

Request   

GET api/logs/conversations

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

from   string  optional    

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

to   string  optional    

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

model   string  optional    

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

model_type   string  optional    

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

exclude_cc   boolean  optional    

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

model_com   string  optional    

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

model_type_com   string  optional    

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

exclude_cc_com   boolean  optional    

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

exclusive   boolean  optional    

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

search   string  optional    

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

label   string[]  optional    

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

labels_and_or   string  optional    

Should we filter by all labels or any labels. Must be either "AND" or "OR". Example: AND

thread_type   string  optional    

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

thread_status   string  optional    

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

has_replies   string  optional    

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

classification   string  optional    

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

messageType   string  optional    

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

waiting_for_response   string  optional    

A comma separated list (no spaces) of any combination of the following: customer-has-response,waiting-for-response. Example: customer-has-response,waiting-for-response

replies_over   integer  optional    

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

message_replies_over   integer  optional    

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

message_replies_under   integer  optional    

Limit results to messages where the reply time was under X minutes. Example: 15

no_reply_for   integer  optional    

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

per_page   integer  optional    

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

sort_by   string  optional    

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

direction   string  optional    

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

page   integer  optional    

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

closed_over   integer  optional    

Limit results to conversations closed over X minutes. Example: 15

columns   string[]  optional    

Allows you to select which columns you want to return.

viewId   integer  optional    

The ID of the view you want to use. This will pull in all the filters and settings from that view. Example: 1

unfilteredView   boolean  optional    

Should we use the unfiltered view. Example: false

Messages

Messages - Report

requires authentication

Message Logs data The full list of available columns for the "columns" parameter are:

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

const params = {
    "from": "2020-01-01",
    "to": "2020-01-08",
    "model": "My Company",
    "model_type": "Internal",
    "exclude_cc": "0",
    "model_com": "1",
    "model_type_com": "Contact Group",
    "exclude_cc_com": "0",
    "exclusive": "0",
    "label[0]": "INBOX",
    "labels_and_or": "AND",
    "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",
    "waiting_for_response": "customer-has-response,waiting-for-response",
    "replies_over": "15",
    "message_replies_over": "15",
    "message_replies_under": "15",
    "no_reply_for": "15",
    "per_page": "2",
    "sort_by": "date_time",
    "direction": "desc",
    "page": "1",
    "closed_over": "15",
    "columns[0]": "date_time",
    "columns[1]": "subject",
    "viewId": "1",
    "unfilteredView": "0",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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

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

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
tracking-events: []
server-timing: bootstrap;desc="Bootstrap";dur=1641.8950557709, app;desc="App";dur=86, total;desc="Total";dur=1644.210100174,
x-ttr-server: homestead-rob
 

{
    "message": "Unauthenticated."
}
 

Request   

GET api/logs/messages

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

from   string  optional    

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

to   string  optional    

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

model   string  optional    

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

model_type   string  optional    

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

exclude_cc   boolean  optional    

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

model_com   string  optional    

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

model_type_com   string  optional    

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

exclude_cc_com   boolean  optional    

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

exclusive   boolean  optional    

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

search   string  optional    

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

label   string[]  optional    

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

labels_and_or   string  optional    

Should we filter by all labels or any labels. Must be either "AND" or "OR". Example: AND

thread_type   string  optional    

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

thread_status   string  optional    

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

has_replies   string  optional    

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

classification   string  optional    

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

messageType   string  optional    

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

waiting_for_response   string  optional    

A comma separated list (no spaces) of any combination of the following: customer-has-response,waiting-for-response. Example: customer-has-response,waiting-for-response

replies_over   integer  optional    

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

message_replies_over   integer  optional    

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

message_replies_under   integer  optional    

Limit results to messages where the reply time was under X minutes. Example: 15

no_reply_for   integer  optional    

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

per_page   integer  optional    

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

sort_by   string  optional    

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

direction   string  optional    

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

page   integer  optional    

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

closed_over   integer  optional    

Limit results to conversations closed over X minutes. Example: 15

columns   string[]  optional    

Allows you to select which columns you want to return.

viewId   integer  optional    

The ID of the view you want to use. This will pull in all the filters and settings from that view. Example: 1

unfilteredView   boolean  optional    

Should we use the unfiltered view. Example: false

Entities

Mailboxes

Mailboxes - List

requires authentication

List all mailboxes

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

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

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

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

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
tracking-events: []
server-timing: bootstrap;desc="Bootstrap";dur=1496.6979026794, app;desc="App";dur=74, total;desc="Total";dur=1571.7749595642,
x-ttr-server: homestead-rob
 

{
    "message": "Unauthenticated."
}
 

Request   

GET api/entities/mailboxes

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

sort_by   string  optional    

The field to sort the mailboxes by. Example: name

direction   string  optional    

Sort asc or desc. Example: asc

per_page   integer  optional    

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

page   integer  optional    

The page number. Example: 1

search   string  optional    

Optional search string.

Contacts

Contacts - List

requires authentication

Get all existing contacts.

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

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

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

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

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
tracking-events: []
server-timing: bootstrap;desc="Bootstrap";dur=1603.4789085388, app;desc="App";dur=80, total;desc="Total";dur=1605.565071106,
x-ttr-server: homestead-rob
 

{
    "message": "Unauthenticated."
}
 

Request   

GET api/entities/contacts

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

sort_by   string  optional    

The field to sort the customers by. Example: name

direction   string  optional    

Sort asc or desc. Example: asc

per_page   integer  optional    

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

page   integer  optional    

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

search   string  optional    

Optional search string.

Contact Groups

Contact Groups - List

requires authentication

List all Contact Groups

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

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

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

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

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
tracking-events: []
server-timing: bootstrap;desc="Bootstrap";dur=1610.5198860168, app;desc="App";dur=81, total;desc="Total";dur=1612.263917923,
x-ttr-server: homestead-rob
 

{
    "message": "Unauthenticated."
}
 

Request   

GET api/entities/contact-groups

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

sort_by   string  optional    

The field to sort the mailboxes by. Example: name

direction   string  optional    

Sort asc or desc. Example: asc

per_page   integer  optional    

The number of contact groups to show per page. Example: 15

page   integer  optional    

The page number. Example: 1

search   string  optional    

Optional search string.

Group Mailboxes

Group Mailboxes - List

requires authentication

Show all Group Mailboxes

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

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

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

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

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
tracking-events: []
server-timing: bootstrap;desc="Bootstrap";dur=1587.8639221191, app;desc="App";dur=76, total;desc="Total";dur=1590.0368690491,
x-ttr-server: homestead-rob
 

{
    "message": "Unauthenticated."
}
 

Request   

GET api/entities/group-mailboxes

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

per_page   integer  optional    

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

page   integer  optional    

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

search   string  optional    

For searching by name. Example: Sales

sort_by   string  optional    

Field to sort by. Example: name

direction   string  optional    

Sort direction. Example: asc

Teams

Teams - List

requires authentication

Show all teams

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

const params = {
    "per_page": "25",
    "page": "1",
    "sort_by": "name",
    "direction": "asc",
    "search": "ACME",
    "include_emails": "0",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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

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

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
tracking-events: []
server-timing: bootstrap;desc="Bootstrap";dur=1596.1790084839, app;desc="App";dur=78, total;desc="Total";dur=1598.0799198151,
x-ttr-server: homestead-rob
 

{
    "message": "Unauthenticated."
}
 

Request   

GET api/entities/teams

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

per_page   integer  optional    

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

page   integer  optional    

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

sort_by   string  optional    

Field to sort by. Example: name

direction   string  optional    

Sort direction. Example: asc

search   string  optional    

Search term to filter by. Example: ACME

include_emails   boolean  optional    

Include email addresses of members in the response. Example: false

Tools

Profile

Profile - Get

requires authentication

Your account basic data

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

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

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

Example response (200):


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

Request   

GET api/me

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

Content-Type        

Example: application/json

Accept        

Example: application/json