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

# Update a Task API

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

Updates an existing task in the case management system.

| Field | Value |
| - | - |
| **Method** | POST |
| **Endpoint** | `https://{{host}}/caseManagement/api/public/analytics/{{streamId}}/updateTask/{{taskId}}` |
| **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 or Stream identifier from the bot's General Settings. For example, `st-084d3c5e-376a-559f-xxxx-a012bbxxxxxx`. |
| `taskId` | Required | Unique task identifier. For example, `ti-73acd32-0123-xxxx-9891-00a950xxxxxx`. |

## Header Parameters

| Parameter | Required | Description |
| - | - | - |
| `accountId` | Required | Account identifier associated with the API request. For example, `6639f7bd5xxxxffac03bxxxx`. |

## Sample Request

```bash expandable=true theme={null}
curl --location 'https://{{host}}/caseManagement/api/public/analytics/{{streamId}}/updateTask/{{taskId}}' \
--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-084d3c5e-376a-559f-9987-a012bb2bxxxx' \
--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": "Task Testing"
}'
```

## Request Body Parameters

| Parameter | Required | Type | Description |
| - | - | - | - |
| `caseTmp` | Optional | String | Unique task template identifier. |
| `name` | Optional | String | Task name. |
| `lname` | Optional | String | Lowercase version or slug of the name. |
| `desc` | Optional | String | Task description. |
| `tags` | Optional | Array | Array of tag strings. |
| `userInfo` | Optional | Object | User information for the user who created or owns the task. |
| `sessIds` | Optional | Array | Related session IDs. |
| `accountId` | Optional | String | Account identifier. |
| `lid` | Optional | String | Stream, instance, or session ID. |
| `orgId` | Optional | String | Organization identifier. |
| `convIds` | Optional | Array | Related conversation IDs. |
| `status` | Optional | Object | Current task status. |
| `language` | Optional | String | Task language code. For example, `english`. |
| `source` | Optional | String | Source of the task. For example, `rtm`. |
| `conversationType` | Optional | String | Type of conversation. |
| `fields` | Optional | Array | Custom or system field definitions and values. |
| `participants` | Optional | Array | List of participants. |
| `queues` | Optional | Array | Assigned queues. |
| `priority` | Optional | Object | Priority metadata. |
| `refId` | Optional | String | Task reference ID. |
| `assigneeType` | Optional | String | Assignment type. |
| `isActive` | Optional | Boolean | Whether the task is active. |
| `taskIds` | Optional | Array | Array of associated task IDs. |
| `attachments` | Optional | Array | Array of attachments. |
| `feedback` | Optional | Array | Feedback data. |
| `createdBy` | Optional | Object | Creator information. |
| `updatedBy` | Optional | Object | Last updated by information. |
| `timestampValue` | Optional | Number | Timestamp in milliseconds for tracking updates. |
| `activityIds` | Optional | Array | Related activity IDs. |
| `commentIds` | Optional | Array | Related comment IDs. |
| `resolutionCmts` | Optional | Array | Resolution comments. |
| `dueDate` | Optional | Number | Due date timestamp in milliseconds. |
| `isBreached` | Optional | Boolean | SLA breach flag. |
| `supportCustomTasks` | Optional | Boolean | Support for custom tasks. |
| `channel` | Optional | Array | Channels used. For example, `chat`, `email`. |
| `createdAt` | Optional | String | Task creation timestamp. |
| `updatedAt` | Optional | String | Last updated timestamp. |
| `currAssignee` | Optional | Object | Current assigned agent. |
| `ETA` | Optional | String | Estimated resolution time in ISO format. |

## Sample Response

```json expandable=true theme={null}
{
    "_id": "ti-73acd32-0123-4114-9891-00a950aaxxxx",
    "caseId": "ci-31d9184-d64d-42d9-8c75-5edba531xxxx",
    "caseRefId": "CS00xxxx",
    "taskTmp": "jbhk",
    "name": "Task Testing",
    "lname": "task testing",
    "tags": [],
    "userInfo": {
        "_id": "u-fd371c0a-3168-5a02-83dd-f4ba5597xxxx",
        "name": "John"
    },
    ...
    "ETA": ""
}
```

***


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