{"_id":"55c3cad1b0778d2100a7ebd8","parentDoc":null,"project":"55208137623ff50d009b2bec","__v":5,"githubsync":"","version":{"_id":"55208137623ff50d009b2bef","__v":14,"project":"55208137623ff50d009b2bec","createdAt":"2015-04-05T00:26:31.564Z","releaseDate":"2015-04-05T00:26:31.563Z","categories":["55208138623ff50d009b2bf0","55494a226a82a10d00817ae5","55494ba7ee219b0d001743c8","55494bc1ee219b0d001743cc","56ead8c1df765617008bccaf","573a2073dd007d1700cf288f","579695b1f64c9f0e007cd76c","57969e3dfa1ff60e006a1274","579a4592fd9f3c0e008e4f4a","57ab9afe54fa780e006c5430","57b784f5b7ebd60e009cb4a6","58f686818193090f008cec76","59e79fbd4cf31900341d50c6","5b2436973fd93f0003dcf99d"],"is_deprecated":false,"is_hidden":false,"is_beta":true,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"user":"55208129504fd6230022ae20","category":{"_id":"55494a226a82a10d00817ae5","project":"55208137623ff50d009b2bec","version":"55208137623ff50d009b2bef","__v":15,"pages":["55494ad0ee219b0d001743bb","55494b05f452670d00ec0c29","55494b11ee219b0d001743bf","55494b20ee219b0d001743c1","55494b2bee219b0d001743c3","55494b4a6a82a10d00817af5","55494b686a82a10d00817af9","5549651ccd09b317005f8f50","55497273cd09b317005f8f86","554977f0c634cf2d001250a7","55b970eab42b610d00c9b2e3","5696f3688560a60d00e2c216","5696f91c59a6692d003fad50","5696f92c24490c3700170a2d","5696f9700b09a41900b24422"],"sync":{"url":"","isSync":false},"reference":true,"createdAt":"2015-05-05T22:54:26.925Z","from_sync":false,"order":2,"slug":"public-api","title":"Public API"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-08-06T21:00:01.438Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"settings":"","results":{"codes":[]},"auth":"required","params":[],"url":""},"isReference":true,"order":13,"body":"While you can automate the sending of messages using Sonar's API, you may want to flip things around and do something in your application based on what is happening in Sonar. This is where [Webhooks](https://en.wikipedia.org/wiki/Webhook) come in!\n\nCustom (outbound) Webhooks allow you to register a URL that we will notify anytime an event happens in your Sonar account. When the event occurs - for example, when a new unassigned message comes in, Sonar will send relevant data to the URL in your account's webhooks setting via the [Webhooks modal](https://www.sendsonar.com/?modal=CustomWebhook).\n\nWe offer webhooks for the following events in Sonar:\n\n* New Unassigned Messages\n* New Assigned Messages\n* Outbound Messages\n* Team Member Assignments\n* Customer Subscribed\n* Customer Unsubscribed\n\nWe will retry a webhook up to a **maximum of 4 times**, unless the status code returns with a \"2xx\" response. The schedule for the retries will be at 10 secs, 30 secs, 3 mins, and 30 mins. Also, a **unique identifier (uuid)** is included for each webhook.\n\nYou might use webhooks for:\n* Adding or updating customer's information in your database or system\n* Sending an automated welcome message via API when new customer has subscribed\n* Logging incoming Sonar messages received into a Google Sheet\n* Trigger actions based on customer's response in a message\n\n##Setting up Custom Webhooks\n\nTo set up Custom Webhooks:\n\n1. Log in to your Sonar account\n2. Go to \"Settings\" in the Left Menu Bar\n3. Click \"Custom Webhooks\"\n \nHere you'll see settings to turn certain Outbound Webhooks on and off. You'll also be able to specify the URL we should send the payload to.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/0ee72df-Screenshot_2016-08-19_15.39.38.png\",\n        \"Screenshot 2016-08-19 15.39.38.png\",\n        665,\n        391,\n        \"#a1cced\"\n      ]\n    }\n  ]\n}\n[/block]\n##Webhook Payloads\n\nThe information to your callback URL will be in JSON and will look like this:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{  \\n  \\\"message_id\\\":\\\"d22eaa3b-0daa-4619-943e-16f49388d73a\\\", \\n  \\\"uuid\\\":\\\"eacec4d6-fd66-4553-99dd-9b928ac95a18\\\",\\n  \\\"external_id\\\":\\\"X6D2Xp_g8gkZTfOaWrUXmQ==\\\",\\n  \\\"action\\\":\\\"outbound_message\\\",\\n  \\\"text\\\":\\\"test\\\",\\n  \\\"from_name\\\":\\\"Neeharika Bhartiya\\\",\\n  \\\"type\\\":\\\"SMSMessage\\\",\\n  \\\"link\\\":\\\"https://www.sendsonar.com/thread/gr3jeo\\\",\\n  \\\"direction\\\":\\\"sent\\\",\\n  \\\"media_url\\\":\\\"\\\",\\n  \\\"media_objects\\\":null,\\n  \\\"created_at\\\":\\\"2018-02-07T19:57:25Z\\\",\\n  \\\"away_message:\\\": null,\\n  \\\"campaign_slug\\\": null,\\n   \\\"customer\\\":{\\n     \\\"customer_id\\\": \\\"123\\\",\\n     \\\"first_name\\\":\\\"Neeharika\\\",\\n     \\\"last_name\\\":\\\"Bhartiya\\\",\\n     \\\"phone_number\\\":\\\"+12223334444\\\",\\n     \\\"fb_id\\\":null,\\n     \\\"external_id\\\":null,\\n     \\\"email\\\":null,\\n     \\\"current_state\\\": null,\\n     \\\"subscribed\\\": null,\\n     \\\"unsubscribed_at\\\": null,\\n     \\\"link\\\": null,\\n     \\\"company_publishable_key\\\":\\\"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\\\"\\n   },\\n   \\\"to_name\\\":\\\"Neeharika Bhartiya\\\",\\n   \\\"user\\\":{  \\n     \\\"first_name\\\":\\\"Neeharika\\\",\\n     \\\"last_name\\\":\\\"Bhartiya\\\",\\n     \\\"email\\\":\\\"neeharika:::at:::sendsonar.com\\\"\\n   }\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Outbound Message\"\n    },\n    {\n      \"code\": \"{  \\n  \\\"message_id\\\":\\\"345d4798-0eec-447d-9fb0-beb9bab939b3\\\", \\n  \\\"uuid\\\":\\\"eacec4d6-fd66-4553-99dd-9b928ac95a18\\\",\\n  \\\"action\\\":\\\"new_assigned_message\\\",\\n  \\\"text\\\":\\\"hey!\\\",\\n  \\\"from_name\\\":\\\"Neeharika Bhartiya\\\",\\n  \\\"type\\\":\\\"SMSMessage\\\",\\n  \\\"link\\\":\\\"https://www.sendsonar.com/thread/gr3jeo\\\",\\n  \\\"direction\\\":\\\"received\\\",\\n  \\\"media_url\\\":\\\"\\\",\\n  \\\"media_objects\\\": null,\\n  \\\"created_at\\\":\\\"2018-02-07T19:57:25Z\\\",\\n  \\\"away_message\\\": false,\\n  \\\"campaign_slug\\\": null,\\n  \\\"customer\\\":{  \\n     \\\"customer_id\\\": \\\"123\\\",\\n     \\\"first_name\\\":\\\"Neeharika\\\",\\n     \\\"last_name\\\":\\\"Bhartiya\\\",\\n     \\\"phone_number\\\":\\\"+12223334444\\\",\\n     \\\"fb_id\\\":null,\\n     \\\"external_id\\\":null,\\n     \\\"email\\\":null,\\n     \\\"current_state\\\": null,\\n     \\\"subscribed\\\": null,\\n     \\\"unsubscribed_at\\\": null,\\n     \\\"link\\\": null,\\n     \\\"company_publishable_key\\\":\\\"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\\\"\\n  },\\n  \\\"user\\\":{  \\n      \\\"first_name\\\":\\\"Neeharika\\\",\\n      \\\"last_name\\\":\\\"Bhartiya\\\",\\n      \\\"email\\\":\\\"neeharika@sendsonar.com\\\"\\n  },\\n  /* note: this section exists only if the new message is a reply to a campaign*/\\n  \\\"campaign\\\":{ \\n    \\\"slug\\\": \\\"CLKkAS\\\",\\n    \\\"name\\\": \\\"nps\\\",\\n    \\\"parsed_value\\\": \\\"8\\\",\\n\\t},\\n}\",\n      \"language\": \"json\",\n      \"name\": \"New Assigned Message\"\n    },\n    {\n      \"code\": \"{  \\n  \\\"message_id\\\":\\\"7f0fd8ce-4afc-4c94-a989-b4e6b38b9d96\\\", \\n  \\\"uuid\\\":\\\"eacec4d6-fd66-4553-99dd-9b928ac95a18\\\",\\n  \\\"external_id\\\":\\\"HYqg7iZYndEiQsFXr7VRBw==\\\",\\n  \\\"action\\\":\\\"new_unassigned_message\\\",\\n  \\\"text\\\":\\\"Hi\\\",\\n  \\\"from_name\\\":\\\"Neeharika Bhartiya\\\",\\n  \\\"type\\\":\\\"SMSMessage\\\",\\n  \\\"link\\\":\\\"https://www.sendsonar.com/thread/gr3jeo\\\",\\n  \\\"direction\\\":\\\"received\\\",\\n  \\\"media_url\\\":\\\"\\\",\\n  \\\"media_objects\\\": null,\\n  \\\"created_at\\\":\\\"2017-02-07T19:57:25Z\\\",\\n  \\\"away_message\\\": null,\\n  \\\"campaign_slug\\\": null,\\n   \\\"customer\\\":{  \\n     \\\"customer_id\\\": \\\"123\\\",\\n     \\\"first_name\\\":\\\"Neeharika\\\",\\n     \\\"last_name\\\":\\\"Bhartiya\\\",\\n     \\\"phone_number\\\":\\\"+12223334444\\\",\\n     \\\"fb_id\\\":null,\\n     \\\"external_id\\\":null,\\n     \\\"email\\\":null,\\n     \\\"current_state\\\": null,\\n     \\\"subscribed\\\": null,\\n     \\\"unsubscribed_at\\\": null,\\n     \\\"link\\\": null,\\n     \\\"company_publishable_key\\\":\\\"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\\\"\\n   },\\n   \\\"user\\\":{  \\n      \\\"first_name\\\":\\\"Neeharika\\\",\\n      \\\"last_name\\\":\\\"Bhartiya\\\",\\n      \\\"email\\\":\\\"neeharika@sendsonar.com\\\"\\n   },\\n  /* note: this section exists only if the new message is a reply to a campaign*/\\n  \\\"campaign\\\":{ \\n    \\\"slug\\\": \\\"CLKkAS\\\",\\n    \\\"name\\\": \\\"nps\\\",\\n    \\\"parsed_value\\\": \\\"8\\\",\\n\\t},\\n}\",\n      \"language\": \"json\",\n      \"name\": \"New Unassigned Message\"\n    },\n    {\n      \"code\": \"{  \\n   \\\"uuid\\\":\\\"eacec4d6-fd66-4553-99dd-9b928ac95a18\\\",\\n   \\\"action\\\":\\\"user_assignment\\\",\\n   \\\"text\\\":\\\"Rebecca Chow was just assigned to customer Neeharika Bhartiya\\\",\\n   \\\"to_name\\\":\\\"Rebecca Chow\\\",\\n   \\\"link\\\":\\\"https://www.sendsonar.com/thread/gr3jeo\\\",\\n   \\\"customer\\\":{  \\n     \\\"customer_id\\\": \\\"123\\\",\\n     \\\"first_name\\\":\\\"Neeharika\\\",\\n     \\\"last_name\\\":\\\"Bhartiya\\\",\\n     \\\"phone_number\\\":\\\"+12223334444\\\",\\n     \\\"fb_id\\\":null,\\n     \\\"external_id\\\":null,\\n     \\\"email\\\":null,\\n     \\\"current_state\\\": claimed,\\n     \\\"subscribed\\\": null,\\n     \\\"unsubscribed_at\\\": null,\\n     \\\"link\\\":\\\"https://www.sendsonar.com/thread/gr3jeo\\\",\\n     \\\"company_publishable_key\\\":\\\"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\\\"\\n   }\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Team Member Assignment\"\n    },\n    {\n      \"code\": \"{  \\n   \\\"uuid\\\":\\\"eacec4d6-fd66-4553-99dd-9b928ac95a18\\\",\\n   \\\"action\\\":\\\"customer_subscribed\\\",\\n   \\\"customer\\\":{  \\n     \\\"customer_id\\\": \\\"123\\\",\\n     \\\"first_name\\\":\\\"Neeharika\\\",\\n     \\\"last_name\\\":\\\"Bhartiya\\\",\\n     \\\"phone_number\\\":\\\"+12223334444\\\",\\n     \\\"fb_id\\\":null,\\n     \\\"external_id\\\":null,\\n     \\\"email\\\":null,\\n     \\\"current_state\\\": null,\\n     \\\"subscribed\\\": true,\\n     \\\"unsubscribed_at\\\": null,\\n     \\\"link\\\": null,\\n     \\\"company_publishable_key\\\":\\\"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\\\"\\n   }\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Customer Subscribed\"\n    },\n    {\n      \"code\": \"{  \\n   \\\"uuid\\\":\\\"eacec4d6-fd66-4553-99dd-9b928ac95a18\\\",\\n   \\\"action\\\":\\\"customer_unsubscribed\\\",\\n   \\\"customer\\\":{  \\n     \\\"customer_id\\\": \\\"123\\\",\\n     \\\"first_name\\\":\\\"Neeharika\\\",\\n     \\\"last_name\\\":\\\"Bhartiya\\\",\\n     \\\"phone_number\\\":\\\"+12223334444\\\",\\n     \\\"fb_id\\\":null,\\n     \\\"external_id\\\":null,\\n     \\\"email\\\":null,\\n     \\\"current_state\\\": null,\\n     \\\"subscribed\\\": false,\\n     \\\"unsubscribed_at\\\": null,\\n     \\\"link\\\": null,\\n     \\\"company_publishable_key\\\":\\\"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\\\"\\n   }\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Customer Unsubscribed\"\n    },\n    {\n      \"code\": \"{  \\n  \\\"uuid\\\":\\\"eacec4d6-fd66-4553-99dd-9b928ac95a18\\\",\\n  \\\"action\\\":\\\"customer_created\\\",\\n  \\\"link\\\": null,\\n  \\\"customer\\\":{\\n    \\\"customer_id\\\": \\\"123\\\",\\n    \\\"first_name\\\":\\\"Neeharika\\\",\\n    \\\"last_name\\\":\\\"Bhartiya\\\",\\n    \\\"phone_number\\\":\\\"+12223334444\\\",\\n    \\\"fb_id\\\":null,\\n    \\\"external_id\\\":null,\\n    \\\"email\\\":null,\\n    \\\"current_state\\\": null,\\n    \\\"subscribed\\\": null,\\n    \\\"unsubscribed_at\\\": null,\\n    \\\"link\\\": null,\\n    \\\"created_at\\\": \\\"2018-02-07T19:57:25Z\\\",\\n    \\\"company_publishable_key\\\":\\\"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\\\"\\n  }\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Customer Created\"\n    },\n    {\n      \"code\": \"{\\n  \\\"uuid\\\":\\\"d836ad44-16da-4b9e-9bb8-fbb45a51fc63\\\",\\n  \\\"action\\\":\\\"tag_added_to_message\\\",\\n  \\\"message\\\":{\\n    \\\"message_id\\\":\\\"04369c55-612f-4880-9bcb-864951e264fe\\\",\\n    \\\"text\\\":\\\"Friendly reminder\\\",\\n    \\\"type\\\":\\\"SMSMessage\\\",\\n    \\\"link\\\":\\\"https://www.sendsonar.com/thread/gr3jeo\\\",\\n    \\\"direction\\\":\\\"sent\\\",\\n    \\\"media_url\\\":\\\"\\\",\\n    \\\"media_objects\\\":null,\\n    \\\"created_at\\\":\\\"2018-02-12T17:15:01Z\\\",\\n    \\\"away_message\\\":false,\\n    \\\"campaign_slug\\\":null\\n    \\\"batch_id\\\":null\\n  },\\n  \\\"tag\\\":{\\n    \\\"tag_name\\\":\\\"_calendlyreminder\\\",\\n    \\\"tag_color\\\":\\\"#FAC9B8\\\",\\n    \\\"tag_type\\\":\\\"CompanyTag\\\"\\n  },\\n  \\\"customer\\\":{\\n    \\\"customer_id\\\":\\\"a1d6df19-d84a-43b9-937d-440288635803\\\",\\n    \\\"first_name\\\":\\\"Neeharika\\\",\\n    \\\"last_name\\\":\\\"Bhartiya\\\",\\n    \\\"phone_number\\\":\\\"+12223334444\\\",\\n    \\\"fb_id\\\":null,\\n    \\\"external_id\\\":null,\\n    \\\"email\\\":\\\"\\\",\\n    \\\"current_state\\\":\\\"claimed\\\",\\n    \\\"subscribed\\\":true,\\n    \\\"unsubscribed_at\\\":null,\\n    \\\"link\\\":\\\"https://www.sendsonar.com/thread/gr3jeo\\\",\\n    \\\"created_at\\\":\\\"2018-02-10T00:26:53Z\\\",\\n    \\\"company_publishable_key\\\":\\\"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\\\"\\n  }\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Tag Added To Message\"\n    },\n    {\n      \"code\": \"{\\n\\t\\\"uuid\\\":\\\"ee729522-2106-46c8-9090-45a76017563e\\\",\\n  \\\"action\\\":\\\"tag_removed_from_message\\\",\\n  \\\"message\\\":{\\n    \\\"message_id\\\":\\\"f6d39d9d-8432-43cb-b45a-10ed32abd2d3\\\",\\n    \\\"text\\\":\\\"Hi\\\",\\n    \\\"type\\\":\\\"SMSMessage\\\",\\n    \\\"link\\\":\\\"https://www.sendsonar.com/thread/gr3jeo\\\",\\n    \\\"direction\\\":\\\"sent\\\",\\n    \\\"media_url\\\":\\\"\\\",\\n    \\\"media_objects\\\":null,\\n    \\\"created_at\\\":\\\"2018-02-11T17:30:01Z\\\",\\n    \\\"away_message\\\":false,\\n    \\\"campaign_slug\\\":null,\\n    \\\"batch_id\\\":null\\n  },\\n  \\\"tag\\\":{\\n    \\\"tag_name\\\":\\\"_calendlyconfirmed\\\",\\n    \\\"tag_color\\\":\\\"#E8A3FF\\\",\\n    \\\"tag_type\\\":\\\"CompanyTag\\\"\\n  },\\n  \\\"customer\\\":{\\n    \\\"customer_id\\\":\\\"a1d6df19-d84a-43b9-937d-440288635803\\\",\\n    \\\"first_name\\\":\\\"Neeharika\\\",\\n    \\\"last_name\\\":\\\"Bhartiya\\\",\\n    \\\"phone_number\\\":\\\"+12223334444\\\",\\n    \\\"fb_id\\\":null,\\n    \\\"external_id\\\":null,\\n    \\\"email\\\":\\\"\\\",\\n    \\\"current_state\\\":\\\"claimed\\\",\\n    \\\"subscribed\\\":true,\\n    \\\"unsubscribed_at\\\":null,\\n    \\\"link\\\":\\\"https://www.sendsonar.com/thread/gr3jeo\\\",\\n    \\\"created_at\\\":\\\"2018-02-10T00:26:53Z\\\",\\n    \\\"company_publishable_key\\\":\\\"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\\\"\\n  }\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Tag Removed From Message\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"custom-webhooks","type":"basic","title":"Custom Webhooks"}
While you can automate the sending of messages using Sonar's API, you may want to flip things around and do something in your application based on what is happening in Sonar. This is where [Webhooks](https://en.wikipedia.org/wiki/Webhook) come in! Custom (outbound) Webhooks allow you to register a URL that we will notify anytime an event happens in your Sonar account. When the event occurs - for example, when a new unassigned message comes in, Sonar will send relevant data to the URL in your account's webhooks setting via the [Webhooks modal](https://www.sendsonar.com/?modal=CustomWebhook). We offer webhooks for the following events in Sonar: * New Unassigned Messages * New Assigned Messages * Outbound Messages * Team Member Assignments * Customer Subscribed * Customer Unsubscribed We will retry a webhook up to a **maximum of 4 times**, unless the status code returns with a "2xx" response. The schedule for the retries will be at 10 secs, 30 secs, 3 mins, and 30 mins. Also, a **unique identifier (uuid)** is included for each webhook. You might use webhooks for: * Adding or updating customer's information in your database or system * Sending an automated welcome message via API when new customer has subscribed * Logging incoming Sonar messages received into a Google Sheet * Trigger actions based on customer's response in a message ##Setting up Custom Webhooks To set up Custom Webhooks: 1. Log in to your Sonar account 2. Go to "Settings" in the Left Menu Bar 3. Click "Custom Webhooks" Here you'll see settings to turn certain Outbound Webhooks on and off. You'll also be able to specify the URL we should send the payload to. [block:image] { "images": [ { "image": [ "https://files.readme.io/0ee72df-Screenshot_2016-08-19_15.39.38.png", "Screenshot 2016-08-19 15.39.38.png", 665, 391, "#a1cced" ] } ] } [/block] ##Webhook Payloads The information to your callback URL will be in JSON and will look like this: [block:code] { "codes": [ { "code": "{ \n \"message_id\":\"d22eaa3b-0daa-4619-943e-16f49388d73a\", \n \"uuid\":\"eacec4d6-fd66-4553-99dd-9b928ac95a18\",\n \"external_id\":\"X6D2Xp_g8gkZTfOaWrUXmQ==\",\n \"action\":\"outbound_message\",\n \"text\":\"test\",\n \"from_name\":\"Neeharika Bhartiya\",\n \"type\":\"SMSMessage\",\n \"link\":\"https://www.sendsonar.com/thread/gr3jeo\",\n \"direction\":\"sent\",\n \"media_url\":\"\",\n \"media_objects\":null,\n \"created_at\":\"2018-02-07T19:57:25Z\",\n \"away_message:\": null,\n \"campaign_slug\": null,\n \"customer\":{\n \"customer_id\": \"123\",\n \"first_name\":\"Neeharika\",\n \"last_name\":\"Bhartiya\",\n \"phone_number\":\"+12223334444\",\n \"fb_id\":null,\n \"external_id\":null,\n \"email\":null,\n \"current_state\": null,\n \"subscribed\": null,\n \"unsubscribed_at\": null,\n \"link\": null,\n \"company_publishable_key\":\"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\"\n },\n \"to_name\":\"Neeharika Bhartiya\",\n \"user\":{ \n \"first_name\":\"Neeharika\",\n \"last_name\":\"Bhartiya\",\n \"email\":\"neeharika@sendsonar.com\"\n }\n}", "language": "json", "name": "Outbound Message" }, { "code": "{ \n \"message_id\":\"345d4798-0eec-447d-9fb0-beb9bab939b3\", \n \"uuid\":\"eacec4d6-fd66-4553-99dd-9b928ac95a18\",\n \"action\":\"new_assigned_message\",\n \"text\":\"hey!\",\n \"from_name\":\"Neeharika Bhartiya\",\n \"type\":\"SMSMessage\",\n \"link\":\"https://www.sendsonar.com/thread/gr3jeo\",\n \"direction\":\"received\",\n \"media_url\":\"\",\n \"media_objects\": null,\n \"created_at\":\"2018-02-07T19:57:25Z\",\n \"away_message\": false,\n \"campaign_slug\": null,\n \"customer\":{ \n \"customer_id\": \"123\",\n \"first_name\":\"Neeharika\",\n \"last_name\":\"Bhartiya\",\n \"phone_number\":\"+12223334444\",\n \"fb_id\":null,\n \"external_id\":null,\n \"email\":null,\n \"current_state\": null,\n \"subscribed\": null,\n \"unsubscribed_at\": null,\n \"link\": null,\n \"company_publishable_key\":\"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\"\n },\n \"user\":{ \n \"first_name\":\"Neeharika\",\n \"last_name\":\"Bhartiya\",\n \"email\":\"neeharika@sendsonar.com\"\n },\n /* note: this section exists only if the new message is a reply to a campaign*/\n \"campaign\":{ \n \"slug\": \"CLKkAS\",\n \"name\": \"nps\",\n \"parsed_value\": \"8\",\n\t},\n}", "language": "json", "name": "New Assigned Message" }, { "code": "{ \n \"message_id\":\"7f0fd8ce-4afc-4c94-a989-b4e6b38b9d96\", \n \"uuid\":\"eacec4d6-fd66-4553-99dd-9b928ac95a18\",\n \"external_id\":\"HYqg7iZYndEiQsFXr7VRBw==\",\n \"action\":\"new_unassigned_message\",\n \"text\":\"Hi\",\n \"from_name\":\"Neeharika Bhartiya\",\n \"type\":\"SMSMessage\",\n \"link\":\"https://www.sendsonar.com/thread/gr3jeo\",\n \"direction\":\"received\",\n \"media_url\":\"\",\n \"media_objects\": null,\n \"created_at\":\"2017-02-07T19:57:25Z\",\n \"away_message\": null,\n \"campaign_slug\": null,\n \"customer\":{ \n \"customer_id\": \"123\",\n \"first_name\":\"Neeharika\",\n \"last_name\":\"Bhartiya\",\n \"phone_number\":\"+12223334444\",\n \"fb_id\":null,\n \"external_id\":null,\n \"email\":null,\n \"current_state\": null,\n \"subscribed\": null,\n \"unsubscribed_at\": null,\n \"link\": null,\n \"company_publishable_key\":\"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\"\n },\n \"user\":{ \n \"first_name\":\"Neeharika\",\n \"last_name\":\"Bhartiya\",\n \"email\":\"neeharika@sendsonar.com\"\n },\n /* note: this section exists only if the new message is a reply to a campaign*/\n \"campaign\":{ \n \"slug\": \"CLKkAS\",\n \"name\": \"nps\",\n \"parsed_value\": \"8\",\n\t},\n}", "language": "json", "name": "New Unassigned Message" }, { "code": "{ \n \"uuid\":\"eacec4d6-fd66-4553-99dd-9b928ac95a18\",\n \"action\":\"user_assignment\",\n \"text\":\"Rebecca Chow was just assigned to customer Neeharika Bhartiya\",\n \"to_name\":\"Rebecca Chow\",\n \"link\":\"https://www.sendsonar.com/thread/gr3jeo\",\n \"customer\":{ \n \"customer_id\": \"123\",\n \"first_name\":\"Neeharika\",\n \"last_name\":\"Bhartiya\",\n \"phone_number\":\"+12223334444\",\n \"fb_id\":null,\n \"external_id\":null,\n \"email\":null,\n \"current_state\": claimed,\n \"subscribed\": null,\n \"unsubscribed_at\": null,\n \"link\":\"https://www.sendsonar.com/thread/gr3jeo\",\n \"company_publishable_key\":\"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\"\n }\n}", "language": "json", "name": "Team Member Assignment" }, { "code": "{ \n \"uuid\":\"eacec4d6-fd66-4553-99dd-9b928ac95a18\",\n \"action\":\"customer_subscribed\",\n \"customer\":{ \n \"customer_id\": \"123\",\n \"first_name\":\"Neeharika\",\n \"last_name\":\"Bhartiya\",\n \"phone_number\":\"+12223334444\",\n \"fb_id\":null,\n \"external_id\":null,\n \"email\":null,\n \"current_state\": null,\n \"subscribed\": true,\n \"unsubscribed_at\": null,\n \"link\": null,\n \"company_publishable_key\":\"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\"\n }\n}", "language": "json", "name": "Customer Subscribed" }, { "code": "{ \n \"uuid\":\"eacec4d6-fd66-4553-99dd-9b928ac95a18\",\n \"action\":\"customer_unsubscribed\",\n \"customer\":{ \n \"customer_id\": \"123\",\n \"first_name\":\"Neeharika\",\n \"last_name\":\"Bhartiya\",\n \"phone_number\":\"+12223334444\",\n \"fb_id\":null,\n \"external_id\":null,\n \"email\":null,\n \"current_state\": null,\n \"subscribed\": false,\n \"unsubscribed_at\": null,\n \"link\": null,\n \"company_publishable_key\":\"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\"\n }\n}", "language": "json", "name": "Customer Unsubscribed" }, { "code": "{ \n \"uuid\":\"eacec4d6-fd66-4553-99dd-9b928ac95a18\",\n \"action\":\"customer_created\",\n \"link\": null,\n \"customer\":{\n \"customer_id\": \"123\",\n \"first_name\":\"Neeharika\",\n \"last_name\":\"Bhartiya\",\n \"phone_number\":\"+12223334444\",\n \"fb_id\":null,\n \"external_id\":null,\n \"email\":null,\n \"current_state\": null,\n \"subscribed\": null,\n \"unsubscribed_at\": null,\n \"link\": null,\n \"created_at\": \"2018-02-07T19:57:25Z\",\n \"company_publishable_key\":\"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\"\n }\n}", "language": "json", "name": "Customer Created" }, { "code": "{\n \"uuid\":\"d836ad44-16da-4b9e-9bb8-fbb45a51fc63\",\n \"action\":\"tag_added_to_message\",\n \"message\":{\n \"message_id\":\"04369c55-612f-4880-9bcb-864951e264fe\",\n \"text\":\"Friendly reminder\",\n \"type\":\"SMSMessage\",\n \"link\":\"https://www.sendsonar.com/thread/gr3jeo\",\n \"direction\":\"sent\",\n \"media_url\":\"\",\n \"media_objects\":null,\n \"created_at\":\"2018-02-12T17:15:01Z\",\n \"away_message\":false,\n \"campaign_slug\":null\n \"batch_id\":null\n },\n \"tag\":{\n \"tag_name\":\"_calendlyreminder\",\n \"tag_color\":\"#FAC9B8\",\n \"tag_type\":\"CompanyTag\"\n },\n \"customer\":{\n \"customer_id\":\"a1d6df19-d84a-43b9-937d-440288635803\",\n \"first_name\":\"Neeharika\",\n \"last_name\":\"Bhartiya\",\n \"phone_number\":\"+12223334444\",\n \"fb_id\":null,\n \"external_id\":null,\n \"email\":\"\",\n \"current_state\":\"claimed\",\n \"subscribed\":true,\n \"unsubscribed_at\":null,\n \"link\":\"https://www.sendsonar.com/thread/gr3jeo\",\n \"created_at\":\"2018-02-10T00:26:53Z\",\n \"company_publishable_key\":\"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\"\n }\n}", "language": "json", "name": "Tag Added To Message" }, { "code": "{\n\t\"uuid\":\"ee729522-2106-46c8-9090-45a76017563e\",\n \"action\":\"tag_removed_from_message\",\n \"message\":{\n \"message_id\":\"f6d39d9d-8432-43cb-b45a-10ed32abd2d3\",\n \"text\":\"Hi\",\n \"type\":\"SMSMessage\",\n \"link\":\"https://www.sendsonar.com/thread/gr3jeo\",\n \"direction\":\"sent\",\n \"media_url\":\"\",\n \"media_objects\":null,\n \"created_at\":\"2018-02-11T17:30:01Z\",\n \"away_message\":false,\n \"campaign_slug\":null,\n \"batch_id\":null\n },\n \"tag\":{\n \"tag_name\":\"_calendlyconfirmed\",\n \"tag_color\":\"#E8A3FF\",\n \"tag_type\":\"CompanyTag\"\n },\n \"customer\":{\n \"customer_id\":\"a1d6df19-d84a-43b9-937d-440288635803\",\n \"first_name\":\"Neeharika\",\n \"last_name\":\"Bhartiya\",\n \"phone_number\":\"+12223334444\",\n \"fb_id\":null,\n \"external_id\":null,\n \"email\":\"\",\n \"current_state\":\"claimed\",\n \"subscribed\":true,\n \"unsubscribed_at\":null,\n \"link\":\"https://www.sendsonar.com/thread/gr3jeo\",\n \"created_at\":\"2018-02-10T00:26:53Z\",\n \"company_publishable_key\":\"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\"\n }\n}", "language": "json", "name": "Tag Removed From Message" } ] } [/block]