Complete Task
Overview
Complete a task using its task ID.
Endpoint
PUT /api/task/complete
Use the service origin described in Getting started. The path above already includes /api.
Authentication
Send the access token obtained from Get Access Token in the Authorization header. Access is limited by the authenticated account’s permissions.
Request headers
Accept: application/json
Authorization: Bearer ACCESS_TOKEN
Content-Type: application/json
Query parameters
| Parameter | Type | Requirement | Description |
|---|---|---|---|
id | integer | Required | Task ID returned by Get Task ID or Get Pending Tasks. |
Request example
The following example uses cURL in a POSIX shell. Replace example credentials and IDs before running it. Replace the AI Command Center origin with your deployment address.
curl --request PUT \
--url 'https://command-center.example.com/api/task/complete?id=117' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer ACCESS_TOKEN'
Response
Successful status: 200 OK.
The following is an illustrative response with synthetic contact and credential values. Arrays are shortened to one representative item.
{
"taskId": 117,
"tenantId": 1,
"name": "TestForm",
"form": "DemoForm.iform",
"isExternalForm": false,
"processId": 6,
"processInstanceId": "917cf6d136954a52b62f8a259c898f64",
"activityInstanceId": "73c9e093-076f-4f41-b9ad-288f1361e009",
"activityId": "StandardTask1",
"statusId": 4,
"priorityId": 2,
"taskAction": null,
"arguments": null,
"assignedTo": 2,
"participants": null,
"taskType": 1,
"isAssignedToGroup": false,
"groupId": null,
"maxParticipants": 1,
"unlimitedParticipants": false,
"dueDate": "2024-04-11T10:18:02.803788",
"assignedDate": "2024-04-10T10:18:02.803788",
"completedDate": "2024-04-10T11:44:05.2202629Z",
"originalUserId": 2,
"sourceTaskId": null,
"activityName": null,
"activityDisplayName": null,
"created": "2024-04-10T10:18:03.009088",
"modified": "2024-04-10T11:44:05.2264702Z",
"createdBy": "Sample User",
"modifiedBy": "Sample User"
}
Response fields
The table describes selected fields in the response. Types reflect the example; this is not an exhaustive schema or nullability contract.
| Field | Example type | Description |
|---|---|---|
taskId | integer | ID of the task. |
tenantId | integer | ID of the tenant. |
processId | integer | ID of the process definition. |
processInstanceId | string | ID of the process execution. |
activityInstanceId | string | ID of the activity execution. |
activityId | string | Activity identifier from the process definition. |
statusId | integer | Numeric status identifier; the complete mapping is not defined here. |
priorityId | integer | Numeric priority identifier; the complete mapping is not defined here. |
arguments | null | Process or task arguments, when present. |
Errors
Endpoint-specific error statuses and response bodies are not yet documented. See Usage and troubleshooting for general handling guidance.