> 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/activities.md).

# Activities

You can use the API to get the activity data.

## Get all activities

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

Allows an admin to list all the activities for the project.

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

#### Query Parameters

| Name       | Type   | Description                                                                                                          |
| ---------- | ------ | -------------------------------------------------------------------------------------------------------------------- |
| agent\_id  | string | The agent identifier.                                                                                                |
| activities | string | A comma separeted list of events to filter the results. Ex: "PROJECT\_USER\_DELETE,PROJECT\_USER\_INVITE"            |
| sortField  | string | what field to sort the results by.                                                                                   |
| direction  | string | <p>sort direction: 1 or -1. Return the results in ascending or descending order.</p><p><em>defaults to desc</em></p> |
| page       | string | what page of results to fetch. defaults to first page.                                                               |

#### Headers

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

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

```
{
   "perPage":40,
   "count":1,
   "activities":[
      {
         "_id":"5cbf2eec5bf27612afc0c309",
         "updatedAt":"2019-04-23T15:27:40.619Z",
         "createdAt":"2019-04-23T15:27:40.619Z",
         "actor":{
            "type":"user",
            "id":"5ac7521787f6b50014e0b592",
            "name":"Nico Lanzilotto"
         },
         "verb":"PROJECT_USER_INVITE",
         "actionObj":{
            "email":"tizio@asd.it",
            "role":"agent",
            "id_project":"5ad5bd52c975820014ba900a",
            "project_name":"Tiledesk"
         },
         "target":{
            "type":"pendinginvitation",
            "id":"5cbf2eec5bf27612afc0c308",
            "object":{
               "_id":"5cbf2eec5bf27612afc0c308",
               "createdBy":"5ac7521787f6b50014e0b592",
               "id_project":"5ad5bd52c975820014ba900a",
               "role":"agent",
               "email":"tizio@asd.it",
               "createdAt":"2019-04-23T15:27:40.519Z",
               "updatedAt":"2019-04-23T15:27:40.519Z",
               "__v":0
            }
         },
         "id_project":"5ad5bd52c975820014ba900a",
         "__v":0
      }
   ]
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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/activities.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.
