Description
Whenever an end-user opts in or out of texting with Hi Marley, this webhook will post user data to a designated HTTP Address so that carriers can store this data in their system of record (or any external system).
Table of Contents
Registering Webhooks
Use the following payloads to subscribe to the user opt-in and user opt-out webhooks using the POST /webhooks/register endpoint
Request Payloads
Note: The Headers array is an optional set of values that can be used to attach specific static headers to each webhook response for any purpose (e.g indicating the type of event, carrier authentication of payload with a token)
{
"EVENT_ID": 1,
"HTTP_POST_ADDRESS": "http://mywebaddress.com/useroptout",
"HEADERS": {
"key1": "value1"
}
}
{
"EVENT_ID": 2,
"HTTP_POST_ADDRESS": "http://mywebaddress.com/useroptin",
"HEADERS": {
"key1": "value1"
}
}
Example Payload Triggered by User Opt-in/out
Headers
content-type application/json
accept application/json
requestid <auto-gen id>
Eventid [1,2]
Eventname [OPT_IN, OPT_OUT]
<other subscribed headers>
Request Body
{
"id": "<customer.id>",
"first": "Jean Luc",
"last": "Picard",
"email": "tester1701@testemail.com",
"mobile": "+1555555555"
}
Implementation Recommendations
- Parse the Eventname and Eventid headers to differentiate between whether a customer is opting in or out
- Update the customer opt status in your system at the customer record level (as opposed to claim or policy level) since the Hi Marley opt status is customer-wide for any texting in your organization.
Comments
0 comments
Article is closed for comments.