Skip to main content
PUT /api/user-challenges/:id/notes Requires authentication.
Authorization
string
required
Bearer token obtained from /api/auth/login or /api/auth/signup. Format: Bearer <token>.
Use notes to record daily reflections, observations, or milestones as you progress through a challenge. Reviewing your notes over time helps reinforce the habit and maintain motivation.

Path parameters

id
number
required
The numeric ID of the user challenge to update.

Request body

notes
string
required
Progress notes for the challenge. Replaces any previously saved notes.

Example

curl --request PUT \
  --url http://localhost:3000/api/user-challenges/14/notes \
  --header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...' \
  --header 'Content-Type: application/json' \
  --data '{
    "notes": "Dia 5 concluído. Acordei mais disposto e com mais foco durante o trabalho."
  }'

Response

200 OK Returns the updated user challenge object with the new notes value.
id
number
required
Unique numeric identifier for this user challenge.
user_id
string
required
UUID of the authenticated user.
template_id
number
required
ID of the challenge template this challenge is based on.
status
string
required
Current status of the challenge. One of ACTIVE, COMPLETED, or ABANDONED.
start_date
string
required
ISO 8601 timestamp of when the challenge was started.
completed_at
string
ISO 8601 timestamp of completion. null if the challenge has not been completed.
notes
string
required
The updated progress notes.
created_at
string
required
ISO 8601 timestamp of when the record was created.
updated_at
string
required
ISO 8601 timestamp of this update.
Example response
{
  "id": 14,
  "user_id": "a3f2c1d0-89b4-4e7a-b6f5-1234567890ab",
  "template_id": 3,
  "status": "ACTIVE",
  "start_date": "2026-03-17T09:00:00.000Z",
  "completed_at": null,
  "notes": "Dia 5 concluído. Acordei mais disposto e com mais foco durante o trabalho.",
  "created_at": "2026-03-17T09:00:00.000Z",
  "updated_at": "2026-03-17T19:10:00.000Z"
}

Errors

StatusDescription
401Missing, invalid, or expired token.
404No user challenge found with the given id.

Build docs developers (and LLMs) love