/api/user-challenges/:id/complete
Requires authentication.
Bearer token obtained from
/api/auth/login or /api/auth/signup. Format: Bearer <token>.Completing a challenge sets its
status to COMPLETED and records the current timestamp in
completed_at. Once completed, the user is free to accept a new challenge.Path parameters
The numeric ID of the user challenge to complete.
Example
Response
200 OK Returns the updated user challenge object withstatus set to COMPLETED and completed_at
set to the current timestamp.
Unique numeric identifier for this user challenge.
UUID of the authenticated user.
ID of the challenge template this challenge is based on.
Updated status. Always
COMPLETED after this operation.ISO 8601 timestamp of when the challenge was started.
ISO 8601 timestamp of when the challenge was marked as completed.
Progress notes for the challenge.
null if none were added.ISO 8601 timestamp of when the record was created.
ISO 8601 timestamp of this update.
Example response
Errors
| Status | Description |
|---|---|
401 | Missing, invalid, or expired token. |
404 | No user challenge found with the given id. |