POST /api/tasks/{task_id}/complete
Marks a task as completed. This is a convenience endpoint equivalent to calling Update Task with {"status": "completed"}. The completed_at timestamp is automatically set to the current UTC time.
Regular users can only complete tasks they own; admin users can complete any task.
Authentication
Path Parameters
The unique ID of the task to mark as completed.
Request Body
No request body is required.Response
200 OK — Returns the updated task object withstatus set to completed and completed_at populated.
Always
true for successful responses.Confirmation message:
"Tarea marcada como completada".Error Responses
| Status | Description |
|---|---|
403 Forbidden | The authenticated user does not own this task and is not an admin. |
404 Not Found | No task with the given task_id exists. |