## Mark a task as complete

To complete a task as passed, make a request to the following endpoint and send the task state field as COMPLETED_PASS.

To complete the task as failed, make the same request but send the state field as COMPLETED_FAIL.

If you've configured your smart policy to mark the task as complete automatically when the check passes, you don't need to mark the task as complete via the API. Contact us to change your smart policy configuration. Alternatively, you can leave a task as incomplete and let your users complete it manually.

To send the request, you'll need the profile ID and the task ID. You can find the task ID when you get data about the profile. If there is more than one task with the same alias, which happens when a task has more than one version, use the task with "is_expired": "false". Note that the task ID is different to the task variant ID, which will not be used for the request.

If you're completing a task yourself via the API, you might, for example, choose to pass the task when the check result is Pass and fail the task when the check result returns Fail three times.

Request endpoint:

POST https://api.passfort.com/4.0/profiles/{profile_id}/tasks/{task_id}

In this example, we'll pass a Verify identity task.

Sample request body:

{
"state": "COMPLETED_PASS"
}

Sample response:

{
"check_ids": [
],
"creation_date": "2019-10-03 13:48:16",
"form_instance_ids": [ ],
"id": "a2c4393a-e219-67a4-5ab4-2186952e9038",
"is_complete": true,
"is_expired": false,
"is_skipped": false,
"state": "COMPLETED_PASS",
"type": "INDIVIDUAL_VERIFY_IDENTITY",
"variant": {
"id": "5562c4e4-4d12-b16a-a151-7c9eed6816e9",
"name": "Verify identity - Forexo",
}
The state field replaces the old is_complete key that used to be part of this request. Making the state key equal to COMPLETED_PASS is the same behavior as making the old is_complete key equal to true.