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

# Get Cases API

<Badge icon="arrow-left" color="gray">[Back to Case Management API List](/ai-for-service/apis/case-management-apis/api-list)</Badge>

Retrieves case data from the case management system with filtering, sorting, and pagination options.

| Field             | Value                                                                                                                           |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| **Method**        | POST                                                                                                                            |
| **Endpoint**      | `https://{{host}}/caseManagement/api/public/analytics/{{streamId}}/getCases`                                                    |
| **Content Type**  | `application/json`                                                                                                              |
| **Authorization** | `auth: {{JWT}}` See [How to generate the JWT Token](/ai-for-service/apis/automation/api-introduction#generating-the-jwt-token). |
| **API Scope**     | [Case Management Configuration](/ai-for-service/apis/automation/api-introduction#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 theme={null}
curl --location --request POST 'https://{{host}}/caseManagement/api/public/analytics/{{streamId}}/getCases' \
--header 'sec-ch-ua: "Google Chrome";v="123", "Not:A-Brand";v="8", "Chromium";v="123"' \
--header 'AccountId: {{accountId}}' \
--header 'client-app: unified' \
--header 'X-Timezone-Offset: -330' \
--header 'sec-ch-ua-mobile: ?0' \
--header 'auth: {{jwt-code}}' \
--header 'state: configured' \
--header 'Iid: st-d140086f-4d0a-59fa-9d28-b5fc23e9xxxx' \
--header 'Content-Type: application/json;charset=UTF-8' \
--header 'Accept: application/json, text/plain, */*' \
--header 'User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36' \
--header 'bot-language: en' \
--header 'app-language: en' \
--header 'Referer: http://localhost/builder/app/welcomeflows' \
--header 'sec-ch-ua-platform: "Linux"' \
--data '{
    "name": "Testing"
}'
```

## Request Body Parameters

| Parameter    | Required | Type    | Description                                                                |
| ------------ | -------- | ------- | -------------------------------------------------------------------------- |
| `searchText` | Optional | String  | Search text to filter cases by their name or title.                        |
| `unresolved` | Optional | Boolean | Retrieves cases that are still unresolved.                                 |
| `unassigned` | Optional | Boolean | Retrieves cases that are still unassigned.                                 |
| `mycase`     | Optional | Boolean | Indicates whether the current case is assigned to the current user.        |
| `priority`   | Optional | Array   | List of priorities to filter cases. For example, `high`, `medium`.         |
| `status`     | Optional | Array   | List of case 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 case in ISO 8601 format.                                 |
| `endDate`    | Optional | String  | End date of the case 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 theme={null}
{
  "results": [
    {
      "_id": "ci-1a634e1-3d97-427e-8b23-9b7b0a40xxxx",
      "caseTmp": "one",
      "name": "case one",
      "lname": "case one",
      "desc": "this is case one",
      "tags": [],
      "userInfo": {
        "_id": "u-d0db86ae-8a26-51dd-a6d6-5d531c39xxxx",
        "name": "",
        "emailId": "john.doe@example.com"
      },
      "sessIds": [],
      "accountId": "{{accountId}}",
      "iId": "st-5393141c-723b-579d-8265-27dd9b7fxxxx",
      "orgId": "o-a55026c9-2abd-5503-b212-5fba600axxxx",
      "convIds": [],
      "status": {
        "_id": "sts-47a7230-2a07-4b84-879b-e792542cxxxx",
        "name": "Open",
        "lname": "open",
        "statusCategory": "open",
        "type": "system",
        "desc": "When a new case/task is created",
        "isEnabled": true,
        "isActive": true
      },
      "source": "emailInst-873db2e1-0b9a-58b0-87d6-7b26c3c8xxxx",
      "language": "en",
      "conversationType": "CASE",
      "fields": [
        {
          "_id": "fd-a97ae13-ac3e-4496-b251-db594d8bxxxx",
          "show": true,
          "displayName": "Title",
          "lname": "title",
          "desc": "Title of the field",
          "isEnabled": true,
          "isActive": true,
          "metaData": {
            "type": "input",
            "displayName": "Title",
            "name": "title",
            "description": "Title of the field",
            "placeholder": "Enter title",
            "readOnly": false,
            "tooltipText": "Title of the field"
          },
          "type": "system",
          "required": true,
          "selectedValue": "case one"
        },
        {
          "_id": "fd-253e4de-ec52-4ec5-bcce-bc8157e9xxxx",
          "show": true,
          "displayName": "Description",
          "lname": "description",
          "desc": "Transcription based on the conversation summary",
          "isEnabled": true,
          "isActive": true,
          "metaData": {
            "type": "textarea",
            "displayName": "Description",
            "name": "description",
            "description": "Transcription based on the conversation summary",
            "placeholder": "Enter description",
            "readOnly": false,
            "tooltipText": "Transcription based on the conversation summary"
          },
          "type": "system",
          "required": true,
          "selectedValue": "this is case one"
        },
        {
          "_id": "fd-42bc982-d974-4d4a-851c-be952280xxxx",
          "show": true,
          "displayName": "Due Date",
          "lname": "due date",
          "desc": "Date/time to complete a case",
          "isEnabled": true,
          "isActive": true,
          "metaData": {
            "type": "datetime",
            "displayName": "Due Date",
            "name": "dueDate",
            "description": "Date/time to complete a case",
            "placeholder": "Enter date",
            "readOnly": false,
            "tooltipText": "Date/time to complete a case"
          },
          "type": "system",
          "required": true,
          "selectedValue": "2025-05-29T04:03:00.000Z"
        }
      ],
      "participants": [],
      "queues": [],
      "priority": {
        "_id": "pr-9d1a24a-1385-45e9-818b-295eab5bxxxx",
        "name": "Medium",
        "lname": "medium",
        "type": "system",
        "desc": "Moderate urgency",
        "color": "#16A34A",
        "isEnabled": true,
        "isActive": true,
        "score": 10
      },
      "refId": "CS000100",
      "assigneeType": "unassigned",
      "isActive": true,
      "taskIds": [
        "ti-909aa90-0416-4407-aa5b-d60dd99axxxx"
      ],
      "attachments": [],
      "feedback": [],
      "createdBy": {
        "name": "pachu 23",
        "_id": "u-429cc190-ccc9-57af-9421-a1ca84a2xxxx",
        "profImage": "no-avatar"
      },
      "updatedBy": {
        "name": "pachu 23",
        "_id": "u-429cc190-ccc9-57af-9421-a1ca84a2xxxx",
        "profImage": "no-avatar"
      },
      "timestampValue": 1748318622557,
      "activityIds": [],
      "commentIds": [],
      "resolutionCmts": [],
      "dueDate": 1748491380000,
      "isBreached": false,
      "supportCustomTasks": true,
      "channel": [],
      "createdAt": "2025-05-27T04:03:42.617Z",
      "updatedAt": "2025-05-27T04:03:42.666Z",
      "currAssignee": {},
      "ETA": "2025-05-29T04:03:00.000Z"
    }
  ],
  "page": 1,
  "limit": 50,
  "hasMore": false,
  "totalPages": 1,
  "totalResults": 1
}
```

***
