# Challenges


## Today Trivia

<small class="badge badge-darkred">requires authentication</small>

Use this end point to get today's trivia

> Example request:

```bash
curl -X GET \
    -G "https://apiqa.bettorfantasy.com/today-trivia" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
```


> Example response (200, Trivia not answered):

```json
{
    "message": "Today Trivia",
    "data": {
        "today_trivia": {
            "id": 1,
            "type": 101,
            "count": 1,
            "has_progress_bar": 0,
            "title": "Daily trivia",
            "description": "The Patriots set a record in Super Bowl LII with most total team yards, how many did they have?\n",
            "reward_description": "Reward: 20",
            "reward_value": 20,
            "currency_type": 20,
            "cta_description": null,
            "cta_type": 0,
            "updated_by": 0,
            "updated_at": "2024-07-10T04:00:26.000000Z",
            "is_active": 1,
            "sequence": 0,
            "is_completed": 0,
            "progress": 1,
            "completed_challenge": null,
            "is_trivia": 1,
            "trivia": {
                "id": 2,
                "question": "The Patriots set a record in Super Bowl LII with most total team yards, how many did they have?\n",
                "options": [
                    "613 Yards",
                    "254 Yards"
                ],
                "is_active": 1,
                "is_used": 0,
                "created_by": 2,
                "updated_by": 1,
                "created_at": "2021-08-05T12:24:28.000000Z",
                "updated_at": "2024-07-10T04:00:26.000000Z",
                "answer": 0,
                "is_current": 1,
                "live_date": "2024-07-10",
                "answer_value": "613 Yards"
            },
            "captured_trivia": null
        }
    }
}
```
> Example response (200, Trivia already answered):

```json
{
    "message": "Today Trivia",
    "data": {
        "today_trivia": {
            "id": 1,
            "type": 101,
            "count": 1,
            "has_progress_bar": 0,
            "title": "Daily trivia",
            "description": "The Patriots set a record in Super Bowl LII with most total team yards, how many did they have?\n",
            "reward_description": "Reward: 20",
            "reward_value": 20,
            "currency_type": 20,
            "cta_description": null,
            "cta_type": 0,
            "updated_by": 0,
            "updated_at": "2024-07-10T04:00:26.000000Z",
            "is_active": 1,
            "sequence": 0,
            "is_completed": 1,
            "progress": 1,
            "completed_challenge": {
                "id": 33,
                "user_id": 3,
                "type": 101,
                "season": 6,
                "week": 22,
                "created_at": "2024-07-10T07:13:37.000000Z",
                "updated_at": "2024-07-10T07:13:37.000000Z",
                "date": "2024-07-10",
                "bet_id": null,
                "type_name": "Daily trivia",
                "check_in_id": null,
                "type_description": "The Patriots set a record in Super Bowl LII with most total team yards, how many did they have?\n",
                "feedback_id": null,
                "capture_trivia_id": 10,
                "referral_id": null,
                "count": 1,
                "reward_description": "Reward: 20",
                "reward_value": 20,
                "currency_type": 20,
                "is_completed": 1,
                "fuelup_id": null,
                "game_id": 1
            },
            "is_trivia": 1,
            "trivia": {
                "id": 2,
                "question": "The Patriots set a record in Super Bowl LII with most total team yards, how many did they have?\n",
                "options": [
                    "613 Yards",
                    "254 Yards"
                ],
                "is_active": 1,
                "is_used": 0,
                "created_by": 2,
                "updated_by": 1,
                "created_at": "2021-08-05T12:24:28.000000Z",
                "updated_at": "2024-07-10T04:00:26.000000Z",
                "answer": 0,
                "is_current": 1,
                "live_date": "2024-07-10",
                "answer_value": "613 Yards"
            },
            "captured_trivia": {
                "id": 10,
                "user_id": 3,
                "trivia": {
                    "id": 2,
                    "answer": 0,
                    "is_used": 0,
                    "options": [
                        "613 Yards",
                        "254 Yards"
                    ],
                    "question": "The Patriots set a record in Super Bowl LII with most total team yards, how many did they have?\n",
                    "is_active": 1,
                    "live_date": "2024-07-10",
                    "created_at": "2021-08-05T12:24:28.000000Z",
                    "created_by": 2,
                    "is_current": 1,
                    "updated_at": "2024-07-10T04:00:26.000000Z",
                    "updated_by": 1,
                    "answer_value": "613 Yards"
                },
                "answer_key": 0,
                "answer_value": "613 Yards",
                "is_correct": 1,
                "created_at": "2024-07-10T07:13:34.000000Z",
                "updated_at": "2024-07-10T07:13:34.000000Z",
                "season": 6,
                "week": 22,
                "date": "2024-07-10",
                "game_id": 1
            }
        }
    }
}
```
> Example response (404):

```json

scneario="No trivia found" {
      "message": "No trivia found!"
  }
```
<div id="execution-results-GETtoday-trivia" hidden>
    <blockquote>Received response<span id="execution-response-status-GETtoday-trivia"></span>:</blockquote>
    <pre class="json"><code id="execution-response-content-GETtoday-trivia"></code></pre>
</div>
<div id="execution-error-GETtoday-trivia" hidden>
    <blockquote>Request failed with error:</blockquote>
    <pre><code id="execution-error-message-GETtoday-trivia"></code></pre>
</div>
<form id="form-GETtoday-trivia" data-method="GET" data-path="today-trivia" data-authed="1" data-hasfiles="0" data-headers='{"Authorization":"Bearer {YOUR_AUTH_KEY}","Content-Type":"application\/json","Accept":"application\/json"}' onsubmit="event.preventDefault(); executeTryOut('GETtoday-trivia', this);">
<h3>
    Request&nbsp;&nbsp;&nbsp;
        <button type="button" style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;" id="btn-tryout-GETtoday-trivia" onclick="tryItOut('GETtoday-trivia');">Try it out ⚡</button>
    <button type="button" style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;" id="btn-canceltryout-GETtoday-trivia" onclick="cancelTryOut('GETtoday-trivia');" hidden>Cancel</button>&nbsp;&nbsp;
    <button type="submit" style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;" id="btn-executetryout-GETtoday-trivia" hidden>Send Request 💥</button>
    </h3>
<p>
<small class="badge badge-green">GET</small>
 <b><code>today-trivia</code></b>
</p>
<p>
<label id="auth-GETtoday-trivia" hidden>Authorization header: <b><code>Bearer </code></b><input type="text" name="Authorization" data-prefix="Bearer " data-endpoint="GETtoday-trivia" data-component="header"></label>
</p>
</form>



