Skip to main content
PUT
/
tasks
/
:id
curl -X PUT http://localhost:3000/tasks/1 \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -d '{
    "title": "Updated API documentation"
  }'
{
  "id": 1,
  "title": "Finalized API documentation",
  "description": "All endpoints documented and reviewed",
  "completed": true,
  "userId": 5
}
This endpoint requires implementation in the backend. Documentation reflects the expected API design based on the Task model schema.

Authentication

This endpoint requires a valid JWT token in the Authorization header.
Authorization: Bearer YOUR_JWT_TOKEN

Path Parameters

id
integer
required
The unique identifier of the task to update

Request Body

All fields are optional. Only provide the fields you want to update.
title
string
The new title of the task
description
string
The new description of the task
completed
boolean
Update the completion status of the task

Response

id
integer
The unique identifier for the task
title
string
The updated title of the task
description
string
The updated description of the task
completed
boolean
The updated completion status
userId
integer
The ID of the user who owns this task
curl -X PUT http://localhost:3000/tasks/1 \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -d '{
    "title": "Updated API documentation"
  }'
{
  "id": 1,
  "title": "Finalized API documentation",
  "description": "All endpoints documented and reviewed",
  "completed": true,
  "userId": 5
}

Build docs developers (and LLMs) love