> ## Documentation Index
> Fetch the complete documentation index at: https://help.doozy.live/llms.txt
> Use this file to discover all available pages before exploring further.

# Calling the API from Make

> Learn how to integrate Doozy API with Make (formerly Integromat)

<Warning>
  The Doozy API is currently in **closed beta**. To request access, please email [hello@doozy.live](mailto:hello@doozy.live).
</Warning>

This guide walks you through calling the Doozy API from [Make](https://www.make.com) (formerly Integromat) to automate your reporting workflows.

## Prerequisites

Before you begin, ensure you have:

* A Doozy account with API access enabled (see [Authentication](/api/authentication))
* A Doozy API key
* A Make account

## Setting Up the HTTP Module

Make doesn't have a native Doozy integration, so you'll use the **HTTP** module to make API requests.

<Steps>
  <Step title="Create a New Scenario">
    Log in to Make and click **Create a new scenario**.
  </Step>

  <Step title="Add the HTTP Module">
    Click the **+** button and search for **HTTP**. Select **Make a request**.
  </Step>

  <Step title="Configure the Request">
    Set up the HTTP module with the following settings:

    | Field       | Value                               |
    | ----------- | ----------------------------------- |
    | **URL**     | `https://api.doozy.live/v1/quizzes` |
    | **Method**  | `GET`                               |
    | **Headers** | Add a header (see below)            |

    Add a header:

    * **Name:** `x-api-key`
    * **Value:** Your Doozy API key (`dzy_xxxxxxxx_...`)
  </Step>

  <Step title="Test the Connection">
    Click **Run once** to test the connection. You should see a list of your quizzes in the response.
  </Step>
</Steps>

## Example: Fetching Quiz Results

To fetch detailed results for a specific quiz:

| Field       | Value                                               |
| ----------- | --------------------------------------------------- |
| **URL**     | `https://api.doozy.live/v1/quizzes/{quizId}/report` |
| **Method**  | `GET`                                               |
| **Headers** | `x-api-key: your-api-key`                           |

Replace `{quizId}` with the actual quiz ID from your Doozy dashboard.

## Handling Pagination

For endpoints that return multiple items, you may need to handle pagination:

<Steps>
  <Step title="First Request">
    Make the initial request with your desired `limit` parameter:

    ```
    https://api.doozy.live/v1/quizzes?limit=25
    ```
  </Step>

  <Step title="Check for More Results">
    Check if the response has more items by looking at the `has_more` field.
  </Step>

  <Step title="Fetch Next Page">
    If there are more results, use the last item's ID as the `starting_after` parameter:

    ```
    https://api.doozy.live/v1/quizzes?limit=25&starting_after=quiz_abc123
    ```
  </Step>
</Steps>

<Tip>
  Use Make's **Iterator** and **Repeater** modules to loop through paginated results automatically.
</Tip>

## Storing Your API Key Securely

Instead of hardcoding your API key, use Make's **Data Stores** or **Variables** to store it securely:

1. Go to **More** → **Keys**
2. Create a new key with your API key value
3. Reference this key in your HTTP module headers

## Error Handling

Add a **Error handler** route to your scenario to handle API errors gracefully:

* **429 errors**: Add a **Sleep** module and retry
* **401 errors**: Check your API key is valid
* **404 errors**: Verify the resource ID exists

See [Error Handling](/api/errors) for a complete list of error codes.

## Example Workflow: Weekly Quiz Report to Google Sheets

<Steps>
  <Step title="Schedule Trigger">
    Add a **Schedule** trigger to run weekly.
  </Step>

  <Step title="Fetch Quiz Report">
    Use the HTTP module to fetch `/v1/quizzes/{quizId}/report`.
  </Step>

  <Step title="Parse Response">
    Use the **JSON** module to parse the response data.
  </Step>

  <Step title="Add to Google Sheets">
    Use the **Google Sheets** module to append the data to your spreadsheet.
  </Step>
</Steps>
