# 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 %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.tiledesk.com/apis/rest-api/analytics.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
