> ## Documentation Index
> Fetch the complete documentation index at: https://koreai.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Tasks API

[Back to Case Management API List](https://koreai.mintlify.site/ai-for-service/apis/case-management-apis/api-list)

Retrieves task data from the case management system with filters for status, priority, assignment, channels, and date ranges.

| Field | Value |
| - | - |
| **Method** | POST |
| **Endpoint** | `https://{{host}}/caseManagement/api/public/analytics/{{streamId}}/getTasks` |
| **Content Type** | `application/json` |
| **Authorization** | `auth: {{JWT}}` See [How to generate the JWT Token](https://koreai.mintlify.site/ai-for-service/apis/automation/api-introduction.md#generating-the-jwt-token). |
| **API Scope** | [Case Management Configuration](https://koreai.mintlify.site/ai-for-service/apis/automation/api-introduction.md#associating-api-scopes) |

## Path Parameters

| Parameter | Required | Description |
| - | - | - |
| `host` | Required | Environment URL. For example, `https://platform.kore.ai`. |
| `streamId` | Required | Bot identifier or Stream identifier. Access it from the General Settings page of the bot. For example, `st-084d3c5e-376a-559f-9987-a012bb2bxxxx`. |

## Header Parameters

| Parameter | Required | Description |
| - | - | - |
| `accountId` | Required | The account identifier associated with the API request. For example, `6639f7bd58c97ffac03bxxxx`. |

## Sample Request

```bash expandable=true theme={null}
curl --location 'https://{{host}}/caseManagement/api/public/analytics/{{streamId}}/getTasks' \
--header 'AccountId: {{accountId}}' \
--header 'client-app: unified' \
--header 'X-Timezone-Offset: -330' \
--header 'auth: {{jwt-code}}' \
--header 'Content-Type: application/json;charset=UTF-8' \
--data '{
    "skip": 0,
    "limit": 50,
    "searchText": "",
    "unresolved": false,
    "unassigned": true,
    "mytask": false,
    "selectedColumns": [],
    "priority": ["Critical"],
    "agents": [],
    "status": ["In-Progress"],
    "customFields": [],
    "ETAlist": [],
    "channel": ["rtm"],
    "queues": [],
    "startDate": "2025-05-26T18:30:00.000Z",
    "endDate": "2025-05-27T18:29:59.999Z",
    "sortBy": { "dueDate": "desc" }
}'
```

## Request Body Parameters

| Parameter | Required | Type | Description |
| - | - | - | - |
| `searchText` | Optional | String | Search text to filter tasks by name. |
| `unresolved` | Optional | Boolean | Retrieves tasks that are still unresolved. |
| `unassigned` | Optional | Boolean | Retrieves tasks that are still unassigned. |
| `mycase` | Optional | Boolean | Retrieves tasks assigned to the current user. |
| `priority` | Optional | Array | List of priorities to filter tasks. For example, `high`, `medium`. |
| `status` | Optional | Array | List of task statuses to filter by. For example, `new`, `open`. |
| `channel` | Optional | Array | List of communication channels to filter by. For example, `email`, `chat`. |
| `queues` | Optional | Array | List of queues to filter cases by. For example, `SupportQueue1`. |
| `startDate` | Optional | String | Start date of the task in ISO 8601 format. |
| `endDate` | Optional | String | End date of the task in ISO 8601 format. |
| `sortBy` | Optional | String | Field to sort by. For example, `createdDate`. |
| `dueDate` | Optional | String | Filter by exact due date in ISO 8601 format. |

## Sample Response

```json expandable=true theme={null}
{
  "results": [
    {
      "_id": "ti-c7c61c9-1392-45d3-b163-3622d737xxxx",
      "caseId": "ci-884ca36-6b0c-40bc-ba5c-bc8a8c6cxxxx",
      "caseRefId": "CS000108",
      "name": "This is demo task",
      "priority": { "name": "Medium", "color": "#16A34A" },
      "status": { "name": "Open", "statusCategory": "open" },
      "createdAt": "2025-05-28T12:05:38.807Z",
      "updatedAt": "2025-05-28T12:05:38.807Z"
    }
  ],
  "page": 1,
  "limit": 10,
  "hasMore": false,
  "totalPages": 1,
  "totalResults": 1
}
```

***


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.