Skip to main content

Path parameters

taskId
number
required
ID of the task to update.

Request body

All body fields are optional. Omitting a field leaves its current value unchanged. At least one field should be provided.
title
string
New display name for the task.
description
string
New description. Pass an explicit null to clear an existing description.
points
number
Updated points value. Must be greater than zero.
is_daily_routine
boolean
Updated daily routine flag.

Response

200 OK — Returns the updated task object.
id
number
required
Unique identifier for the task.
user_id
string
required
UUID of the user who owns the task.
challenge_template_id
number | null
required
ID of the associated challenge template, or null.
title
string
required
Display name of the task.
description
string | null
required
Description, or null.
points
number
required
Points awarded per completion.
is_daily_routine
boolean
required
Whether the task is flagged as a daily routine.
created_at
string
required
ISO 8601 creation timestamp. Unchanged by this request.
updated_at
string
required
ISO 8601 timestamp set to the time of this update.

Errors

StatusCondition
400points is provided but is zero or negative.
400The task exists but belongs to a different user.
404No task found with the given taskId.
401Missing or invalid authentication token.
curl --request PUT \
  --url http://localhost:3000/api/tasks/42 \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "title": "Meditate for 15 minutes",
    "points": 25
  }'
{
  "id": 42,
  "user_id": "a3f1c2d4-0e5b-4a7f-b891-2c3d4e5f6a7b",
  "challenge_template_id": null,
  "title": "Meditate for 15 minutes",
  "description": "Morning meditation session",
  "points": 25,
  "is_daily_routine": true,
  "created_at": "2026-03-17T08:00:00.000Z",
  "updated_at": "2026-03-17T10:45:00.000Z"
}

Build docs developers (and LLMs) love