/api/user-challenges/active
Requires authentication.
string
required
Bearer token obtained from
/api/auth/login or /api/auth/signup. Format: Bearer <token>.When the user has no active challenge, the endpoint returns
null with a 200 OK status — not
a 404. Always check whether the response body is null before accessing its fields.Example
Response
200 OK Returns the active user challenge object joined with its template, ornull if no challenge is
currently active.
number
required
Unique numeric identifier for this user challenge.
string
required
UUID of the authenticated user.
number
required
ID of the challenge template this challenge is based on.
string
required
Current status. Always
ACTIVE for this endpoint.string
required
ISO 8601 timestamp of when the challenge was started.
string
Always
null for active challenges.string
Progress notes for the challenge.
null if none have been added.string
required
ISO 8601 timestamp of when the record was created.
string
required
ISO 8601 timestamp of the last update to this record.
object
required
The challenge template this challenge is based on.
Example response (active challenge)
Example response (no active challenge)