| Service Name | Register Webhook |
| Service Type | REST |
| Method | POST |
| UAT (Sandbox) URL |
https://integration.uat.marley.ai/webhooks/register |
| Production URL | https://integration.himarley.io/webhooks/register |
| Technical Documentation | API Endpoint - Postman Collection |
This API will allow you to register a Webhook Subscription for your Org.
Table of Contents
API Request
Flow
- Call the endpoint with your API key and pass the Event ID, HTTP Post Address, and any Headers in the body of the Webhook subscription.
Validation Flow
- Event ID is a valid Hi Marley Event.
- HTTP Post Address is an exposed URL.
Hi Marley Webhook Events Table
| Hi Marley Event ID | Hi Marley Event | Hi Marley Action | Description | JSON Registration Body Example |
| 1 | OPT_OUT | POST | Action to post to a designated http address with the user information when an insured opts out of conversation on the Marley platform. The HEADERS value is optional. | "{""EVENT_ID"":1,""HTTP_POST_ADDRESS"":""http://mywebaddress.com/optout"",""HEADERS"":{""key"":""value"",""key1"":""value1""}}" |
| 2 | OPT_IN | POST | Action to post to a designated http address with the user information when an insured opts into conversation on the Marley platform. The HEADERS value is optional. | "{""EVENT_ID"":2,""HTTP_POST_ADDRESS"":""http://mywebaddress.com/optin"",""HEADERS"":{""key"":""value"",""key1"":""value1""}}" |
| 3 | CLOSE_CASE | PUSH_CHAT_TO_SFTP | "Action to post the chat transcript of a case to a HM hosted SFTP Site at close of a case in the Marley platform. Format field is used to build a custom file name, any of the fields in a case can be used to build the file name. To use case info in the name surround the path to the desired value around ${}. For example if operators email is a desired part of the name ${primaryContact.email} should be used. Along with all the values in the case partialId (first 9 chars or the case id) and currentDateTime can be used." | "{""EVENT_ID"":3,""PGP_KEY"":""BASE64_PGP_KEY_FOR_OPTIONAL_ENCRYPTION"",""format"":""${caseData.brand}/${primaryContact.first}-${primaryContact.last}/${partialId}"",""redacted"":true}" |
| 4 | SCHEDULED | PUSH_MODIFIED_CHATS_TO_SFTP | Action to post changed chat transcripts for an org to a HM hosted SFTP Site for a set number of days (integer) on a set frequency (DAILY/WEEK). Daily pushes happen at 4:10 AM UTC (12:10 AM EST) and weekly pushes happen at 4:30 AM UTC (12:30 AM EST) on Sundays. | "{""EVENT_ID"":4,""DAYS"":1,""FREQUENCY"":""DAILY"",""PGP_KEY"":""BASE64_PGP_KEY_FOR_OPTIONAL_ENCRYPTION"",""format"":""${caseData.brand}/${primaryContact.first}-${primaryContact.last}/${partialId}"",""redacted"":true}" |
| 5 | SCHEDULED | POST_ON_SCHEDULE | Action to post to an endpoint on a set frequency (DAILY/WEEKLY). The HEADERS value is optional. | "{""EVENT_ID"":5,""FREQUENCY"":""HOUR"",""HTTP_POST_ADDRESS"":""http://mywebaddress.com/optout"",""HEADERS"":{""key"":""value"",""key1"":""value1""}}" |
| 6 | OPT_OUT | POST_FROM_STATIC_IP | Action to post to a designated http address with the user information when an insured opts out of conversation on the Marley platform. The HEADERS value is optional. | "{""EVENT_ID"":6,""HTTP_POST_ADDRESS"":""http://mywebaddress.com/optout"",""HEADERS"":{""key"":""value"",""key1"":""value1""}}" |
| 7 | OPT_IN | POST_FROM_STATIC_IP | Action to post to a designated http address with the user information when an insured opts into conversation on the Marley platform. The HEADERS value is optional. | "{""EVENT_ID"":7,""HTTP_POST_ADDRESS"":""http://mywebaddress.com/optin"",""HEADERS"":{""key"":""value"",""key1"":""value1""}}" |
| 8 | CLOSE_CASE | EMAIL_TRANSCRIPT | Action to email the chat transcript of a case to a designated email address on the close of a case in the Marley platform. Valid values for EMAIL_TYPE are html/pdf/images. | "{""EVENT_ID"":8,""EMAIL_ADDRESS"":""dave.wingert@himarley.com"",""EMAIL_TYPE"":""images"",""CASE_TYPE"":""CLAIM"",""redacted"":true}" |
| 9 | CLOSE_CASE | SEND_SURVEY | Action to send end user a survey on the close of a case in the Marley platform. | "{""EVENT_ID"":9}" |
| 10 | CLOSE_CASE | POST_CASE | Action to post to a designated http address with the case data when the case is closed. The HEADERS value is optional. | "{""EVENT_ID"":10,""HTTP_POST_ADDRESS"":""http://mywebaddress.com/optin"",""HEADERS"":{""key"":""value"",""key1"":""value1""}}" |
| 11 | CLOSE_CASE | POST_CASE_TRANSCRIPT | Action to post to a designated http address with the cases transcript data when the case is closed. The HEADERS value is optional. | "{""EVENT_ID"":11,""HTTP_POST_ADDRESS"":""http://mywebaddress.com/optin"",""HEADERS"":{""key"":""value"",""key1"":""value1""},""redacted"":true,""includeMessageClassifications"":true}" |
| 12 | OPT_IN | POST_FULL_CUSTOMER_DATA | Action to post to a designated http address with the FULL customer data when the customer opts in. The HEADERS value is optional. | "{""EVENT_ID"":12,""HTTP_POST_ADDRESS"":""http://mywebaddress.com/optin"",""HEADERS"":{""key"":""value"",""key1"":""value1""}}" |
| 13 | OPT_OUT | POST_FULL_CUSTOMER_DATA | Action to post to a designated http address with the FULL customer data when the customer opts in. The HEADERS value is optional. | "{""EVENT_ID"":13,""HTTP_POST_ADDRESS"":""http://mywebaddress.com/optin"",""HEADERS"":{""key"":""value"",""key1"":""value1""}}" |
| 14 | MESSAGE | POST_MESSAGE | Action to post to a designated http address with the case data & message data for the message (in or outbound). The HEADERS value is optional. | "{""EVENT_ID"":14,""HTTP_POST_ADDRESS"":""http://mywebaddress.com/optin"",""HEADERS"":{""key"":""value"",""key1"":""value1""},""redacted"":true,""includeMessageClassifications"":true}" |
| 15 | MEDIA_MESSAGE | POST_MEDIA_TO_S3 | Action to post inbound media files to the HM hosted SFTP site when the message comes in from a customer. | "{""EVENT_ID"":15,""PGP_KEY"":""BASE64_PGP_KEY_FOR_OPTIONAL_ENCRYPTION"",""format"":""media/${referenceId}_${caseData.id}_${message.id}_${customer.first}_${customer.last}_${message.createdAt}""}" |
| 16 | CREATE_NOTE | POST | Action to post to a designated http address with the note information when a note is created. The HEADERS value is optional. | "{""EVENT_ID"":16,""HTTP_POST_ADDRESS"":""http://mywebaddress.com/optout"",""HEADERS"":{""key"":""value"",""key1"":""value1""}}" |
| 17 | UPDATE_NOTE | POST | "Action to post to a designated http address with the note information when a note is updated. When a note is 'deleted,' archived is set to TRUE. The HEADERS value is optional." | "{""EVENT_ID"":17,""HTTP_POST_ADDRESS"":""http://mywebaddress.com/optout"",""HEADERS"":{""key"":""value"",""key1"":""value1""}}" |
| 18 | REOPEN_CASE | POST_CASE | Action to post to a designated http address with the case data when the case is reopened. The HEADERS value is optional. | "{""EVENT_ID"":18,""HTTP_POST_ADDRESS"":""http://mywebaddress.com/optin"",""HEADERS"":{""key"":""value"",""key1"":""value1""}}" |
| 19 | CHAT_BOT_FINISHED | POST | Action to post case and chatbot information after a chat-bot flow has concluded. | "{""EVENT_ID"":19,""HTTP_POST_ADDRESS"":""http://mywebaddress.com/optin"",""HEADERS"":{""key"":""value"",""key1"":""value1""}}" |
| 20 | CASE_CREATED | POST | Action to post case when created | "{""EVENT_ID"":20,""HTTP_POST_ADDRESS"":""http://mywebaddress.com/optin"",""HEADERS"":{""key"":""value"",""key1"":""value1""}}" |
| 21 | CASE_REASSIGNED | POST | Action to post case and previous primary contact info after reassignment. | "{""EVENT_ID"":21,""HTTP_POST_ADDRESS"":""http://mywebaddress.com/optin"",""HEADERS"":{""key"":""value"",""key1"":""value1""}}" |
| 22 | MESSAGE_UPDATED | POST | Action to post case and message data when a message object is updated with additional properties.. | "{""EVENT_ID"":22,""HTTP_POST_ADDRESS"":""http://mywebaddress.com/optin"",""HEADERS"":{""key"":""value"",""key1"":""value1""},""redacted"":true}" |
Request Example
https://integration.uat.marley.ai/webhooks/register
{
"EVENT_ID": 14,
"HTTP_POST_ADDRESS": "https://webhook.site/f018c989-811d-4051-839a-b58349535ae2",
"HEADERS": {
"Authorization": "Basic Z3c6c3U=",
"GW-UnknownPropertyHandling": "ignore"
}
}
Request Body Breakdown
| Property | Element | Description | Type | Required | Example |
| EVENT_ID |
The Hi Marley Event ID. |
enum |
true |
"EVENT_ID": 14 | |
| HTTP_POST_ADRESS |
The HTTP Address that you want the payload to be posted to. |
string |
true |
"HTTP_POST_ADDRESS": "https://webhook.site/f018c989-811d-4051-839a-b58349535ae2" | |
|
HEADERS (array) |
header1 |
Header that you'd like to send with the event payload. The header itself is defined by you as well as the value. |
string |
false |
"Authorization": "Basic Z3c6c3U=" |
| header2 |
Header that you'd like to send with the event payload. The header itself is defined by you as well as the value. |
string |
false |
"GW-UnknownPropertyHandling": "ignore" |
API Response
Response Example
{
"ORGANIZATION_ID": "1d2f4e68-d733-477f-acc4-c1c187f0c159",
"SUBSCRIPTION_ID": "c68a6129-b1b7-48bb-81b7-f39864c6a69f",
"EVENT": "MESSAGE",
"REGISTERED_PAYLOAD": {
"EVENT_ID": 14,
"HTTP_POST_ADDRESS": "https://webhook.site/f018c989-811d-4051-839a-b58349535ae21",
"HEADERS": {
"Authorization": "Basic Z3c6c3U=",
"GW-UnknownPropertyHandling": "ignore"
}
}
}
Response Fields Breakdown
| Property | Element | Description | Type | Required | Example |
| ORGANIZATION_ID |
The unique UUID assigned to the Organization at registration. |
string |
true |
"ORGANIZATION_ID": "1d2f4e68-d733-477f-acc4-c1c187f0c159" | |
| SUBSCRIPTION_ID |
The unique UUID assigned to the subscription at registration. |
string |
true |
"SUBSCRIPTION_ID": "c68a6129-b1b7-48bb-81b7-f39864c6a69f" | |
| EVENT |
The Hi Marley Event. |
enum |
true |
"EVENT": "MESSAGE" | |
|
REGISTERED_PAYLOAD |
EVENT_ID | The Hi Marley ID associated to the Event. | int |
true |
"EVENT_ID": 14 |
| HTTP_POST_ADDRESS | The HTTP Address to post the Event Payload to. | string |
true |
"HTTP_POST_ADDRESS": "https://webhook.site/f018c989-811d-4051-839a-b58349535ae21" | |
| HEADERS | This element will return any array of headers that were added as part of the initial webhook subscription. | string |
true |
Headers are dynamic and can be defined upon description to whatever you'd like. |
Comments
0 comments
Please sign in to leave a comment.