{"info":{"_postman_id":"27778dfe-8df1-4b1b-88de-c7a1e3dd5ea6","name":"SmartReach Documentation","description":"<html><head></head><body><p>SmartReach uses webhooks to notify your application when an event happens in your account. You can use webhooks to sync activity in your SmartReach with any other tools (internal CRMs etc) that you may be using.</p>\n<p>To setup webhooks, </p>\n<ol>\n<li>go to <code>Settings -&gt; Webhook Settings</code> in your SmartReach account</li>\n<li>create a new webhook -&gt; provide the webhook Endpoint URL. </li>\n<li>In the next step, select the Events that should trigger this webhook</li>\n<li>click Save, and then click \"Start Webhook\"</li>\n<li>When any of the selected events happens in your SmartReach account, it will make a POST HTTP request with the webhook data to the webhook Endpoint URL. (NOTE: Webhooks are shared across your team in SmartReach.)</li>\n</ol>\n<p>Read below for the list of supported events, and the object data structure for each of those events.</p>\n<p>If you have any questions, reach out to us via email: <a href=\"mailto:support@smartreach.io\">support@smartreach.io</a></p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"9575627","collectionId":"27778dfe-8df1-4b1b-88de-c7a1e3dd5ea6","publishedId":"SzS1SoR4","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2020-03-11T21:43:40.000Z"},"item":[{"name":"Prospects","item":[],"id":"29654e38-ae90-4f3e-8421-1f483b3761da","description":"<h1 id=\"prospect-object\">Prospect Object</h1>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>prospect_id</td>\n<td>number</td>\n<td>Unique ID of prospect in SmartReach account</td>\n</tr>\n<tr>\n<td>email</td>\n<td>string</td>\n<td>Prospect's email</td>\n</tr>\n<tr>\n<td>first_name</td>\n<td>string</td>\n<td>Prospect's first name</td>\n</tr>\n<tr>\n<td>last_name</td>\n<td>string</td>\n<td>Prospect's last name</td>\n</tr>\n<tr>\n<td>list</td>\n<td>string</td>\n<td>List in which prospect belongs</td>\n</tr>\n<tr>\n<td>company</td>\n<td>string</td>\n<td>Prospect's company</td>\n</tr>\n<tr>\n<td>city</td>\n<td>string</td>\n<td>Prospect's city</td>\n</tr>\n<tr>\n<td>country</td>\n<td>string</td>\n<td>Prospect's country</td>\n</tr>\n<tr>\n<td>timezone</td>\n<td>string</td>\n<td>Prospect's timezone</td>\n</tr>\n<tr>\n<td>prospect_category</td>\n<td>string</td>\n<td>Prospect's category</td>\n</tr>\n<tr>\n<td>created_at</td>\n<td>number</td>\n<td>Created at time (in milliseconds after UTC)</td>\n</tr>\n<tr>\n<td>custom_fields</td>\n<td>json</td>\n<td>Json object with all the custom fields added for the prospect</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"prospect-object-example\">Prospect Object Example</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"prospect_id\": 7419929,\n    \"email\": \"john@doe.com\n    \"first_name\": \"John\",\n    \"last_name\": \"Doe\",\n    \"created_at\": 1583580438532,\n    \"custom_fields\": {\n        \"website\": \"www.example.com\"\n    },\n    \"list\": \"India\",\n    \"company\": \"\",\n    \"city\": \"Hyderabad\",\n    \"country\": \"\",\n    \"timezone\": 'Asia/Kolkata',\n    \"prospect_category\": \"Not categorized\"\n}\n</code></pre>\n","event":[{"listen":"prerequest","script":{"id":"43b0510f-a63f-4476-a33b-fd63f38ed57a","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"8bb77d42-cedf-4374-82b4-d7c4d21d1265","type":"text/javascript","exec":[""]}}],"_postman_id":"29654e38-ae90-4f3e-8421-1f483b3761da"},{"name":"Activity","item":[],"id":"6c5ec5bb-63ef-436b-9b62-d98291476b5e","description":"<h1 id=\"activity-object\">Activity Object</h1>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>created_at</td>\n<td>number</td>\n<td>Created at time (milliseconds after UTC)</td>\n</tr>\n<tr>\n<td>email_body</td>\n<td>string</td>\n<td>Email body (html)</td>\n</tr>\n<tr>\n<td>email_text_body</td>\n<td>string</td>\n<td>Email body (text)</td>\n</tr>\n<tr>\n<td>email_subject</td>\n<td>string</td>\n<td>Email body (text)</td>\n</tr>\n<tr>\n<td>email_from</td>\n<td>string</td>\n<td>From email address</td>\n</tr>\n<tr>\n<td>email_to</td>\n<td>string</td>\n<td>To email address</td>\n</tr>\n<tr>\n<td>campaign_name</td>\n<td>string</td>\n<td>Campaign in which activity happened</td>\n</tr>\n<tr>\n<td>campaign_step_name</td>\n<td>string</td>\n<td>Campaign step in which activity happened</td>\n</tr>\n<tr>\n<td>clicked_url</td>\n<td>string</td>\n<td>Clicked url (link_clicked event)</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"activity-object-example\">Activity Object Example</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"prospect_id\": 7419929,\n    \"email\": \"john@doe.com\n    \"first_name\": \"John\",\n    \"last_name\": \"Doe\",\n    \"created_at\": 1583580438532,\n    \"custom_fields\": {\n        \"website\": \"www.example.com\"\n    },\n    \"list\": \"India\",\n    \"company\": \"\",\n    \"city\": \"Hyderabad\",\n    \"country\": \"\",\n    \"timezone\": 'Asia/Kolkata',\n    \"prospect_category\": \"Not categorized\"\n}\n</code></pre>\n","event":[{"listen":"prerequest","script":{"id":"43b0510f-a63f-4476-a33b-fd63f38ed57a","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"8bb77d42-cedf-4374-82b4-d7c4d21d1265","type":"text/javascript","exec":[""]}}],"_postman_id":"6c5ec5bb-63ef-436b-9b62-d98291476b5e"},{"name":"Events","item":[],"id":"92c4d920-524f-4716-9e6f-36e5bdd29d5a","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<th>Objects in Event Data</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>prospect.created</td>\n<td>Occurs when a prospect is created</td>\n<td><a href=\"#prospect-object\">Prospect</a></td>\n</tr>\n<tr>\n<td>prospect.updated</td>\n<td>Occurs when a prospect is updated</td>\n<td><a href=\"#prospect-object\">Prospect</a></td>\n</tr>\n<tr>\n<td>prospect.created_or_updated</td>\n<td>Occurs when a prospect is created or updated</td>\n<td><a href=\"#prospect-object\">Prospect</a></td>\n</tr>\n<tr>\n<td>activity.email.sent</td>\n<td>Occurs when a email is sent</td>\n<td><a href=\"#prospect-object\">Prospect</a>, <a href=\"#activity-object\">Activity</a></td>\n</tr>\n<tr>\n<td>activity.email.bounced</td>\n<td>Occurs when a email bounces</td>\n<td><a href=\"#prospect-object\">Prospect</a>, <a href=\"#activity-object\">Activity</a></td>\n</tr>\n<tr>\n<td>activity.email.opened</td>\n<td>Occurs when a email bounces</td>\n<td><a href=\"#prospect-object\">Prospect</a>, <a href=\"#activity-object\">Activity</a></td>\n</tr>\n<tr>\n<td>activity.email.link_clicked</td>\n<td>Occurs when a link is clicked in any email</td>\n<td><a href=\"#prospect-object\">Prospect</a>, <a href=\"#activity-object\">Activity</a></td>\n</tr>\n<tr>\n<td>activity.email.invalid</td>\n<td>Occurs when a email is marked as invalid</td>\n<td><a href=\"#prospect-object\">Prospect</a>, <a href=\"#activity-object\">Activity</a></td>\n</tr>\n<tr>\n<td>activity.email.replied</td>\n<td>Occurs when a new reply (from a prospect) is found</td>\n<td><a href=\"#prospect-object\">Prospect</a>, <a href=\"#activity-object\">Activity</a></td>\n</tr>\n<tr>\n<td>activity.email.auto_replied</td>\n<td>Occurs when a auto-reply is found</td>\n<td><a href=\"#prospect-object\">Prospect</a>, <a href=\"#activity-object\">Activity</a></td>\n</tr>\n<tr>\n<td>activity.email.out_of_office_replied</td>\n<td>Occurs when a Out of Office reply is found</td>\n<td><a href=\"#prospect-object\">Prospect</a>, <a href=\"#activity-object\">Activity</a></td>\n</tr>\n<tr>\n<td>activity.prospect.opted_out</td>\n<td>Occurs when a prospect opts-out / unsubscribes</td>\n<td><a href=\"#prospect-object\">Prospect</a>, <a href=\"#activity-object\">Activity</a></td>\n</tr>\n<tr>\n<td>activity.prospect.completed_campaign</td>\n<td>Occurs when a prospect is marked as completed in a campaign</td>\n<td><a href=\"#prospect-object\">Prospect</a>, <a href=\"#activity-object\">Activity</a></td>\n</tr>\n</tbody>\n</table>\n</div>","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":"92c4d920-524f-4716-9e6f-36e5bdd29d5a"},{"name":"Webhooks","item":[],"id":"e5642680-3b05-44f5-9767-ea7bf159d3c5","description":"<h1 id=\"webhook-object\">Webhook Object</h1>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>metadata</td>\n<td>json</td>\n<td>See the attributes in the following lines</td>\n</tr>\n<tr>\n<td>metadata.event_type</td>\n<td>string</td>\n<td>Event name</td>\n</tr>\n<tr>\n<td>metadata.version</td>\n<td>string</td>\n<td>Webhook Version (currently \"v2\")</td>\n</tr>\n<tr>\n<td>metadata.webhook_id</td>\n<td>number</td>\n<td>Unique webhook identifier in your SmartReach account</td>\n</tr>\n<tr>\n<td>metadata.webhook_url</td>\n<td>string</td>\n<td>URL which gets triggered by this webhook</td>\n</tr>\n<tr>\n<td>metadata.received_at</td>\n<td>number</td>\n<td>Timestamp at which event/webhook was triggered</td>\n</tr>\n<tr>\n<td>data</td>\n<td>Array of json objects</td>\n<td>Array of objects containing the <a href=\"#supported-events\">Event Data</a></td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"webhook-example-object\">Webhook Example Object</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"metadata\": {\n    \"event_type\": \"email_opened\",\n    \"version\": \"v2\",\n    \"webhook_id\": 1243434,\n    \"webhook_url\": \"https://example.com/hooks\"\n    \"received_at\": 1583554968592\n  },\n  \"data\": [\n    {\n      \"prospect\": {\n        \"prospect_id\": 536,\n        \"prospect_email\": \"pbsamant1@gmail.com\",\n        \"first_name\": \"Prateeksha\",\n        \"last_name\": \"Samant\",\n        \"list\": \"Test_campaign_specific_\",\n        \"company\": \"saddahaq\",\n        \"city\": \"hyderabad\",\n        \"country\": \"India\",\n        \"timezone\": \"Asia/Kolkata\",\n        \"prospect_category\": \"Not categorized\",\n        \"custom_fields\": {},\n        \"created_at\": 1569329082419\n      },\n      \"activity\": {\n        \"created_at\": 1569340658833,\n        \"email_body\": \"&lt;!doctype html&gt;\\n&lt;html&gt;\\n &lt;head&gt; \\n &lt;/head&gt; \\n &lt;body&gt;\\n   Hi John\\n  &lt;br&gt;\\n  &lt;br&gt;Did you see my previous email?&amp;nbsp;\\n  &lt;br&gt;\\n  &lt;br&gt;Regards,\\n  &lt;br&gt;Jes&lt;/body&gt;\\n&lt;/html&gt;\",\n        \"email_text_body\": \"Hi John, Did you see my previous email?, Regards, Jes\",\n        \"email_subject\": \"Following up\",\n        \"email_from\": \"jes@example.com\",\n        \"email_to\": \"john@company.com\",\n        \"campaign_name\": \"Sales Outreach: Jan\",\n        \"campaign_step_name\": \"Day 1: Opening\",\n        \"clicked_url\": null\n      }\n    }\n  ]\n}\n</code></pre>\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":"e5642680-3b05-44f5-9767-ea7bf159d3c5"}],"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":[""]}}]}