# Fetch Activities

## Fetch Activities

<mark style="color:green;">`POST`</mark> `https://ext-v2.smarttask.io/v{api-version}/record-activity/activities/{organization_id}/{record_id}?list_size={list_size}`&#x20;

#### Path Parameters

| Name             | Type          | Description                              |
| ---------------- | ------------- | ---------------------------------------- |
| api-version      | string        | API Version - 1.0                        |
| organization\_id | number        | OrganizationId of SmartTask organization |
| record\_id       | string (uuid) | Contact Id or Task Id                    |

#### Query Params

| Name       | Type                      | Description                          |
| ---------- | ------------------------- | ------------------------------------ |
| list\_size | number                    | Size of the list to return (Max 100) |
| before\_id | \[Optional] string (uuid) | Activity Id                          |
| after\_id  | \[Optional] string (uuid) | Activity Id                          |

#### Headers

| Name          | Type   | Description                |
| ------------- | ------ | -------------------------- |
| Authorization | string | Authorization Bearer token |

#### Request Body

* Array of ActivityTypeEnum
* Eg: `["comment", "call", "file" ]`

#### Response

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

```
{
    "list": [
        {
            "activity_id": "b0069a84-d564-45bf-a690-fd29596730f4",
            "record_id": "a6e0e94e-c49c-4117-b72f-2a98f253eeb0",
            "created_by_user": {
                "user_id": 55,
                "full_name": "Elma Rogers",
                "email": "elma@acme.io",
                "avatar_url": "https://smartstorage1.blob.core.windows.net/photos/UserPics/4e93314b-cab6-44d4-911d-b03247cccac8.png",
                "timezone_in_mins": 330
            },
            "type": "comment",
            "access_type": "default",
            "contact_id": null,
            "contact": null,
            "task_id": null,
            "task": null,
            "text": "<p>Was unable to connect with the client </p>",
            "from_text": null,
            "to_text": null,
            "reaction_summaries": [],
            "created_at": "2024-11-21T10:59:56.633",
            "modified_at": "2024-11-21T10:59:56.633"
        }
    ],
    "limit_reached": true
}
```

{% 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://dev.smarttask.io/endpoints/record-activity/fetch-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.
