# Quest evidence overview

> What each quest format needs before AdQuest pays: evidence from the widget, or facts your server reports.

Source: https://dashboard.adquest.io/docs/quest-evidence · Audience: Developers · Section: Quest evidence

## Prerequisites

- A working integration: participant sessions and a widget or client.
- A quest in the format you want, created in the dashboard and active.
- The public API key, API URL and the user’s participant token.
- For event, referral and streak quests: your Secret Key, kept on your server. Signing with the Event signing secret is an optional alternative.

## How completion works

AdQuest decides every completion on its servers. Formats played in the widget send their evidence from the participant’s session. Formats proven by your product (event, referral, streak) need one thing from you: your server reports activities, and AdQuest settles them by itself.

| Format (API type) | You send | Then |
| --- | --- | --- |
| Video (video) | start, then watch progress, then one answer per question; a first miss is asked again at the end | The last right answer completes it. A second miss rejects it. |
| Time-link (banner) | start, the timer, an optional click, then one answer per question; a first miss is asked again at the end | The last right answer completes it. A second miss rejects it. |
| Survey (survey) | start without a timer, then the answers | complete |
| Quiz (quiz) | start without a timer, then one answer per question; a first miss is asked again at the end | The last right answer completes it. A second miss rejects it. |
| Visit destination (visit) | start, then the visit | complete |
| Reach a target (event) | Nothing from the widget. Your server reports the activity. | Settled by AdQuest when the goal is met |
| Profile (profile) | the saved profile in a new participant session | complete |
| Referral (referral) | Your server reports the friend’s signup with the inviter’s code. | Settled by AdQuest when the minimum is met |
| Streak (streak) | Your server reports the daily activity. | Settled by AdQuest on the last day |
| Custom (custom) | complete, then AdQuest checks your URL, or a reviewer checks the evidence | Settled when verified or approved |
| Multi-step (multi_step) | evidence for each step, or the activity a step counts | Settled after every required step is verified |

> **Completion is decided on the server.** A callback in your widget is not proof. Grant anything permanent only after the completion result or a signed webhook confirms it.

## The request helper

**Authenticated public API helper**

```typescript
type ApiConfig = { baseUrl: string; apiKey: string; participantToken: string; externalUserId: string; deliveryToken?: string };
export async function questRequest(config: ApiConfig, questId: number, action: string, body: Record<string, unknown> = {}) {
  const response = await fetch(config.baseUrl.replace(/[/]$/, "") + "/platform/quests/" + questId + "/" + action, {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
      "X-AdQuest-Platform-Key": config.apiKey,
      "X-AdQuest-Participant-Token": config.participantToken,
    },
    body: JSON.stringify({ delivery_token: config.deliveryToken, ...body, external_user_id: config.externalUserId }),
  });
  const result = await response.json();
  if (!response.ok || !result.status) throw new Error(result.message || "Quest request failed");
  return result.data;
}
```

> **Read the settlement.** Use the same platform key, external user id, and participant token as the SDK client. Keep a delivery token from start as config.deliveryToken. Read status, data.completed and the format fields. An accepted request can mean pending review (completed: false). A client that declares async_complete gets 202 with data.settlement_status pending while the reward is paid; poll the completion status.

## One page per format

- [Report activities](https://dashboard.adquest.io/docs/quest-evidence/activities): The one signed call your server makes for event, referral and streak quests.
- [Video evidence](https://dashboard.adquest.io/docs/quest-evidence/video): Progress evidence and the question.
- [Time-link / banner evidence](https://dashboard.adquest.io/docs/quest-evidence/time-link): Timer, click and question.
- [Survey evidence](https://dashboard.adquest.io/docs/quest-evidence/survey): Several questions, no timer.
- [Quiz evidence](https://dashboard.adquest.io/docs/quest-evidence/quiz): Graded questions, one at a time.
- [Visit evidence](https://dashboard.adquest.io/docs/quest-evidence/visit): Attribute a visit.
- [Reach a target evidence](https://dashboard.adquest.io/docs/quest-evidence/event): A goal on an activity your server reports.
- [Profile evidence](https://dashboard.adquest.io/docs/quest-evidence/profile): Send the saved profile.
- [Referral evidence](https://dashboard.adquest.io/docs/quest-evidence/referral): Report signups with the inviter’s code.
- [Streak evidence](https://dashboard.adquest.io/docs/quest-evidence/streak): A day counts when your server reports it.
- [Custom evidence](https://dashboard.adquest.io/docs/quest-evidence/custom): A URL callback or a manual review.
- [Multi-step evidence](https://dashboard.adquest.io/docs/quest-evidence/multi-step): Evidence per step, one reward.
- [Multi-step quests guide](https://dashboard.adquest.io/docs/multi-step-quests): Start here if multi-step feels complicated.
