{"id":249,"date":"2022-12-04T07:46:44","date_gmt":"2022-12-04T07:46:44","guid":{"rendered":"https:\/\/quiz.seeksolution.in\/help\/?p=249"},"modified":"2022-12-04T07:46:44","modified_gmt":"2022-12-04T07:46:44","slug":"249","status":"publish","type":"post","link":"https:\/\/quiz.seeksolution.in\/help\/?p=249","title":{"rendered":""},"content":{"rendered":"\n<p>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.<\/p>\n\n\n\n<p>We also provide webhooks that can be used to capture several of the common events that occur within the platform.<\/p>\n\n\n\n<h4><strong>Getting started<\/strong><\/h4>\n\n\n\n<p>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&nbsp;<strong>Create Key<\/strong>&nbsp;button:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.flexiquiz.com\/Images\/Help\/create-key.jpg\" alt=\"Create key\"\/><\/figure>\n\n\n\n<p><em><strong>Tip:<\/strong>&nbsp;For security the API screen is only accessible by the user that originally created the account.<\/em><\/p>\n\n\n\n<p>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.<\/p>\n\n\n\n<p>When making any calls to the API the key has to be included as a header called X-API-KEY:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ curl --request GET --url https:\/\/www.flexiquiz.com\/api\/v1\/quizzes -H \"X-API-KEY: <em>{your_api_key}<\/em>\"<\/code><\/pre>\n\n\n\n<p><em><strong>Tip:<\/strong>&nbsp;This curl call will return a json array of quizzes within your account<\/em><\/p>\n\n\n\n<p>For a full list of all API functions please review our&nbsp;<a href=\"https:\/\/www.flexiquiz.com\/Help\/api\/reference\">API reference<\/a>.<\/p>\n\n\n\n<h4><strong>Webhooks<\/strong><\/h4>\n\n\n\n<p>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.<\/p>\n\n\n\n<p>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:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.flexiquiz.com\/Images\/Help\/create-new-webhook.jpg\" alt=\"Create webhook\"\/><\/figure>\n\n\n\n<p>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.<\/p>\n\n\n\n<p>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&nbsp;<a href=\"https:\/\/www.flexiquiz.com\/Help\/api\/webhooks\">webhook guide<\/a>.<\/p>\n\n\n\n<h4><strong>API Logs<\/strong><\/h4>\n\n\n\n<p>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:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.flexiquiz.com\/Images\/Help\/api-logs.jpg\" alt=\"API logs\"\/><\/figure>\n\n\n\n<p><em><strong>Tip:<\/strong>&nbsp;When an API key is deleted all logs records are also deleted<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>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. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_mi_skip_tracking":false},"categories":[1],"tags":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/quiz.seeksolution.in\/help\/index.php?rest_route=\/wp\/v2\/posts\/249"}],"collection":[{"href":"https:\/\/quiz.seeksolution.in\/help\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/quiz.seeksolution.in\/help\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/quiz.seeksolution.in\/help\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/quiz.seeksolution.in\/help\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=249"}],"version-history":[{"count":2,"href":"https:\/\/quiz.seeksolution.in\/help\/index.php?rest_route=\/wp\/v2\/posts\/249\/revisions"}],"predecessor-version":[{"id":365,"href":"https:\/\/quiz.seeksolution.in\/help\/index.php?rest_route=\/wp\/v2\/posts\/249\/revisions\/365"}],"wp:attachment":[{"href":"https:\/\/quiz.seeksolution.in\/help\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=249"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/quiz.seeksolution.in\/help\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=249"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/quiz.seeksolution.in\/help\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=249"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}