> For the complete documentation index, see [llms.txt](https://developer.tiledesk.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.tiledesk.com/apis/rest-api/analytics.md).

# Analytics

You can use the API to get the analytics data.

## Get the average waiting response time

<mark style="color:blue;">`GET`</mark> `https://api.tiledesk.com/v3/:project_id/analytics/requests/waiting`

This is calculated over the last 30 days.

#### Path Parameters

| Name        | Type   | Description                                                                              |
| ----------- | ------ | ---------------------------------------------------------------------------------------- |
| project\_id | string | the Project Id is a unique code assigned to your project when you create it in Tiledesk. |

#### Headers

| Name          | Type   | Description                                                 |
| ------------- | ------ | ----------------------------------------------------------- |
| Authorization | string | Authorization token. Basic Auth or JWT. Minumun role: admin |

{% tabs %}
{% tab title="200 " %}

```
....
```

{% endtab %}
{% endtabs %}

## Get the average waiting response time of the last day

<mark style="color:blue;">`GET`</mark> `https://api.tiledesk.com/v3/:project_id/analytics/requests/waiting/day/last`

#### Path Parameters

| Name        | Type   | Description                                                                              |
| ----------- | ------ | ---------------------------------------------------------------------------------------- |
| project\_id | string | the Project Id is a unique code assigned to your project when you create it in Tiledesk. |

#### Headers

| Name          | Type   | Description                                                 |
| ------------- | ------ | ----------------------------------------------------------- |
| Authorization | string | Authorization token. Basic Auth or JWT. Minumun role: admin |

{% tabs %}
{% tab title="200 " %}

```
....
```

{% endtab %}
{% endtabs %}

## Get the conversations count of the last 30 days

<mark style="color:blue;">`GET`</mark> `https://api.tiledesk.com/v3/:project_id/analytics/requests/count`

#### Path Parameters

| Name        | Type   | Description                                                                              |
| ----------- | ------ | ---------------------------------------------------------------------------------------- |
| project\_id | string | the Project Id is a unique code assigned to your project when you create it in Tiledesk. |

#### Headers

| Name          | Type   | Description                                                 |
| ------------- | ------ | ----------------------------------------------------------- |
| Authorization | string | Authorization token. Basic Auth or JWT. Minumun role: admin |

{% tabs %}
{% tab title="200 " %}

```
....
```

{% endtab %}
{% endtabs %}

## Get the conversations count aggregated by the status field of the last 30 days

<mark style="color:blue;">`GET`</mark> `https://api.tiledesk.com/v3/:project_id/analytics/requests/aggregate/status`

With this endpoint you can get how many assigned, unassigned and archived conversations do you have.

#### Path Parameters

| Name        | Type   | Description                                                                              |
| ----------- | ------ | ---------------------------------------------------------------------------------------- |
| project\_id | string | the Project Id is a unique code assigned to your project when you create it in Tiledesk. |

#### Headers

| Name          | Type   | Description                                                 |
| ------------- | ------ | ----------------------------------------------------------- |
| Authorization | string | Authorization token. Basic Auth or JWT. Minumun role: admin |

{% tabs %}
{% tab title="200 " %}

```
....
```

{% endtab %}
{% endtabs %}

## Get the conversations count aggregated by days

<mark style="color:blue;">`GET`</mark> `https://api.tiledesk.com/v3/:project_id/analytics/requests/aggregate/day`

#### Path Parameters

| Name        | Type   | Description                                                                              |
| ----------- | ------ | ---------------------------------------------------------------------------------------- |
| project\_id | string | the Project Id is a unique code assigned to your project when you create it in Tiledesk. |

#### Headers

| Name          | Type   | Description                                                 |
| ------------- | ------ | ----------------------------------------------------------- |
| Authorization | string | Authorization token. Basic Auth or JWT. Minumun role: admin |

{% tabs %}
{% tab title="200 " %}

```
....
```

{% endtab %}
{% endtabs %}

## Get the conversations count aggregated by months

<mark style="color:blue;">`GET`</mark> `https://api.tiledesk.com/v3/:project_id/analytics/requests/aggregate/month`

#### Path Parameters

| Name        | Type   | Description                                                                              |
| ----------- | ------ | ---------------------------------------------------------------------------------------- |
| project\_id | string | the Project Id is a unique code assigned to your project when you create it in Tiledesk. |

#### Headers

| Name          | Type   | Description                                                 |
| ------------- | ------ | ----------------------------------------------------------- |
| Authorization | string | Authorization token. Basic Auth or JWT. Minumun role: admin |

{% tabs %}
{% tab title="200 " %}

```
....
```

{% endtab %}
{% endtabs %}

## Get the conversations count aggregated by weeks

<mark style="color:blue;">`GET`</mark> `https://api.tiledesk.com/v3/:project_id/analytics/requests/aggregate/week`

#### Path Parameters

| Name        | Type   | Description                                                                              |
| ----------- | ------ | ---------------------------------------------------------------------------------------- |
| project\_id | string | the Project Id is a unique code assigned to your project when you create it in Tiledesk. |

#### Headers

| Name          | Type   | Description                                                 |
| ------------- | ------ | ----------------------------------------------------------- |
| Authorization | string | Authorization token. Basic Auth or JWT. Minumun role: admin |

{% tabs %}
{% tab title="200 " %}

```
....
```

{% endtab %}
{% endtabs %}

## Get the conversations count aggregated by hours

<mark style="color:blue;">`GET`</mark> `https://api.tiledesk.com/v3/:project_id/analytics/requests/aggregate/hours`

#### Path Parameters

| Name        | Type   | Description                                                                              |
| ----------- | ------ | ---------------------------------------------------------------------------------------- |
| project\_id | string | the Project Id is a unique code assigned to your project when you create it in Tiledesk. |

#### Headers

| Name          | Type   | Description                                                 |
| ------------- | ------ | ----------------------------------------------------------- |
| Authorization | string | Authorization token. Basic Auth or JWT. Minumun role: admin |

{% tabs %}
{% tab title="200 " %}

```
....
```

{% endtab %}
{% endtabs %}

## Get the median conversations length

<mark style="color:blue;">`GET`</mark> `https://api.tiledesk.com/v3/:project_id/analytics/requests/duration`

#### Path Parameters

| Name        | Type   | Description                                                                              |
| ----------- | ------ | ---------------------------------------------------------------------------------------- |
| project\_id | string | the Project Id is a unique code assigned to your project when you create it in Tiledesk. |

#### Headers

| Name          | Type   | Description                                                 |
| ------------- | ------ | ----------------------------------------------------------- |
| Authorization | string | Authorization token. Basic Auth or JWT. Minumun role: admin |

{% tabs %}
{% tab title="200 " %}

```
....
```

{% endtab %}
{% endtabs %}

## Get the median conversations length calculated over the last 30 days

<mark style="color:blue;">`GET`</mark> `https://api.tiledesk.com/v3/:project_id/analytics/requests/duration`

#### Path Parameters

| Name        | Type   | Description                                                                              |
| ----------- | ------ | ---------------------------------------------------------------------------------------- |
| project\_id | string | the Project Id is a unique code assigned to your project when you create it in Tiledesk. |

#### Headers

| Name          | Type   | Description                                                 |
| ------------- | ------ | ----------------------------------------------------------- |
| Authorization | string | Authorization token. Basic Auth or JWT. Minumun role: admin |

{% tabs %}
{% tab title="200 " %}

```
....
```

{% endtab %}
{% endtabs %}

## Get the average customers rating of the conversations (Customer satisfaction)

<mark style="color:blue;">`GET`</mark> `https://api.tiledesk.com/v3/:project_id/analytics/requests/satisfaction`

#### Path Parameters

| Name        | Type   | Description                                                                              |
| ----------- | ------ | ---------------------------------------------------------------------------------------- |
| project\_id | string | the Project Id is a unique code assigned to your project when you create it in Tiledesk. |

#### Headers

| Name          | Type   | Description                                                 |
| ------------- | ------ | ----------------------------------------------------------- |
| Authorization | string | Authorization token. Basic Auth or JWT. Minumun role: admin |

{% tabs %}
{% tab title="200 " %}

```
....
```

{% endtab %}
{% endtabs %}

## Get the number of the conversations handled by a bot

<mark style="color:blue;">`GET`</mark> `https://api.tiledesk.com/v3/:project_id/analytics/requests/hasBot/count`

#### Path Parameters

| Name        | Type   | Description                                                                              |
| ----------- | ------ | ---------------------------------------------------------------------------------------- |
| project\_id | string | the Project Id is a unique code assigned to your project when you create it in Tiledesk. |

#### Headers

| Name          | Type   | Description                                                 |
| ------------- | ------ | ----------------------------------------------------------- |
| Authorization | string | Authorization token. Basic Auth or JWT. Minumun role: admin |

{% tabs %}
{% tab title="200 " %}

```
....
```

{% endtab %}
{% endtabs %}

## Get the total number of the messages sent and received during the last 30 days

<mark style="color:blue;">`GET`</mark> `https://api.tiledesk.com/v3/:project_id/analytics/messages/count`

#### Path Parameters

| Name        | Type   | Description                                                                              |
| ----------- | ------ | ---------------------------------------------------------------------------------------- |
| project\_id | string | the Project Id is a unique code assigned to your project when you create it in Tiledesk. |

#### Headers

| Name          | Type   | Description                                                 |
| ------------- | ------ | ----------------------------------------------------------- |
| Authorization | string | Authorization token. Basic Auth or JWT. Minumun role: admin |

{% tabs %}
{% tab title="200 " %}

```
....
```

{% endtab %}
{% endtabs %}

## Get the total number of the messages sent and received aggregated by days during the last 30 days

<mark style="color:blue;">`GET`</mark> `https://api.tiledesk.com/v3/:project_id/analytics/messages/aggregate/day`

#### Path Parameters

| Name        | Type   | Description                                                                              |
| ----------- | ------ | ---------------------------------------------------------------------------------------- |
| project\_id | string | the Project Id is a unique code assigned to your project when you create it in Tiledesk. |

#### Headers

| Name          | Type   | Description                                                 |
| ------------- | ------ | ----------------------------------------------------------- |
| Authorization | string | Authorization token. Basic Auth or JWT. Minumun role: admin |

{% tabs %}
{% tab title="200 " %}

```
....
```

{% endtab %}
{% endtabs %}
