/api/user-challenges/accept
Requires authentication.
Bearer token obtained from
/api/auth/login or /api/auth/signup. Format: Bearer <token>.Request body
The numeric ID of the challenge template to accept.
Example
Response
201 Created Returns the newly created user challenge object with statusACTIVE.
Unique numeric identifier for this user challenge.
UUID of the authenticated user who accepted the challenge.
ID of the challenge template this challenge is based on.
Current status of the challenge. Always
ACTIVE on creation.ISO 8601 timestamp of when the challenge was started.
ISO 8601 timestamp of when the challenge was completed.
null for active challenges.Progress notes for the challenge.
null if no notes have been added.ISO 8601 timestamp of when the record was created.
ISO 8601 timestamp of the last update to this record.
Example response
Errors
| Status | Description |
|---|---|
400 | The user already has an active challenge. Message: "Você já possui um desafio ativo". |
401 | Missing, invalid, or expired token. |
404 | No challenge template found with the given templateId. |