# Update Enrollment Task
Source: https://www.stedi.com/docs/healthcare/api-reference/post-enrollment-update-task

***

openapi: enrollment post /tasks/{taskId}
title: Update Enrollment Task
sidebarTitle: "Update Task"
---------------------------

This endpoint updates the completion status and data of a task associated with a [transaction enrollment](/healthcare/transaction-enrollment).

Stedi adds tasks to an enrollment when specific actions are required to complete the enrollment process. For example, we might add a task to request additional information from the provider.

When the task's `responsibleParty` is set to `PROVIDER`, you can use this endpoint to mark the task as completed once the provider has taken the required action. You can also use this endpoint to mark tasks as incomplete if they were marked complete in error.

1. Call this endpoint with the `completed` property set to `true` to mark the task as completed. Optionally, provide additional details in the `responseData` object.

2. The endpoint returns the updated task record.

Stedi displays the task as completed in the Stedi portal and proceeds with the enrollment process.

## Task rank order

You must complete tasks in the order defined by their `rank` property. For example, you can't complete a task with rank `2` if there's an uncompleted task on the enrollment record with rank `1`. If you try to complete a task out of order, the endpoint returns an HTTP `400` error.