Skip to main content
Version: Current

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​

ParameterTypeRequirementDescription
idintegerRequiredTask 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.

FieldExample typeDescription
taskIdintegerID of the task.
tenantIdintegerID of the tenant.
processIdintegerID of the process definition.
processInstanceIdstringID of the process execution.
activityInstanceIdstringID of the activity execution.
activityIdstringActivity identifier from the process definition.
statusIdintegerNumeric status identifier; the complete mapping is not defined here.
priorityIdintegerNumeric priority identifier; the complete mapping is not defined here.
argumentsnullProcess 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.