Update a task on the TODO list

PUT /tasks/{taskId}

Updates a specific task's details and/or status

Path parameters

  • taskId integer Required

    The ID of the task to operate on

application/json

Body Required

  • id integer

    The unique identifier for a task.

  • A brief summary of the task.

  • status string

    The current status of the task, which can be 'new', 'in progress', or 'completed'.

    Values are new, in progress, or completed. Default value is new.

Responses

  • 200 application/json

    Task updated successfully

    Hide response attributes Show response attributes object
    • id integer

      The unique identifier for a task.

    • A brief summary of the task.

    • status string

      The current status of the task, which can be 'new', 'in progress', or 'completed'.

      Values are new, in progress, or completed. Default value is new.

  • Task not found by the ID provided

PUT /tasks/{taskId}
curl \
 -X PUT https://api.todolist.local/v1/tasks/3 \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"id":1,"description":"Buy milk","status":"new"}'
Request examples
{
  "id": 1,
  "description": "Buy milk",
  "status": "new"
}
Response examples (200)
{
  "id": 1,
  "description": "Buy milk",
  "status": "new"
}