DeleteTask API

Deletes an active workflow task by its task ID. All task attachments are also removed as part of the operation.

Endpoint

/srv.asmx/DeleteTask

Methods

Parameters

Parameter Type Required Description
authenticationTicket string Yes Authentication ticket obtained from AuthenticateUser.
taskId integer Yes Unique numeric ID of the task to delete.

Response

Success Response

<root success="true" />

Error Response

<root success="false" error="[901] Session expired or Invalid ticket" />

Required Permissions

The calling user must have the Remove Task permission on the document the task is associated with. The user who originally assigned the task is also always permitted to delete it.

Behavior

The exact behavior depends on the relationship between the task and its workflow definition:

Scenario Result
Task belongs to the current workflow definition Task record and all its attachments are permanently deleted.
Ad-hoc task whose workflow definition has since changed Task status is set to Dropped (soft delete); workflow advancement is triggered if it was the last task in its step.
Regular workflow task whose workflow definition has since changed Returns an error — such tasks cannot be deleted directly.

Example

GET Request

GET /srv.asmx/DeleteTask
    ?authenticationTicket=3f7a1b2c-4d5e-6f7a-8b9c-0d1e2f3a4b5c
    &taskId=4812
HTTP/1.1
Host: yourserver

POST Request

POST /srv.asmx/DeleteTask HTTP/1.1
Host: yourserver
Content-Type: application/x-www-form-urlencoded

authenticationTicket=3f7a1b2c-4d5e-6f7a-8b9c-0d1e2f3a4b5c&taskId=4812

Notes

Error Codes

Error Description
[900] Authentication failed — invalid credentials.
[901] Session expired or invalid authentication ticket.
Task not found No task with the specified taskId exists.
Permission error Calling user does not have the Remove Task permission on the document.
Workflow mismatch Regular (non-ad-hoc) task whose workflow definition has changed cannot be deleted.