Skip to main content
POST /api/user-challenges/accept Requires authentication.
string
required
Bearer token obtained from /api/auth/login or /api/auth/signup. Format: Bearer <token>.
Only one active challenge is allowed at a time. Attempting to accept a new challenge while one is already active returns a 400 error. Complete or abandon your current challenge before starting a new one.

Request body

number
required
The numeric ID of the challenge template to accept.

Example

Response

201 Created Returns the newly created user challenge object with status ACTIVE.
number
required
Unique numeric identifier for this user challenge.
string
required
UUID of the authenticated user who accepted the challenge.
number
required
ID of the challenge template this challenge is based on.
string
required
Current status of the challenge. Always ACTIVE on creation.
string
required
ISO 8601 timestamp of when the challenge was started.
string
ISO 8601 timestamp of when the challenge was completed. null for active challenges.
string
Progress notes for the challenge. null if no notes 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.
Example response

Errors