{"info":{"_postman_id":"81579922-e0b4-4e86-8961-7df68a020c68","name":"Webhooks","description":"<html><head></head><body><p>The Digitaleo REST APIs use webhooks for event notification. Webhooks are HTTP callbacks that contains notification messages for events. After you configure a webhook listener for your app, you can create a webhook, which subscribes the webhook listener for your app to specific events. The notifications namespace contains resource collections for webhooks.</p>\n<h1 id=\"anatomy-of-a-webhook\">Anatomy of a webhook</h1>\n<p>After you configure a webhook subscription, the events that you specified will trigger a webhook notification each time they occur. This notification contains a JSON payload, and HTTP headers that provide context. For example, the orders/create webhook includes the following headers:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>X-Digitaleo-Event: contact.message.click\nX-Digitaleo-Timestamp: 1492774577\nX-Digitaleo-Signature: XWmrwMey6OsLMeiZKwP4FppHH3cmAiiJJAweH5Jo4bM=\nX-Digitaleo-Subscription: ad3f59688dddd4c4cc4cb75fbe65f5a2\nX-Digitaleo-Event-Id: bb3f59688dddd4c4cc4cb77fbe65f5a3\n</code></pre><p>Some HTTP headers are particularly useful for your app. For example, X-Digitaleo-Signature is used to verify webhooks</p>\n<p>Webhook subscriptions are scoped only to the app that they're registered to. This means that when a webhook subscription is registered to an app, other apps can't view, modify, or delete it. For more information about how to authenticate webhooks, see Using webhooks. For general information about authentication, see the OAuth documentation.</p>\n<h2 id=\"payload-body\">Payload body</h2>\n<p>When you subscribe to an event, you will always receive a collection of events with at least one event.</p>\n<p>The payload is a <code>JSON</code> array like so :</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-jsonc\">[\n    { /* event */ },\n    { /* event */ },\n    { /* event */ }\n]\n</code></pre>\n<h1 id=\"batching\">Batching</h1>\n<p>You will receive multiple notifications in a single request. The payload will contain maximum 50 notifications. We will send multiple notifications only when a lot of events have occurred within a short period of time. For example, if you've subscribed to new contacts and a customer imports a large number of contacts, we will send you the notifications for these imported contacts in batches and not one-per-request. </p>\n<p>Otherwise, if within 10 minutes after processing an event, there are not enough events produced to fulfill completely a request, we will send a less filled one, e.g at given time T an contact updated event is produced, at given time + 10 minutes no other event has been generated, we will send you a request containing only information about previous contact updated event. </p>\n<h1 id=\"order\">Order</h1>\n<p>We do not guarantee that you get these notifications in the order they occurred. Please use the eventTimestamp property for each notification to determine when the notification occurred.</p>\n<h1 id=\"uniqueness\">Uniqueness</h1>\n<p>We do not guarantee that you will only get a single notification for an event. Though this should be rare, it is possible that we will send you the same notification multiple times.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[{"content":"Anatomy of a webhook","slug":"anatomy-of-a-webhook"},{"content":"Batching","slug":"batching"},{"content":"Order","slug":"order"},{"content":"Uniqueness","slug":"uniqueness"}],"owner":"6740351","collectionId":"81579922-e0b4-4e86-8961-7df68a020c68","publishedId":"S17oxppy","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2019-11-19T15:50:01.000Z"},"item":[{"name":"Authentication","item":[{"name":"Obtain access token","event":[{"listen":"test","script":{"id":"3687fb02-708b-4d14-b028-18a0250a5897","exec":["const data = JSON.parse(responseBody);\r","\r","pm.environment.set(\"token\", data.access_token);"],"type":"text/javascript"}}],"id":"7d897c59-2f05-443f-9cd0-eca0b5cf49bc","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"},{"key":"Accept","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"client_id\": \"{{clientId}}\",\n\t\"client_secret\": \"{{clientSecret}}\",\n\t\"grant_type\": \"client_credentials\"\n}"},"url":"https://oauth.messengeo.net/token","description":"<p>This resource must be used to retrieve an access token in order to manage webhooks on this API. This is a oAuth2 request using <code>client_credentials</code> grant type.</p>\n<h1 id=\"response\">Response</h1>\n<p>It will respond with a <code>200 Ok</code> if it succeed. Here's a response example :</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"access_token\": \"...\",\n    \"expires_in\": 3600,\n    \"token_type\": \"bearer\",\n    \"scope\": \"basic\"\n}\n\n</code></pre>\n","urlObject":{"protocol":"https","path":["token"],"host":["oauth","messengeo","net"],"query":[],"variable":[]}},"response":[{"id":"3d3c3e1f-806e-4b51-a645-5d5ba6646ebb","name":"On success","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"},{"key":"Accept","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"client_id\": \"{{clientId}}\",\n\t\"client_secret\": \"{{clientSecret}}\",\n\t\"grant_type\": \"client_credentials\"\n}"},"url":"https://oauth.messengeo.net/token"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"access_token\": \"YOUR ACCOUNT ACCESS TOKEN HERE\",\n    \"expires_in\": 3600,\n    \"token_type\": \"bearer\",\n    \"scope\": \"basic\"\n}"}],"_postman_id":"7d897c59-2f05-443f-9cd0-eca0b5cf49bc"}],"id":"f8925124-40e8-4097-9e9a-cc81dfe7ad9e","_postman_id":"f8925124-40e8-4097-9e9a-cc81dfe7ad9e","description":""},{"name":"Subscription resource","item":[{"name":"Subscribe a webhook","id":"2e5c5ec2-071d-4bc2-92db-eec1c5b26821","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","type":"text","value":"Bearer {{token}}"},{"key":"Content-Type","name":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"}],"body":{"mode":"formdata","formdata":[{"key":"url","value":"","description":"<p><strong>string</strong> <em>required  for webhook type</em><br /> URL  configured to listen on incoming POST notification messages containing event payload.</p>\n","type":"text"},{"key":"event","value":"","description":"<p><strong>string</strong> <em>required</em> <br />Event's label you are subscribing to.</p>\n","type":"text"},{"key":"enabled","value":"","description":"<p><strong>boolean</strong> <em>optional</em> <br />True or False depending on whether you want your subscription to be active right after the creation. <br /> If omitted, the value is True</p>\n","type":"text"},{"key":"maxBatchSize","value":"","description":"<p><strong>integer</strong> <em>optional</em> <br />Maximum notifications by payload (50 by default)</p>\n","type":"text"},{"key":"timeout","value":"","description":"<p><strong>integer</strong> <em>optional</em> <br /> Timeout in seconds for the webhook HTTP request (60 by default)</p>\n","type":"text"},{"key":"secret","value":"","description":"<p><strong>string</strong> <em>optional</em> <br /> The secret to encrypt the payload. By default, it will generate a secret and return it. <br />See <strong>Validity of a webhook</strong> section</p>\n","type":"text"},{"key":"listenAffiliates","value":"","description":"<p><strong>boolean</strong> <em>optional</em> <br /> True if the subscription should be triggered for all affiliates (False by default), none impact if the user has no affiliate</p>\n","type":"text"},{"key":"alertEmails","value":"","description":"<p><strong>array</strong> <em>optional</em> <br />List of the e-mail adress to contact when a webhook delivery webhook happend</p>\n","type":"text"},{"key":"type","value":"","description":"<p><strong>string</strong> <em>optional</em> <br /> webhook or polling, it depends the way you want to collect data \n<br /> if omitted the value is webhook</p>\n","type":"text","uuid":"0bf28c83-5eef-47e6-8cc8-fb43f23bfff1"}]},"url":"https://api.digitaleo.com/webhooks/v1/subscriptions","description":"<p>Subscribes your webhook listener to events.</p>\n<hr />\n","urlObject":{"protocol":"https","path":["webhooks","v1","subscriptions"],"host":["api","digitaleo","com"],"query":[],"variable":[]}},"response":[{"id":"bdb6490a-0b21-4733-a858-d4353cf271b4","name":"Create a subscription","originalRequest":{"method":"POST","header":[{"key":"Authorization","type":"text","value":"Bearer {{token}}"},{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\"url\": \"https://example.com/example_webhook\",\"event\": \"contact.message.click\"}","options":{"raw":{"language":"json"}}},"url":"https://api.digitaleo.com/webhooks/v1/subscriptions"},"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n\t\"id\":\"5c866706d16a5d4ee33b7d73\",\n\t\"secret\":\"myOwnSecret\"\n}"},{"id":"8f12108c-1e9d-4d7a-a7b6-0e76b2418b93","name":"Create a custom subscription","originalRequest":{"method":"POST","header":[{"key":"Authorization","type":"text","value":"Bearer {{token}}"},{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\"url\": \"https://example.com/custom_webhook\",\"event\": \"contact.message.click\",\"maxBatchSize\": \"10\",\"timeout\": \"90\",\"secret\": \"myOwnSecret\"}","options":{"raw":{"language":"json"}}},"url":"https://api.digitaleo.com/webhooks/v1/subscriptions"},"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\"id\":\"5c866706d16a5d4ee33b7d73\",\"secret\":\"myOwnSecret\"}"},{"id":"2ba73cf0-c4fd-47e9-9ea8-6191e48a12a5","name":"Create a network subscription","originalRequest":{"method":"POST","header":[{"key":"Authorization","type":"text","value":"Bearer {{networkUsertoken}}"},{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\"url\": \"https://example.com/example_webhook\",\"event\": \"contact.message.click\",\"listenAffiliates\": true}","options":{"raw":{"language":"json"}}},"url":"https://api.digitaleo.com/webhooks/v1/subscriptions"},"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n\t\"id\":\"5c866706d16a5d4ee33b7d73\",\n\t\"secret\":\"randomGeneratedSecret\"\n}"},{"id":"412b8e17-a64d-46c0-8fca-f89d3e684bc2","name":"Subscribe a webhook","originalRequest":{"method":"POST","header":[{"key":"Authorization","type":"text","value":"Bearer {{token}}"},{"key":"Content-Type","name":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"}],"body":{"mode":"formdata","formdata":[{"key":"url","value":"","description":"**string** *required*<br /> URL  configured to listen on incoming POST notification messages containing event payload.","type":"text"},{"key":"event","value":"","description":"**string** *required* <br />Event's label you are subscribing to.","type":"text"},{"key":"enabled","value":"","description":"**boolean** *optional* <br />True or False depending on whether you want your subscription to be active right after the creation. <br /> If omitted, the value is True","type":"text"},{"key":"maxBatchSize","value":"","description":"**integer** *optional* <br />Maximum notifications by payload (50 by default)","type":"text"},{"key":"timeout","value":"","description":"**integer** *optional* <br/> Timeout in seconds for the webhook HTTP request (60 by default)","type":"text"},{"key":"secret","value":"","description":"**string** *optional* <br/> The secret to encrypt the payload. By default, it will generate a secret and return it. <br/>See **Validity of a webhook** section","type":"text"},{"key":"listenAffiliates","value":"","description":"**boolean** *optional* <br/> True if the webhook should be triggered for all affiliates (False by default), none impact if the user has no affiliate","type":"text"},{"key":"alertEmails","value":"","description":"**array** *optional* <br />List of the e-mail adress to contact when a webhook delivery webhook happend","type":"text"}]},"url":"https://api.digitaleo.com/webhooks/v1/subscriptions"},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":null}],"_postman_id":"2e5c5ec2-071d-4bc2-92db-eec1c5b26821"},{"name":"List all subscriptions","id":"d631bee0-8db2-4eb0-8672-8c3635b95007","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","type":"text","value":"Bearer {{token}}"}],"url":"https://api.digitaleo.com/webhooks/v1/subscriptions","description":"<p>Read all subscriptions</p>\n<hr />\n<h1>Response</h1>\n\n<p>A successful request returns the HTTP 200 OK status code.</p>\n","urlObject":{"protocol":"https","path":["webhooks","v1","subscriptions"],"host":["api","digitaleo","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"d631bee0-8db2-4eb0-8672-8c3635b95007"},{"name":"Unsubscribe a webhook","id":"a9c65ed9-e7cc-4954-9319-d2e67368ea68","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"Authorization","type":"text","value":"Bearer {{token}}"}],"body":{"mode":"formdata","formdata":[]},"url":"https://api.digitaleo.com/webhooks/v1/subscriptions/{{id}}","description":"<h1>Response</h1>\n\n<p>A successful request returns the HTTP 204 No Content status code with no JSON response body.</p>\n<h1>Request</h1>","urlObject":{"protocol":"https","path":["webhooks","v1","subscriptions","{{id}}"],"host":["api","digitaleo","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"a9c65ed9-e7cc-4954-9319-d2e67368ea68"}],"id":"6b87dab3-84e8-45c5-a931-3e29b4e40224","description":"<p><em>List of properties of the subscription resource</em></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Property</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>id</td>\n<td>Identifier of the subscription</td>\n</tr>\n<tr>\n<td>url</td>\n<td>The URL that is configured to listen on localhost for incoming POST notification messages that contain event information.</td>\n</tr>\n<tr>\n<td>event</td>\n<td>The event type subscribed</td>\n</tr>\n<tr>\n<td>enabled</td>\n<td>If True, we will collect and send data to your endpoint</td>\n</tr>\n<tr>\n<td>status</td>\n<td>A string that represents the current status of the subscription : ACTIVE / SUSPENDED</td>\n</tr>\n<tr>\n<td>maxBatchSize</td>\n<td>The number of maximum notifications included in a webhook payload</td>\n</tr>\n<tr>\n<td>timeout</td>\n<td>The timeout used when trying to reach your endpoint</td>\n</tr>\n<tr>\n<td>secret</td>\n<td>The secret used to encrypt subscription payload. See <strong>Validity of a webhook</strong> section</td>\n</tr>\n<tr>\n<td>listenAffiliates</td>\n<td>True if the webhook should be triggered for affiliates events</td>\n</tr>\n<tr>\n<td>alertEmails</td>\n<td>A list of e-mail adresses that will get notified if a problem is detected with your endpoint</td>\n</tr>\n<tr>\n<td>type</td>\n<td>A string that represents the type of the subscription: webhook / polling</td>\n</tr>\n</tbody>\n</table>\n</div><p>Type:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Type</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>webhook</td>\n<td>default mode in which you register a callback URL, and the API will automatically send an HTTP POST request to your URL each time a new event occurs.  <br />  <br />This method allows your application to receive notifications in real-time.</td>\n</tr>\n<tr>\n<td>polling</td>\n<td>mode in which your application calls the API endpoint to retrieve a batch of registered events.  <br />  <br />This approach requires your system to make periodic HTTP requests to check for new events, rather than waiting for the API to notify you.</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Status</strong>:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Status</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>ACTIVE</td>\n<td>Everything seems to be OK</td>\n</tr>\n<tr>\n<td>SUSPENDED</td>\n<td>When multiple tries to reach your URL have failed, we mark your subscription as SUSPENDED. A notification will be sent to all emails set with the <em><strong>alertEmails</strong></em> property. We'll continue to collect all data until you fix the problem. See <strong>Enable a subscription</strong>.</td>\n</tr>\n</tbody>\n</table>\n</div>","event":[{"listen":"prerequest","script":{"id":"e5c94e94-e0a6-49bf-af60-c02d22a34a27","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"4f4b7abc-b687-4428-8928-a407752dcfda","type":"text/javascript","exec":[""]}}],"_postman_id":"6b87dab3-84e8-45c5-a931-3e29b4e40224"},{"name":"Updating your subscription","item":[{"name":"Enable a subscription","id":"9c0c58e7-649d-426d-b76e-ca5547f33159","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"Authorization","value":"Bearer {{token}}"},{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"enabled\": true\n}"},"url":"https://api.digitaleo.com/webhooks/v1/subscriptions/{{id}}","description":"<p>Be sure to set the Content-Length header to zero</p>\n","urlObject":{"protocol":"https","path":["webhooks","v1","subscriptions","{{id}}"],"host":["api","digitaleo","com"],"query":[],"variable":[]}},"response":[{"id":"0e34f3ae-cab3-4287-a320-a438ba8cbe50","name":"Enable a webhook","originalRequest":{"method":"PUT","header":[{"key":"Authorization","value":"Bearer {{token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\"enabled\": true}","options":{"raw":{"language":"json"}}},"url":"https://api.digitaleo.com/webhooks/v1/subscriptions/{{id}}"},"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":""}],"_postman_id":"9c0c58e7-649d-426d-b76e-ca5547f33159"},{"name":"Disable a subscription","id":"d3e8ccc1-d721-4849-9b81-2112196b5511","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"Authorization","value":"Bearer {{token}}"},{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"enabled\": false\n}"},"url":"https://api.digitaleo.com/webhooks/v1/subscriptions/{{id}}","description":"<p>Be sure to set the Content-Length header to zero</p>\n","urlObject":{"protocol":"https","path":["webhooks","v1","subscriptions","{{id}}"],"host":["api","digitaleo","com"],"query":[],"variable":[]}},"response":[{"id":"9e3dee15-4c64-4259-ab40-3b92df688a1e","name":"Disable a webhook","originalRequest":{"method":"PUT","header":[{"key":"Authorization","value":"Bearer {{token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\"enabled\": false}","options":{"raw":{"language":"json"}}},"url":"https://api.digitaleo.com/webhooks/v1/subscriptions/{{id}}"},"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":""}],"_postman_id":"d3e8ccc1-d721-4849-9b81-2112196b5511"},{"name":"Update the url","id":"4d531ec1-1c4e-4763-9745-b465cc12a38e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"Authorization","value":"Bearer {{token}}"},{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"url\": \"https://www.my-new-url.com\"\n}"},"url":"https://api.digitaleo.com/webhooks/v1/subscriptions/{{id}}","description":"<h1 id=\"warning-⚠️\">Warning ⚠️</h1>\n<p><strong>We'll do our best to avoid losing notifications during the update but we cannot ensure it. To minize the risk, we recommend you to keep up for few minutes your old endpoint.</strong></p>\n","urlObject":{"protocol":"https","path":["webhooks","v1","subscriptions","{{id}}"],"host":["api","digitaleo","com"],"query":[],"variable":[]}},"response":[{"id":"82a66be9-3fc9-44e2-9aed-0fad67026b2b","name":"Update the url","originalRequest":{"method":"PUT","header":[{"key":"Authorization","type":"text","value":"Bearer {{token}}"},{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\"url\":\"https://www.my-new-url.com\"}","options":{"raw":{"language":"json"}}},"url":"https://api.digitaleo.com/webhooks/v1/subscriptions/{{id}}"},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":null}],"_postman_id":"4d531ec1-1c4e-4763-9745-b465cc12a38e"},{"name":"Update alert emails","id":"20cdeb1e-f120-43b1-b9ff-9d19065feccc","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"Authorization","value":"Bearer {{token}}"},{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"alertEmails\": [ // Take care, you should set all emails you want to use. Not only emails you want to add to the subscriptions.\n        \"jhon.doe@email.com\",\n        \"jane.doe@email.com\"\n    ]\n}"},"url":"https://api.digitaleo.com/webhooks/v1/subscriptions/{{id}}","description":"<p>When updating subscription's alert emails, take care to set all emails you want to use. Not only new ones.</p>\n<p>The update will erase old emails with new one.</p>\n","urlObject":{"protocol":"https","path":["webhooks","v1","subscriptions","{{id}}"],"host":["api","digitaleo","com"],"query":[],"variable":[]}},"response":[{"id":"6e60e37f-7b82-474b-ba52-d291d2eab09a","name":"Update subscription's alert emails","originalRequest":{"method":"PUT","header":[{"key":"Authorization","value":"Bearer {{token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"alertEmails\": [\"jhon.doe@email.com\", \"jane.doe@email.com\"]\n}","options":{"raw":{"language":"json"}}},"url":"https://api.digitaleo.com/webhooks/v1/subscriptions/{{id}}"},"status":"No Content","code":204,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":null}],"_postman_id":"20cdeb1e-f120-43b1-b9ff-9d19065feccc"}],"id":"83d3d932-3150-4fa9-8191-4f3eee60b5db","event":[{"listen":"prerequest","script":{"id":"e5c94e94-e0a6-49bf-af60-c02d22a34a27","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"4f4b7abc-b687-4428-8928-a407752dcfda","type":"text/javascript","exec":[""]}}],"_postman_id":"83d3d932-3150-4fa9-8191-4f3eee60b5db","description":""},{"name":"Error, failure and timeout","item":[],"id":"c91c5be1-08ea-4042-ad9f-d64772710a51","description":"<h2 id=\"what-is-considered-a-delivery-failure\">What is considered a delivery failure?</h2>\n<p>Digitaleo will consider the following cases to be failures:</p>\n<ul>\n<li>Digitaleo was unable to connect to your Webhook Endpoint (possible reasons include but are not limited to: DNS failure, a network failure, or a firewall issue).</li>\n<li>Your Webhook Endpoint does not respond within the configured timeout duration </li>\n<li>Your Webhook Endpoint returned a HTTP status code that satisfies: 500 &lt;= status_code &lt; 600 (i.e. a 5XX).</li>\n</ul>\n<p><strong>Note that this means that bad requests (4XX) are not considered as failures, and will not be retried (naturally, neither are 2XX responses).</strong></p>\n<h2 id=\"timeouts\">Timeouts</h2>\n<p>Timeouts may be configured on a per-Webhook-Configuration basis. </p>\n<p>Delivery of a Webhook Notification will fail with a timeout error if:</p>\n<ul>\n<li>Digitaleo is unable to connect to your Webhook Endpoint within the timeout duration.</li>\n<li>Your Webhook Endpoint does not start sending its response within the timeout duration.</li>\n</ul>\n<h1 id=\"when-are-webhooks-retried\">When are Webhooks retried?</h1>\n<p>If your retry policy specifies a non-zero number of retries, Digitaleo will attempt to re-deliver Webhook Notifications whose delivery fails.</p>\n<p>After a failure, Digitaleo will retry deliver of a Webhook after a cool-down duration. That duration is proportional to the number of failed attempts.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Retry number</th>\n<th>Interval (relative to the last retry)</th>\n<th>Interval (relative to original attempt)</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>1</td>\n<td>2 minutes after the failure</td>\n<td>2 minutes after the failure</td>\n</tr>\n<tr>\n<td>2</td>\n<td>6 minutes after the previous retry</td>\n<td>8 minutes after the failure</td>\n</tr>\n<tr>\n<td>3</td>\n<td>30 minutes after the previous retry</td>\n<td>38 minutes after the failure</td>\n</tr>\n<tr>\n<td>4</td>\n<td>1 hour after the previous retry</td>\n<td>1h 38 minutes after the failure</td>\n</tr>\n<tr>\n<td>5</td>\n<td>5 hours after the previous retry</td>\n<td>6h 38 minutes after the failure</td>\n</tr>\n<tr>\n<td>6</td>\n<td>18 hours after the previous retry</td>\n<td>1d 0h 38 minutes after the failure</td>\n</tr>\n<tr>\n<td>7</td>\n<td>1 day after the previous retry</td>\n<td>2d 0h 38 minutes after the failure</td>\n</tr>\n<tr>\n<td>8</td>\n<td>2 days after the previous retry</td>\n<td>4d 6h 38 minutes after the failure</td>\n</tr>\n</tbody>\n</table>\n</div>","event":[{"listen":"prerequest","script":{"id":"d212f07a-9076-4030-9d42-b04930abd518","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"324aadd0-749f-451b-a252-032caf2f9b84","type":"text/javascript","exec":[""]}}],"_postman_id":"c91c5be1-08ea-4042-ad9f-d64772710a51"},{"name":"Validity of a webhook","item":[],"id":"0485f1f4-77e4-4d84-89ff-759fbb737bbb","description":"<p>Digitaleo signs the webhook events it sends to your endpoint, allowing you to validate that they were not sent by a third-party.</p>\n<p>Creating a webhook endpoint on your server is no different from creating any page on your website. With PHP for example, you might create a new .php file on your server.</p>\n<p>Each Digitaleo webhook includes X-Digitaleo-Signature header which contains the request's signature string and X-Digitaleo-Timestamp header which contains the request timestamp.</p>\n<p>Here's an example POST request sent by Cloudinary:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>POST /my_notification_endpoint HTTP/1.1\nX-Digitaleo-Timestamp: 1368881627\nX-Digitaleo-Signature: cEUXAFwoe6iERtJ8BKPhCMivuK+6ChcF9xd+yPwtXhA=\nContent-Type: application/json\n</code></pre><h1 id=\"checking-signature\">Checking signature</h1>\n<h2 id=\"step-1-prepare-the-signed_payload-string\">Step 1: Prepare the signed_payload string</h2>\n<p>This is achieved by concatenating:</p>\n<ul>\n<li><p>The request body </p>\n</li>\n<li><p>The timestamp (X-Digitaleo-Timestamp)</p>\n<p>  $signed_payload = $upload_response . $headers[\"X-Digitaleo-Timestamp\"];</p>\n</li>\n</ul>\n<h2 id=\"step-2-determine-the-expected-signature\">Step 2: Determine the expected signature</h2>\n<p>Compute a HMAC with the SHA256 hash function, using the webhook secret as the key and the signed_payload string as the message.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>base64_encode(hash_hmac('sha256', $signed_payload, $secret, true));\n</code></pre><h2 id=\"step-3-compare-signatures\">Step 3: Compare signatures</h2>\n<p>Compare the signature in the header (X-Digitaleo-Signature) to the expected signature. If a signatures match, it means that the request is validated :)</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>if (base64_encode(hash_hmac('sha256', $signed_payload, $secret, true)) === $headers['X-Digitaleo-Signature']) {\n    //signatures match\n} \nelse {\n    //signatures NOT match\n}\n</code></pre><h2 id=\"step-4-preventing-replay-attacks\">Step 4: Preventing replay attacks</h2>\n<p>A replay attack is when an attacker intercepts a valid payload and its signature and re-transmits them. To mitigate such attacks, Digitaleo includes a timestamp in the X-Digitaleo-Timestamp header. As this timestamp is part of the signed payload, it is also verified by the signature, so an attacker cannot change the timestamp without invalidating the signature. You can decide to reject the payload if the signature is valid but the timestamp is too old.</p>\n<p>To prevent against timing attacks, compare the request timestamp (X-Digitaleo-Timestamp) to current timestamp.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>if ($headers[\"X-Digitaleo-Timestamp\"] &lt;= strtotime('-2 hours')) {\n    //Signatures match, but older than 2 hours\n} else {\n    //Signatures match, and timestamp\n}\n</code></pre><p>Full PHP code example:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>&lt;?php\n\n    //Read request body\n    $body = file_get_contents('php://input');\n    $api_secret = 'replace_with_real_api_secret';\n\n    //Signature validation\n    if (validateSignature(getallheaders(), $body, $api_secret)) {\n        //Use the response for your needs\n        $resposne = json_decode($body);\n\n    } else {\n        die(\"Validation failed\");\n    }\n\n    function validateSignature($headers, $upload_response, $api_secret)\n    {\n        $signed_payload = $upload_response . $headers[\"X-Digitaleo-Timestamp\"];\n\n        /**\n         * Compute a HMAC with the SHA256 hash function,\n         * using the api secret as the key and the signed_payload\n         * string as the message\n         */\n        if (base64_encode(hash_hmac('sha256', $signed_payload, $api_secret, true)) === $headers['X-Digitaleo-Signature']) {\n\n            //To prevent against timing attacks, we compare the expected signature to each of the received signatures.\n            if ($headers[\"X-Digitaleo-Timestamp\"] &lt;= strtotime('-2 hours')) {\n                //Signatures match, but older than 2 hours\n                return false;\n            } else {\n                //Signatures match, and timestamp\n                return true;\n            }\n        } else {\n            //Signatures NOT match\n            return false;\n        }\n    }\n</code></pre>","_postman_id":"0485f1f4-77e4-4d84-89ff-759fbb737bbb"},{"name":"Events","item":[{"name":"contact.message.open","item":[],"id":"3be6d343-38e8-4a16-920b-e6ddf87b527f","description":"<p>Triggered when an email, a voicemail or a SMS is opened.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>contactId</td>\n<td><em>string</em>  <br />Identifier of the contact</td>\n</tr>\n<tr>\n<td>contactRecipient</td>\n<td><em>string</em>  <br />Recipient who have opened the campaign</td>\n</tr>\n<tr>\n<td>contactDeleted</td>\n<td><em>boolean</em>  <br />Is the contact deleted?</td>\n</tr>\n<tr>\n<td>contactReference</td>\n<td><em>string</em>  <br />Contact reference</td>\n</tr>\n<tr>\n<td>campaignId</td>\n<td><em>string</em>  <br />Campaign's identifier</td>\n</tr>\n<tr>\n<td>campaignName</td>\n<td><em>string</em>  <br />Campaign's name</td>\n</tr>\n<tr>\n<td>campaignType</td>\n<td><em>string</em>  <br />Campaign's type (STANDARD, TRANSACTIONNAL, TRIGGERED)</td>\n</tr>\n<tr>\n<td>messageId</td>\n<td><em>string</em>  <br />Message identifier</td>\n</tr>\n<tr>\n<td>media</td>\n<td><em>string</em>  <br />Media (EMAIL)</td>\n</tr>\n<tr>\n<td>eventTimestamp</td>\n<td><em>int</em>  <br />Opening timestamp</td>\n</tr>\n<tr>\n<td>contractId</td>\n<td><em>string</em>  <br />Identifier of the contract who shot the campaign</td>\n</tr>\n<tr>\n<td>userId</td>\n<td><em>string</em>  <br />Identifier of the user who shot the campaign</td>\n</tr>\n<tr>\n<td>metadata</td>\n<td>Please refer to the <code>metadata</code> section</td>\n</tr>\n</tbody>\n</table>\n</div><pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n    \"contactId\": \"123456789\",\n    \"contactRecipient\": \"michel.dupond@domain.com\",\n    \"contactReference\": \"09fe888ab50bf17757b04ca7f22c76b5\",\n    \"campaignId\": \"138753\",\n    \"campaignName\": \"Les soldes de janvier\",\n    \"campaignType\": \"STANDARD\",\n    \"messageId\": \"12345678\",\n    \"media\": \"EMAIL\",\n    \"eventTimestamp\": 1549912706,\n    \"contractId\": 1234,\n    \"userId\": 567890\n}\n\n</code></pre>","event":[{"listen":"prerequest","script":{"id":"6ea6b346-f9fb-4327-a773-f7908eae3678","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"6634a841-cb7f-411b-be44-e88a5fc31f50","type":"text/javascript","exec":[""]}}],"_postman_id":"3be6d343-38e8-4a16-920b-e6ddf87b527f"},{"name":"contact.message.click","item":[],"id":"6fbe358a-0448-4d9d-a64f-018c4891000d","description":"<p>Triggered when a link is clicked in an email or a SMS.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>contactId</td>\n<td><em>string</em>  <br />Identifier of the contact</td>\n</tr>\n<tr>\n<td>contactRecipient</td>\n<td><em>string</em>  <br />Recipient who have opened the campaign</td>\n</tr>\n<tr>\n<td>contactDeleted</td>\n<td><em>boolean</em>  <br />Is the contact deleted</td>\n</tr>\n<tr>\n<td>contactReference</td>\n<td><em>string</em>  <br />Contact reference</td>\n</tr>\n<tr>\n<td>campaignId</td>\n<td><em>string</em>  <br />Campaign's identifier</td>\n</tr>\n<tr>\n<td>campaignName</td>\n<td><em>string</em>  <br />Campaign's name</td>\n</tr>\n<tr>\n<td>campaignType</td>\n<td><em>string</em>  <br />Campaign's type (STANDARD, TRANSACTIONNAL, TRIGGERED)</td>\n</tr>\n<tr>\n<td>messageId</td>\n<td><em>string</em>  <br />Message identifier</td>\n</tr>\n<tr>\n<td>media</td>\n<td><em>string</em>  <br />Media (EMAIL, SMS)</td>\n</tr>\n<tr>\n<td>eventTimestamp</td>\n<td><em>int</em>  <br />Click timestamp</td>\n</tr>\n<tr>\n<td>contractId</td>\n<td><em>string</em>  <br />Identifier of the contract who shot the campaign</td>\n</tr>\n<tr>\n<td>userId</td>\n<td><em>string</em>  <br />Identifier of the user who shot the campaign</td>\n</tr>\n<tr>\n<td>linkUrl</td>\n<td>URL associated with the link</td>\n</tr>\n<tr>\n<td>linkTitle</td>\n<td>Title of the link. The title is retrieved from the HTML content from the title attribute of the <a href=\"https://null\">tag. If the attribute is not present, the alt attribute is used.</a></td>\n</tr>\n<tr>\n<td>linkHtml</td>\n<td>HTML content of the <a href=\"https://null\">tag</a></td>\n</tr>\n<tr>\n<td>linkPart</td>\n<td>Source of the link: HTML portion or TEXT portion</td>\n</tr>\n<tr>\n<td>linkPosition</td>\n<td>Position of the link in the HTML portion or TEXT portion</td>\n</tr>\n<tr>\n<td>metadata</td>\n<td>Please refer to the <code>metadata</code> section</td>\n</tr>\n</tbody>\n</table>\n</div><pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n    \"contactId\": \"123456789\",\n    \"contactRecipient\": \"michel.dupond@domain.com\",\n    \"contactReference\": \"09fe888ab50bf17757b04ca7f22c76b5\",\n    \"campaignId\": \"138753\",\n    \"campaignName\": \"Les soldes de janvier\",\n    \"campaignType\": \"STANDARD\",\n    \"messageId\": \"12345678\",\n    \"media\": \"EMAIL\",\n    \"eventTimestamp\": 1549912706,\n    \"linkUrl\": \"https://www.site.com/aproduct\",\n    \"linkHtml\": \"&lt;img class=&amp;#x27;preserveHtml&amp;#x27; class=&amp;#x27;preserveHtml&amp;#x27; class=&amp;#x27;preserveHtml&amp;#x27; src=\\\"https://datas.messengeo.net/ad55b6afbe2007c1f5c557d566766caa/a7079415c42688fe8ad08079cda43fa2/monimage.jpg\\\" /&gt;\",\n    \"linkTitle\": \"mon produit\",\n    \"linkPart\": \"HTML\",\n    \"linkPosition\": \"4\",\n    \"contractId\": 1234,\n    \"userId\": 567890\n}\n\n</code></pre>","event":[{"listen":"prerequest","script":{"id":"6ea6b346-f9fb-4327-a773-f7908eae3678","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"6634a841-cb7f-411b-be44-e88a5fc31f50","type":"text/javascript","exec":[""]}}],"_postman_id":"6fbe358a-0448-4d9d-a64f-018c4891000d"},{"name":"contact.message.status","item":[],"id":"9f18d40a-6a1e-4214-98bc-4a31498755f3","description":"<p>Triggered for any status update of a message (delivered, undelivered, ...)</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>contactId</td>\n<td><em>string</em>  <br />Identifier of the contact</td>\n</tr>\n<tr>\n<td>contactRecipient</td>\n<td><em>string</em>  <br />Recipient who have opened the campaign</td>\n</tr>\n<tr>\n<td>contactDeleted</td>\n<td><em>boolean</em>  <br />Is the contact deleted?</td>\n</tr>\n<tr>\n<td>contactReference</td>\n<td><em>string</em>  <br />Contact reference</td>\n</tr>\n<tr>\n<td>campaignId</td>\n<td><em>string</em>  <br />Campaign's identifier</td>\n</tr>\n<tr>\n<td>campaignName</td>\n<td><em>string</em>  <br />Campaign's name</td>\n</tr>\n<tr>\n<td>campaignType</td>\n<td><em>string</em>  <br />Campaign's type (STANDARD, TRANSACTIONNAL, TRIGGERED)</td>\n</tr>\n<tr>\n<td>messageId</td>\n<td><em>string</em>  <br />Message identifier</td>\n</tr>\n<tr>\n<td>media</td>\n<td><em>string</em>  <br />Media (EMAIL, VOICEMAIL, SMS)</td>\n</tr>\n<tr>\n<td>eventTimestamp</td>\n<td><em>int</em>  <br />Click timestamp</td>\n</tr>\n<tr>\n<td>contractId</td>\n<td><em>string</em>  <br />Identifier of the contract who shot the campaign</td>\n</tr>\n<tr>\n<td>userId</td>\n<td><em>string</em>  <br />Identifier of the user who shot the campaign</td>\n</tr>\n<tr>\n<td>codeShort</td>\n<td>Identifiant court du statut:  <br />- ok: The message has been delivered  <br />- ko: The message delivery failed  <br />- no: The status of the message is unkown  <br />- hb: The message is hardbounced</td>\n</tr>\n<tr>\n<td>codeDescription</td>\n<td>Description liée au statut</td>\n</tr>\n<tr>\n<td>metadata</td>\n<td>Please refer to the <code>metadata</code> section</td>\n</tr>\n</tbody>\n</table>\n</div><pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n    \"contactId\": \"123456789\",\n    \"contactRecipient\": \"michel.dupond@domain.com\",\n    \"contactReference\": \"09fe888ab50bf17757b04ca7f22c76b5\",\n    \"campaignId\": \"138753\",\n    \"campaignName\": \"Les soldes de janvier\",\n    \"campaignType\": \"STANDARD\",\n    \"messageId\": \"12345678\",\n    \"media\": \"EMAIL\",\n    \"eventTimestamp\": 1549912706,\n    \"contractId\": 1234,\n    \"userId\": 567890,\n    \"codeShort\": \"ok\",\n    \"codeDescription\": \"The message has been delivered\"\n}\n\n</code></pre>","event":[{"listen":"prerequest","script":{"id":"f6fde12e-ff6a-483d-a699-98abcecc7f1c","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"6df07018-01c2-4274-8660-e8c0aa040e04","type":"text/javascript","exec":[""]}}],"_postman_id":"9f18d40a-6a1e-4214-98bc-4a31498755f3"},{"name":"contact.optout.create","item":[],"id":"4fe7cf64-bce7-45b7-91fd-026c16c62745","description":"<p>Triggered when a contact unsubscribe or is disabled.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>contactId</td>\n<td><em>string</em>  <br />Identifier of the contact</td>\n</tr>\n<tr>\n<td>contactRecipient</td>\n<td><em>string</em>  <br />Recipient who have opened the campaign</td>\n</tr>\n<tr>\n<td>contactDeleted</td>\n<td><em>boolean</em>  <br />Is the contact deleted?</td>\n</tr>\n<tr>\n<td>contactReference</td>\n<td><em>string</em>  <br />Contact reference</td>\n</tr>\n<tr>\n<td>campaignId</td>\n<td><em>string</em>  <br />Campaign's identifier</td>\n</tr>\n<tr>\n<td>campaignName</td>\n<td><em>string</em>  <br />Campaign's name</td>\n</tr>\n<tr>\n<td>campaignType</td>\n<td><em>string</em>  <br />Campaign's type (STANDARD, TRANSACTIONNAL, TRIGGERED)</td>\n</tr>\n<tr>\n<td>messageId</td>\n<td><em>string</em>  <br />Message identifier</td>\n</tr>\n<tr>\n<td>media</td>\n<td><em>string</em>  <br />Media (EMAIL, SMS)</td>\n</tr>\n<tr>\n<td>eventTimestamp</td>\n<td><em>string</em>  <br />Opt-out timestamp</td>\n</tr>\n<tr>\n<td>contractId</td>\n<td><em>string</em>  <br />Identifier of the contract who shot the campaign</td>\n</tr>\n<tr>\n<td>userId</td>\n<td><em>string</em>  <br />Identifier of the user who shot the campaign</td>\n</tr>\n<tr>\n<td>reason</td>\n<td><em>string</em>  <br />Reason the of the unsubscription: contact, user, hardbounced, spam</td>\n</tr>\n</tbody>\n</table>\n</div><pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n    \"contactId\": \"123456789\",\n    \"contactRecipient\": \"michel.dupond@domain.com\",\n    \"contactReference\": \"09fe888ab50bf17757b04ca7f22c76b5\",\n    \"campaignId\": \"138753\",\n    \"campaignName\": \"Les soldes de janvier\",\n    \"campaignType\": \"STANDARD\",\n    \"messageId\": \"12345678\",\n    \"media\": \"EMAIL\",\n    \"eventTimestamp\": 1549912706,\n    \"contractId\": 1234,\n    \"userId\": 567890,\n    \"reason\": \"contact\"\n}\n\n</code></pre>","event":[{"listen":"prerequest","script":{"id":"fa1eda81-3cd8-4ac9-b4f2-57da8fb91eb7","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"fba9d41e-0048-4d82-a913-5e0d9ff29996","type":"text/javascript","exec":[""]}}],"_postman_id":"4fe7cf64-bce7-45b7-91fd-026c16c62745"},{"name":"contact.optout.delete","item":[],"id":"0fa733dc-961c-4960-8e8a-a90c60a58d08","description":"<p>Triggered when a contact re-subscribe or is re-enabled.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>contactId</td>\n<td><em>string</em>  <br />Identifier of the contact</td>\n</tr>\n<tr>\n<td>contactRecipient</td>\n<td><em>string</em>  <br />Recipient who have opened the campaign</td>\n</tr>\n<tr>\n<td>contactDeleted</td>\n<td><em>boolean</em>  <br />Is the contact deleted?</td>\n</tr>\n<tr>\n<td>contactReference</td>\n<td><em>string</em>  <br />Contact reference</td>\n</tr>\n<tr>\n<td>campaignId</td>\n<td><em>string</em>  <br />Campaign's identifier</td>\n</tr>\n<tr>\n<td>campaignName</td>\n<td><em>string</em>  <br />Campaign's name</td>\n</tr>\n<tr>\n<td>campaignType</td>\n<td><em>string</em>  <br />Campaign's type (STANDARD, TRANSACTIONNAL, TRIGGERED)</td>\n</tr>\n<tr>\n<td>messageId</td>\n<td><em>string</em>  <br />Message identifier</td>\n</tr>\n<tr>\n<td>media</td>\n<td><em>string</em>  <br />Media (EMAIL, SMS)</td>\n</tr>\n<tr>\n<td>eventTimestamp</td>\n<td><em>string</em>  <br />Opt-in timestamp</td>\n</tr>\n<tr>\n<td>contractId</td>\n<td><em>string</em>  <br />Identifier of the contract who shot the campaign</td>\n</tr>\n<tr>\n<td>userId</td>\n<td><em>string</em>  <br />Identifier of the user who shot the campaign</td>\n</tr>\n</tbody>\n</table>\n</div><pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n    \"contactId\": \"123456789\",\n    \"contactRecipient\": \"michel.dupond@domain.com\",\n    \"contactReference\": \"09fe888ab50bf17757b04ca7f22c76b5\",\n    \"campaignId\": \"138753\",\n    \"campaignName\": \"Les soldes de janvier\",\n    \"campaignType\": \"STANDARD\",\n    \"messageId\": \"12345678\",\n    \"media\": \"EMAIL\",\n    \"eventTimestamp\": 1549912706,\n    \"contractId\": 1234,\n    \"userId\": 567890\n}\n\n</code></pre>","_postman_id":"0fa733dc-961c-4960-8e8a-a90c60a58d08"},{"name":"contact.create","item":[],"id":"dae2e676-db23-4393-bbc2-6ee205565589","description":"<p>Triggered when a contact is created.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>contactId</td>\n<td>string<br />Identifier of the contact</td>\n</tr>\n<tr>\n<td>contactReference</td>\n<td>string<br />Contact reference</td>\n</tr>\n<tr>\n<td>eventTs</td>\n<td>int<br />Opening timestamp</td>\n</tr>\n<tr>\n<td>contractId</td>\n<td>string<br />Identifier of the contract who shot the campaign</td>\n</tr>\n<tr>\n<td>userId</td>\n<td>string<br />Identifier of the user who shot the campaign</td>\n</tr>\n<tr>\n<td>data</td>\n<td>json object<br />All contact attributes</td>\n</tr>\n</tbody>\n</table>\n</div><pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n    \"contactId\": \"123456789\",\n    \"contactReference\": \"09fe888ab50bf17757b04ca7f22c76b5\",\n    \"eventTs\": 1549912706,\n    \"contractId\": 1234,\n    \"userId\": 567890,\n    \"data\": {\n        \"id\": 497227081,\n        \"email\": \"michel.dupond@domain.com\",\n        \"phone\": \"+33296300090\",\n        \"mobile\": \"+33689674523\",\n        \"firstName\": \"Michel\",\n        \"lastName\": \"DUPOND\",\n        \"birthDate\": \"01/01/1970\",\n        \"address1\": \"13 impasse des bleuets\",\n        \"address2\": null,\n        \"zipcode\": \"35310\",\n        \"city\": \"BREAL SOUS MONTFORT\",\n        \"country\": \"FRANCE\",\n        \"company\": \"Google\",\n        \"field01\": \"11/02/2019\",\n        \"field15\": \"78-ETF-78\"\n        }\n}\n</code></pre>","event":[{"listen":"prerequest","script":{"id":"6ea6b346-f9fb-4327-a773-f7908eae3678","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"6634a841-cb7f-411b-be44-e88a5fc31f50","type":"text/javascript","exec":[""]}}],"_postman_id":"dae2e676-db23-4393-bbc2-6ee205565589"},{"name":"contact.delete","item":[],"id":"079dcac9-cf84-4025-b92a-8825a4a9a2be","description":"<p>Triggered when a contact is deleted.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>contactId</td>\n<td>string<br />Identifier of the contact</td>\n</tr>\n<tr>\n<td>contactReference</td>\n<td>string<br />Contact reference</td>\n</tr>\n<tr>\n<td>eventTs</td>\n<td>int<br />Opening timestamp</td>\n</tr>\n<tr>\n<td>contractId</td>\n<td>string<br />Identifier of the contract who shot the campaign</td>\n</tr>\n<tr>\n<td>userId</td>\n<td>string<br />Identifier of the user who shot the campaign</td>\n</tr>\n</tbody>\n</table>\n</div><pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n    \"contactId\": \"123456789\",\n    \"contactReference\": \"09fe888ab50bf17757b04ca7f22c76b5\",\n    \"eventTs\": 1549912706,\n    \"contractId\": 1234,\n    \"userId\": 567890\n}\n</code></pre>","event":[{"listen":"prerequest","script":{"id":"6ea6b346-f9fb-4327-a773-f7908eae3678","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"6634a841-cb7f-411b-be44-e88a5fc31f50","type":"text/javascript","exec":[""]}}],"_postman_id":"079dcac9-cf84-4025-b92a-8825a4a9a2be"},{"name":"contact.update","item":[],"id":"e87aad15-300d-4a60-9d8f-2293dd19316e","description":"<p>Triggered when a contact is updated.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>contactId</td>\n<td>string<br />Identifier of the contact</td>\n</tr>\n<tr>\n<td>contactReference</td>\n<td>string<br />Contact reference</td>\n</tr>\n<tr>\n<td>eventTs</td>\n<td>int<br />Opening timestamp</td>\n</tr>\n<tr>\n<td>contractId</td>\n<td>string<br />Identifier of the contract who shot the campaign</td>\n</tr>\n<tr>\n<td>userId</td>\n<td>string<br />Identifier of the user who shot the campaign</td>\n</tr>\n<tr>\n<td>data</td>\n<td>json object<br />All contact attributes</td>\n</tr>\n</tbody>\n</table>\n</div><pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n    \"contactId\": \"123456789\",\n    \"contactReference\": \"09fe888ab50bf17757b04ca7f22c76b5\",\n    \"eventTs\": 1549912706,\n    \"contractId\": 1234,\n    \"userId\": 567890,\n    \"data\": {\n        \"id\": 497227081,\n        \"email\": \"michel.dupond@domain.com\",\n        \"phone\": \"+33296300090\",\n        \"mobile\": \"+33689674523\",\n        \"firstName\": \"Michel\",\n        \"lastName\": \"DUPOND\",\n        \"birthDate\": \"01/01/1970\",\n        \"address1\": \"13 impasse des bleuets\",\n        \"address2\": null,\n        \"zipcode\": \"35310\",\n        \"city\": \"BREAL SOUS MONTFORT\",\n        \"country\": \"FRANCE\",\n        \"company\": \"Google\",\n        \"field01\": \"11/02/2019\",\n        \"field15\": \"78-ETF-78\"\n        }\n}\n</code></pre>","event":[{"listen":"prerequest","script":{"id":"6ea6b346-f9fb-4327-a773-f7908eae3678","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"6634a841-cb7f-411b-be44-e88a5fc31f50","type":"text/javascript","exec":[""]}}],"_postman_id":"e87aad15-300d-4a60-9d8f-2293dd19316e"},{"name":"contact.form.submit","item":[],"id":"b6edda64-6c54-4d8f-9839-e085ea7b5c17","description":"<p>Triggered when a form is submitted.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>contactId</td>\n<td>string  <br />Identifier of the contact</td>\n</tr>\n<tr>\n<td>contactRecipient</td>\n<td>string  <br />Recipient who have opened the campaign</td>\n</tr>\n<tr>\n<td>contactReference</td>\n<td>string  <br />Contact reference</td>\n</tr>\n<tr>\n<td>contactCategory</td>\n<td>string  <br />Contact category [DEFAULT, ANSWERS, LEAD]</td>\n</tr>\n<tr>\n<td>campaignId</td>\n<td>string  <br />Campaign's identifier</td>\n</tr>\n<tr>\n<td>campaignName</td>\n<td>string  <br />Campaign's name</td>\n</tr>\n<tr>\n<td>campaignType</td>\n<td>string  <br />Campaign's type (STANDARD, TRANSACTIONNAL, TRIGGERED)</td>\n</tr>\n<tr>\n<td>media</td>\n<td>string  <br />Media (EMAIL, VOICEMAIL, SMS)</td>\n</tr>\n<tr>\n<td>eventTs</td>\n<td>int  <br />Timestamp of the response</td>\n</tr>\n<tr>\n<td>contractId</td>\n<td>string  <br />Identifier of the contract who shot the campaign</td>\n</tr>\n<tr>\n<td>userId</td>\n<td>string  <br />Identifier of the user who shot the campaign</td>\n</tr>\n<tr>\n<td>data</td>\n<td>array  <br />The form questions and andswers</td>\n</tr>\n<tr>\n<td>metadata</td>\n<td>Please refer to the <code>metadata</code> section</td>\n</tr>\n</tbody>\n</table>\n</div><pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n    \"contactId\": \"123456789\",\n    \"contactRecipient\": \"michel.dupond@domain.com\",\n    \"contactReference\": \"09fe888ab50bf17757b04ca7f22c76b5\",\n    \"contactCategory\": \"DEFAULT\",\n    \"campaignId\": \"138753\",\n    \"campaignName\": \"Les soldes de janvier\",\n    \"campaignType\": \"STANDARD\",\n    \"media\": \"EMAIL\",\n    \"eventTs\": 1549912706,\n    \"contractId\": 1234,\n    \"userId\": 567890,\n    \"data\":\n      [\n        {\n          \"question\": \"Text of the question 1\",\n          \"answer\": \"Text of the answer of the question 1\"\n        },\n        {\n          \"question\": \"Text of the question 2\",\n          \"answer\": \"Text of the answer of the question 2\"\n                },\n        {\n          \"question\": \"Text of the question 3\",\n          \"answer\": \"Text of the answer of the question 3\"\n        }\n      ]\n}\n\n</code></pre>","event":[{"listen":"prerequest","script":{"id":"f6fde12e-ff6a-483d-a699-98abcecc7f1c","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"6df07018-01c2-4274-8660-e8c0aa040e04","type":"text/javascript","exec":[""]}}],"_postman_id":"b6edda64-6c54-4d8f-9839-e085ea7b5c17"},{"name":"contact.message.reply","item":[],"id":"2961fb59-ad13-437f-957f-2ac4885a93af","description":"<p>Triggered when a reply of a SMS is received.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>contactId</td>\n<td><em>string</em>  <br />Identifier of the contact</td>\n</tr>\n<tr>\n<td>contactRecipient</td>\n<td><em>string</em>  <br />Recipient who received a SMS</td>\n</tr>\n<tr>\n<td>contactDeleted</td>\n<td><em>boolean</em>  <br />Is the contact deleted?</td>\n</tr>\n<tr>\n<td>contactReference</td>\n<td><em>string</em>  <br />Contact reference</td>\n</tr>\n<tr>\n<td>campaignId</td>\n<td><em>string</em>  <br />Campaign's identifier</td>\n</tr>\n<tr>\n<td>campaignName</td>\n<td><em>string</em>  <br />Campaign's name</td>\n</tr>\n<tr>\n<td>campaignType</td>\n<td><em>string</em>  <br />Campaign's type (STANDARD, TRANSACTIONNAL, TRIGGERED)</td>\n</tr>\n<tr>\n<td>messageId</td>\n<td><em>string</em>  <br />Message identifier</td>\n</tr>\n<tr>\n<td>eventTs</td>\n<td><em>int</em>  <br />Timestamp of the response</td>\n</tr>\n<tr>\n<td>contractId</td>\n<td><em>string</em>  <br />Identifier of the contract who shot the campaign</td>\n</tr>\n<tr>\n<td>userId</td>\n<td><em>string</em>  <br />Identifier of the user who shot the campaign</td>\n</tr>\n<tr>\n<td>response</td>\n<td><em>string</em>  <br />Text of the sms</td>\n</tr>\n<tr>\n<td>metadata</td>\n<td>Please refer to the <code>metadata</code> section</td>\n</tr>\n</tbody>\n</table>\n</div><pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n    \"contactId\": \"123456789\",\n    \"contactRecipient\": \"+33601020304\",\n    \"contactReference\": \"09fe888ab50bf17757b04ca7f22c76b5\",\n    \"campaignId\": \"138753\",\n    \"campaignName\": \"Les soldes de janvier\",\n    \"campaignType\": \"STANDARD\",\n    \"messageId\": \"12345678\",\n    \"eventTs\": 1549912706,\n    \"contractId\": 1234,\n    \"userId\": 567890,\n    \"response\": \"Text of the response\"\n}\n\n</code></pre>","event":[{"listen":"prerequest","script":{"id":"f6fde12e-ff6a-483d-a699-98abcecc7f1c","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"6df07018-01c2-4274-8660-e8c0aa040e04","type":"text/javascript","exec":[""]}}],"_postman_id":"2961fb59-ad13-437f-957f-2ac4885a93af"}],"id":"fa057113-e446-46a7-b7df-c101b7dedd29","description":"<h1 id=\"supported-events\">Supported events</h1>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Event</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>contact.create</td>\n<td>Triggered when a contact is created</td>\n</tr>\n<tr>\n<td>contact.delete</td>\n<td>Triggered when a contact is deleted</td>\n</tr>\n<tr>\n<td>contact.update</td>\n<td>Triggered when a contact is updated</td>\n</tr>\n<tr>\n<td>contact.form.submit</td>\n<td>Triggered when a landing page form is submitted, or when an ads lead is created</td>\n</tr>\n<tr>\n<td>contact.message.click</td>\n<td>Triggered when a link is clicked in an email or a SMS</td>\n</tr>\n<tr>\n<td>contact.message.open</td>\n<td>Triggered when an email, a voicemail or a SMS is opened</td>\n</tr>\n<tr>\n<td>contact.message.reply</td>\n<td>Triggered when a reply of a SMS is received</td>\n</tr>\n<tr>\n<td>contact.message.status</td>\n<td>Triggered for any status update of a message (delivered, undelivered, ...)</td>\n</tr>\n<tr>\n<td>contact.optout.create</td>\n<td>Triggered when a contact unsubscribe or is disabled</td>\n</tr>\n<tr>\n<td>contact.optout.delete</td>\n<td>Triggered when a contact re-subscribe or is re-enabled</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>All the following items are presented as one item to expose the anatomy of each event</strong></p>\n<p>⚠️ Keep in mind that payloads can be enhanced with <strong>new property</strong> at any time.</p>\n","event":[{"listen":"prerequest","script":{"id":"b4028a79-f5c6-4116-a7e1-bc285aafc9c3","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"7c1204eb-344a-47b8-a68e-efa2cd880f49","type":"text/javascript","exec":[""]}}],"_postman_id":"fa057113-e446-46a7-b7df-c101b7dedd29"},{"name":"Metadata","item":[],"id":"c5e2b007-c56f-4ca3-a294-a88f76ed40c7","description":"<p>You may have some metada links to your event. When added, an extra property will be append to your event payload.</p>\n<h2 id=\"campaign-metadata\">Campaign metadata</h2>\n<p>Those metada are a great way to help you add more context to your campaings.</p>\n<h3 id=\"eligible-events\">Eligible events</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Event</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>contact.form.submit</td>\n</tr>\n<tr>\n<td>contact.message.click</td>\n</tr>\n<tr>\n<td>contact.message.open</td>\n</tr>\n<tr>\n<td>contact.message.reply</td>\n</tr>\n<tr>\n<td>contact.message.status</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"types\">Types</h3>\n<p>Metada can be of type :</p>\n<ul>\n<li><code>date</code> and will be passed as string with <code>Y-m-d</code> format</li>\n<li><code>string</code></li>\n</ul>\n<h3 id=\"example\">Example</h3>\n<p>For example, given a <code>contact.message.open</code> event with 3 metadata :</p>\n<ul>\n<li><code>START_DATE</code> of type <code>date</code> </li>\n<li><code>END_DATE</code> of type <code>date</code></li>\n<li><code>OFFER_CODE</code> of type <code>string</code></li>\n</ul>\n<p>The event payload could look like this :</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"contactId\": \"123456789\",\n    \"contactRecipient\": \"michel.dupond@domain.com\",\n    \"contactReference\": \"09fe888ab50bf17757b04ca7f22c76b5\",\n    \"campaignId\": \"138753\",\n    \"campaignName\": \"10% pendant les soldes de janvier\",\n    \"campaignType\": \"STANDARD\",\n    \"messageId\": \"12345678\",\n    \"media\": \"EMAIL\",\n    \"eventTimestamp\": 1549912706,\n    \"contractId\": 1234,\n    \"userId\": 567890,\n    \"metadata\": {\n        \"START_DATE:\" \"2021-01-01\",\n        \"END_DATE:\" \"2021-01-11\",\n        \"OFFER_CODE\": \"JAN_SOLDES_10P\"\n    }\n}\n</code></pre>\n","event":[{"listen":"prerequest","script":{"id":"e10dc016-cb96-420f-91ae-6221310817a0","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"0752e6df-16aa-4695-b10a-a24b494fd6a8","type":"text/javascript","exec":[""]}}],"_postman_id":"c5e2b007-c56f-4ca3-a294-a88f76ed40c7"},{"name":"Simulation","item":[{"name":"Webhook simulation","id":"3bb1b375-10e4-428e-b177-8625fc130e34","protocolProfileBehavior":{"disableBodyPruning":true,"disabledSystemHeaders":{}},"request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{token}}"}],"url":"https://api.digitaleo.com/webhooks/v1/subscriptions/{{id}}/simulate","description":"<p>The event simulation allow the user to simulate a specific given subscription. Next, you will receive an event with this minimal informations :</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">\"Payload\": [\n    {\n      \"contractId\": /*your contract id*/,\n      \"contractName\": \"contractName\",\n      \"userId\": /*your user id*/,\n      \"eventTimestamp\": /*the actual timestamp*/,\n      \"contactId\": /*fake data*/,\n      \"contactReference\": \"contactReference\",\n      \"contactDeleted\": /*fake data*/,\n      \"data\": {\n        \"key\": \"value\"\n      }\n    }\n  ],\n\n</code></pre>\n<p>The simulation will be sent to the specified subscription URL for webhook subscriptions, or will be retrievable via API call for polling subscriptions.</p>\n<h1>Response</h1>\n\n<p>A successful request returns the HTTP 204 No Content status code with no JSON response body.</p>\n<p>Errors can occur, for the simulation there are 3 different types of errors :</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Error name</strong></th>\n<th><strong>Error status code</strong></th>\n<th><strong>meaning</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>SUBSCRIPTION_NOT_FOUND</td>\n<td>404</td>\n<td>The given subscription id doesn't exist</td>\n</tr>\n<tr>\n<td>DISPATCH_ERROR</td>\n<td>422</td>\n<td>An error occurred while dispatching the event</td>\n</tr>\n<tr>\n<td>MISSING_REQUIRED_FIELDS</td>\n<td>422</td>\n<td>The given subscription haven't the required fields. It may be that the url or the event is missing in the subscription.</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"protocol":"https","path":["webhooks","v1","subscriptions","{{id}}","simulate"],"host":["api","digitaleo","com"],"query":[],"variable":[]}},"response":[{"id":"b9711977-938c-458a-a5bc-b58228740b94","name":"204 No Content","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{token}}"}],"url":"https://api.digitaleo.com/webhooks/v1/subscriptions/{{id}}/simulate"},"status":"No Content","code":204,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":null},{"id":"7cd0a9f7-c5b1-4764-8aa9-07a8e21c7f6c","name":"404 SUBSCRIPTION_NOT_FOUND","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{token}}"}],"url":"https://api.digitaleo.com/webhooks/v1/subscriptions/{{id}}/simulate"},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":""}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": {\n        \"message\": \"SUBSCRIPTION_NOT_FOUND\",\n        \"status_code\": 404\n    }\n}"},{"id":"ba6f918b-f5b5-49f8-a03d-f2999bcf90d4","name":"422 MISSING_REQUIRED_FIELDS","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{token}}"}],"url":"https://api.digitaleo.com/webhooks/v1/subscriptions/{{id}}/simulate"},"status":"Unprocessable Content","code":422,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":""}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": {\n        \"message\": \"MISSING_REQUIRED_FIELDS\",\n        \"status_code\": 422\n    }\n}"},{"id":"e44b00a6-5011-4869-a46d-36e92c85c9e9","name":"422 DISPATCH_ERROR","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{token}}"}],"url":"https://api.digitaleo.com/webhooks/v1/subscriptions/{{id}}/simulate"},"status":"Unprocessable Content","code":422,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":""}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": {\n        \"message\": \"DISPATCH_ERROR\",\n        \"status_code\": 422\n    }\n}"}],"_postman_id":"3bb1b375-10e4-428e-b177-8625fc130e34"}],"id":"aae24193-df74-4e35-9544-66b004236655","_postman_id":"aae24193-df74-4e35-9544-66b004236655","description":""},{"name":"Polling","item":[{"name":"Read Subscription's events","id":"9deb359c-1120-45de-b221-c6fe1001b1b9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{token}}"},{"key":"Content-Type","value":"application/x-www-form-urlencoded"}],"body":{"mode":"formdata","formdata":[]},"url":"https://api.digitaleo.com/webhooks/v1/subscriptions/{{id}}/events","description":"<p>This endpoint is only accessible if the provided <code>id</code> corresponds to a polling subscription.</p>\n<p>Then, when you create a subscription via the API, be sure to use the correct <strong>parameter types</strong>. See <em>“</em><a href=\"https://documenter.getpostman.com/view/6740351/S17oxppy#2e5c5ec2-071d-4bc2-92db-eec1c5b26821\">Subscribe a webhook</a><em>”</em></p>\n","urlObject":{"protocol":"https","path":["webhooks","v1","subscriptions","{{id}}","events"],"host":["api","digitaleo","com"],"query":[],"variable":[]}},"response":[{"id":"a8867b39-1f48-491e-8b0a-b362e12afc9d","name":"200 OK","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{token}}"},{"key":"Content-Type","value":"application/x-www-form-urlencoded"}],"body":{"mode":"formdata","formdata":[]},"url":"https://api.digitaleo.com/webhooks/v1/subscriptions/{{id}}/events"},"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":""}],"cookie":[],"responseTime":null,"body":"[\n    {\n        \"contactId\": \"123456789\",\n        \"contactRecipient\": \"michel.dupond@domain.com\",\n        \"contactReference\": \"09fe888ab50bf17757b04ca7f22c76b5\",\n        \"campaignId\": \"138753\",\n        \"campaignName\": \"Les soldes de janvier\",\n        \"campaignType\": \"STANDARD\",\n        \"messageId\": \"12345678\",\n        \"media\": \"EMAIL\",\n        \"eventTimestamp\": 1549912706,\n        \"contractId\": 1234,\n        \"userId\": 567890\n    }\n]"},{"id":"4c1367dc-df7d-439d-969b-4ea444dcf7f2","name":"404 Not Found","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{token}}"},{"key":"Content-Type","value":"application/x-www-form-urlencoded"}],"body":{"mode":"formdata","formdata":[]},"url":"https://api.digitaleo.com/webhooks/v1/subscriptions/{{id}}/events"},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":""}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"Subscription not found or not a polling subscription\"\n}"}],"_postman_id":"9deb359c-1120-45de-b221-c6fe1001b1b9"}],"id":"387680cc-83f2-4937-960a-9c4ff25be89f","description":"<p>This mode allow you to retrieve your self the event rather than be notified on a public endpoint.<br />You'll retrieve the exact same data as with the webhook mode, the only difference is that you handle on your side the frequency you want aggregate data by calling our endpoint.</p>\n<p>⚠️ Once an event is read, you can't retrieve it anymore. Take care to correctly save data on your side. On our side, read events are definetely deleted after 30 days.</p>\n","_postman_id":"387680cc-83f2-4937-960a-9c4ff25be89f"}],"event":[{"listen":"prerequest","script":{"id":"74b4a076-325e-40af-9470-6a0b4ce08f36","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"573e9232-e47e-4f1e-b2b5-69bfa5d2baf3","type":"text/javascript","exec":[""]}}]}