Help / API Overview

FlexiQuiz provides a RESTful API which allows you to directly access several common features of the platform from your own software and scripts. All API calls are over HTTPs and will return a json response.

We also provide webhooks that can be used to capture several of the common events that occur within the platform.


Getting started

To make any API calls you will require a unique API key. This can be generated from the Settings screen, once you logged in, by pressing the API tab and then pressing the Create Key button:

Create key

Tip: For security the API screen is only accessible by the user that originally created the account.


Once generated there are options to delete or roll the API key. When you select roll key then the existing key will no longer be valid and a new key will be generated and displayed. Never share your api key and if you suspect a key leak then create a new key using the roll key button.

When making any calls to the API the key has to be included as a header called X-API-KEY:

$ curl --request GET --url https://www.flexiquiz.com/api/v1/quizzes -H "X-API-KEY: {your_api_key}"

Tip: This curl call will return a json array of quizzes within your account

For a full list of all API functions please review our API reference.



Webhooks

Webhooks provide a mechanism for receiving notifications when an event happens on the FlexiQuiz. An example is the response.submitted webhook which will send an notification to your set URL whenever a quiz is submitted, the notification will include the details and results of from the quiz.

You can create a webhook by press the Create Webhook button on the API screen. You will then be displayed a dialog for entering your endpoint and selecting the events to capture:

Create webhook

You can use the same endpoint for capturing several events or just a single event, this allows you to use different endpoints for different events.

When setting up a webhook event you can optionally enter a Shared secret. This will be used to generate a HMAC-SHA256 signature value that will be passed with each call. For more details on the signature view our webhook guide.



API Logs

All API requests containing a valid API key are logged and can be viewed within the API screen. There is a maximum of the last 1000 requests displayed:

API logs

Tip: When an API key is deleted all logs records are also deleted



Back