---
updatedAt: 2026-04-20T23:54:25.000Z
agentTools:
  projectIndex: https://docs.onfleet.com/llms.txt
---

# Complete task

## Complete task

Active tasks can be force completed. A `completionDetails` property must be provided in the body of your request, with the following structure.

| Name              | Type   | Description                                                                          |
| :---------------- | :----- | :----------------------------------------------------------------------------------- |
| completionDetails | object | This object let you specify the status of the task and make notes on the completion. |

The available fields within the `completionDetails` parameter are defined in the below table.

| Name    | Type    | Description                                   |
| :------ | :------ | :-------------------------------------------- |
| success | boolean | Whether the task's completion was successful. |
| notes   | string  | Optional. Any completion notes for the task.  |

```shell Request
curl -X POST "https://onfleet.com/api/v2/tasks/uO2vKr07h6zg7Fzf~2NC3KLg/complete" \
     -u "<your_api_key>:" \
     -d '{"completionDetails":{"success":true}}'
```
```python
onfleet.tasks.forceComplete(id="uO2vKr07h6zg7Fzf~2NC3KLg", body={"completionDetails":{"success":True}})
```
```javascript
onfleet.tasks.forceComplete("uO2vKr07h6zg7Fzf~2NC3KLg", {"completionDetails":{"success":true}});
```
```php
$onfleet->tasks->forceComplete("uO2vKr07h6zg7Fzf~2NC3KLg",["completionDetails"=>["success"=>true]])
```

```http Response
HTTP/1.1 200 OK
```

Completed tasks cannot be updated in any way