Skip to main content
PUT
/
api
/
tasks
/
:id
Update Task
curl --request PUT \
  --url https://api.example.com/api/tasks/:id \
  --header 'Content-Type: application/json' \
  --data '
{
  "title": "<string>",
  "description": "<string>",
  "status": "<string>",
  "priority": "<string>",
  "projectId": 123,
  "taskTypeId": 123
}
'
{
  "id": 123,
  "title": "<string>",
  "description": "<string>",
  "status": "<string>",
  "priority": "<string>",
  "position": 123,
  "projectId": 123,
  "taskTypeId": 123,
  "userId": 123,
  "createdAt": "<string>",
  "updatedAt": "<string>"
}

Authentication

This endpoint requires authentication. Include a Bearer token in the Authorization header.

Path Parameters

id
integer
required
The unique identifier of the task to update

Request Body

All fields are optional. Only include the fields you want to update.
title
string
Task title (max 200 characters). Optional.
description
string
Task description (max 5000 characters). Optional.
status
string
Current status of the task. Optional. Common values: TODO, IN_PROGRESS, DONE
priority
string
Priority level of the task. Optional. Common values: LOW, MEDIUM, HIGH
projectId
integer
ID of the project to associate this task with. Optional.
taskTypeId
integer
ID of the task type. Optional.

Response

Returns the updated task object.
id
integer
Unique identifier for the task
title
string
Task title
description
string
Task description
status
string
Current status of the task
priority
string
Priority level of the task
position
integer
Position of the task for ordering purposes
projectId
integer
ID of the associated project (if any)
taskTypeId
integer
ID of the task type (if any)
userId
integer
ID of the user who owns this task
createdAt
string
ISO 8601 timestamp when the task was created
updatedAt
string
ISO 8601 timestamp when the task was last updated

Example Request

curl -X PUT https://api.dailytracker.com/api/tasks/15 \
  -H "Authorization: Bearer YOUR_TOKEN_HERE" \
  -H "Content-Type: application/json" \
  -d '{
    "status": "IN_PROGRESS",
    "priority": "HIGH"
  }'

Example Response

{
  "id": 15,
  "title": "Implement user authentication",
  "description": "Add JWT-based authentication to the API",
  "status": "IN_PROGRESS",
  "priority": "HIGH",
  "position": 1,
  "projectId": 5,
  "taskTypeId": 2,
  "userId": 123,
  "createdAt": "2026-03-09T15:30:00Z",
  "updatedAt": "2026-03-09T16:45:00Z"
}

Error Responses

400 Bad Request
Validation error - invalid data format
{
  "error": "Bad Request",
  "message": "Validation failed",
  "details": [
    "title: size must be between 0 and 200"
  ]
}
401 Unauthorized
Missing or invalid authentication token
{
  "error": "Unauthorized",
  "message": "Invalid or missing authentication token"
}
404 Not Found
Task not found or does not belong to the authenticated user
{
  "error": "Not Found",
  "message": "Task not found"
}

Build docs developers (and LLMs) love