{"id":514,"date":"2022-03-18T15:19:56","date_gmt":"2022-03-18T14:19:56","guid":{"rendered":"http:\/\/help-e.loops.education\/?p=514"},"modified":"2022-03-28T18:06:30","modified_gmt":"2022-03-28T16:06:30","slug":"webhook-2","status":"publish","type":"post","link":"https:\/\/help-e.loops.education\/index.php\/en\/2022\/03\/18\/webhook-2\/","title":{"rendered":"Webhook"},"content":{"rendered":"\n<p><strong>Webhook<\/strong><\/p>\n\n\n\n<p>Loops can deliver real-time data packages of events from activities in your organization, to enable custom integrations with other systems.<\/p>\n\n\n\n<p>As an example, Loops can inform your implementation whenever a loop is started in your organization. To implement a listener to Loops webhooks isn&#8217;t that complex, but do require some programming.<\/p>\n\n\n\n<p>The delivery is made as a POST-request with a JSON-object as body. As multiple events can be delivered at the same time the object is defined as a list of events to accommodate this.<\/p>\n\n\n\n<p><strong>Events<\/strong><\/p>\n\n\n\n<p>The event object consists of an object with two keys, &#8221;type&#8221; and &#8221;data&#8221;.<\/p>\n\n\n\n<p>The following types of events are handled by Loops:<\/p>\n\n\n\n<p>* Whenever a loop is started<\/p>\n\n\n\n<p>* Whenever a loop is terminated<\/p>\n\n\n\n<p>* Whenever a loop is revived<\/p>\n\n\n\n<p>* When participants are added to a loop<\/p>\n\n\n\n<p>* When participants are leaving a loop<\/p>\n\n\n\n<p><strong>Example<\/strong><\/p>\n\n\n\n<p>This is an example of a loop that just got started. The loop has two participants.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;\n\u00a0 {\n\u00a0 \u00a0 \"type\": \"SESSION_STARTED\",\n\u00a0 \u00a0 \"data\": {\n\u00a0 \u00a0 \u00a0 \"uuid\": \"7fa00242-52c6-486f-a041-874513dbc0e6\",\n\u00a0 \u00a0 \u00a0 \"name\": \"Digital Tools - Fall 2021\",\n\u00a0 \u00a0 \u00a0 \"loopName\": \"Digital Tools\",\n\u00a0 \u00a0 \u00a0 \"participants\": &#91;\n\u00a0 \u00a0 \u00a0 \u00a0 {\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"userId\": 1,\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"role\": \"owner\",\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"state\": \"invited\",\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"email\": \"teacher@example.com\"\n\u00a0 \u00a0 \u00a0 \u00a0 },\n\u00a0 \u00a0 \u00a0 \u00a0 {\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"userId\": 2,\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"role\": \"pupil\",\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"state\": \"invited\",\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"email\": \"pupil@example.com\"\n\u00a0 \u00a0 \u00a0 \u00a0 },\n\u00a0 \u00a0 \u00a0 ]\n\u00a0 \u00a0 }\n\u00a0 }\n]<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/s3-eu-central-1.amazonaws.com\/euc-cdn.freshdesk.com\/data\/helpdesk\/attachments\/production\/77037435866\/original\/qyJF7OFLqQofK_dSfAQEYhf51giczEZvGg.png?1623682084\" alt=\"\"\/><\/figure>\n\n\n\n<p><strong><a href=\"https:\/\/sendgrid.com\/blog\/whats-webhook\/\">Read more about webhooks<\/a><\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Webhook Loops can deliver real-time data packages of events from activities in your organization, to enable custom integrations with other systems. As an example, Loops can inform your implementation whenever a loop is started in your organization. To implement a listener to Loops webhooks isn&#8217;t that complex, but do require some programming. The delivery is [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[171],"tags":[],"class_list":["post-514","post","type-post","status-publish","format-standard","hentry","category-advanced-settings"],"_links":{"self":[{"href":"https:\/\/help-e.loops.education\/index.php\/wp-json\/wp\/v2\/posts\/514","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/help-e.loops.education\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/help-e.loops.education\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/help-e.loops.education\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/help-e.loops.education\/index.php\/wp-json\/wp\/v2\/comments?post=514"}],"version-history":[{"count":2,"href":"https:\/\/help-e.loops.education\/index.php\/wp-json\/wp\/v2\/posts\/514\/revisions"}],"predecessor-version":[{"id":610,"href":"https:\/\/help-e.loops.education\/index.php\/wp-json\/wp\/v2\/posts\/514\/revisions\/610"}],"wp:attachment":[{"href":"https:\/\/help-e.loops.education\/index.php\/wp-json\/wp\/v2\/media?parent=514"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/help-e.loops.education\/index.php\/wp-json\/wp\/v2\/categories?post=514"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/help-e.loops.education\/index.php\/wp-json\/wp\/v2\/tags?post=514"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}