Closing a Task via API

Hi all,

 I am creating some automation, and I would like to have it close a task when the automation has finished, via an API call.

I am using a process task, and in the GUI you check a box to mark it complete.  The only fields that I notice changing are:

completed_at : 2021-02-24T10:13:13.000-06:00
completed_by : 6809210

activity_data ; finished_at=2021-02-24 16:13:13 UTC

Does anyone know if I need to just update one, or more of these fields, or is there some other thing I need to do.