Last Updated: Thursday, October 28, 2021
The following methods describe how and why Subscription Added and Subscription Removed callback events are used, including examples.
Subscription Added Callback
This callback event is triggered when a new Subscription has been added to a Person. The Subscription object contains the reference to the Subscription that was added.
Note: MDN formats in callback events are determined by the API version used when creating and altering the callbacks. If Version 2 is used, MDNs will be represented in the E.164 international format. Otherwise, MDNs will be represented without a country code.
Callback Body
{ "event_id":"AB234SDFD234", "callback_type":"subscription_added", "event_type":"subscription_added", //deprecated "event_date":"2017-03-15T15:42:23Z", "subscription":{ "person":{ "id":"ABC123", "external_id":"ex1234", "external_person_id":"ex1234", "person_key":"c5235a1-e243-42z7-979c-7f6234kl21b60", "url":"/companies/:company_key/mobiledb/persons/ABC123", "mobile_phone":{ "mdn":"+1999999999" } }, "subscription_list":{ "id":"1234", "url":"/companies/:company_key/mobiledb/subscription_lists/1234" }, "opt_in_date":"2017-01-15T15:34:52Z" } }
Subscription Removed Callback
This callback event is triggered whenever a Subscription has been removed from a Person. The Subscription object contains reference to the Subscription that was removed.
Note: MDN formats in callback events are determined by the API version used when creating and altering the callbacks. If Version 2 is used, MDNs will be represented in the E.164 international format. Otherwise, MDNs will be represented without a country code.
Callback Body
{ "event_id":"AB234SDFD234", "callback_type":"subscription_removed", "event_type":"subscription_removed", //deprecated "event_date":"2017-03-15T15:42:23Z", "subscription":{ "person":{ "id":"ABC123", "external_id":"ex1234", "external_person_id":"ex1234", "person_key":"c5235a1-e243-42z7-979c-7f6234kl21b60", "url":"/companies/:company_key/mobiledb/persons/ABC123", "mobile_phone":{ "mdn":"+1999999999" } }, "subscription_list":{ "id":"1234", "url":"/companies/:company_key/mobiledb/subscription_lists/1234" }, "opt_in_date":"2017-01-15T15:34:52Z", "opt_out_date":"2017-02-18T15:34:52+0000", "opt_out_reason":"user_opt_out" } }
opt_out_reason values
Opt out reason | Description |
---|---|
disconnect | The device associated with the subscription was disconnected |
list_archived | The list associated with the subscription was archived |
bulk_opt_out | The subscriber was included in a bulk opt out file |
failed_at_carrier | An error from the carrier was received when attempting to deliver an SMS to the device |
obsolete_carrier | Device was on a carrier that is no longer supported by vibes |
platform_opt_out | The subscription was removed manually using the Vibes Platform |
keyword_opt_out | The subscription was removed after receiving a STOP keyword from the device |
api_opt_out | The subscription was removed via the Subscription API |
user_opt_out | Default when no other reason is specified. |
button_opt_out | Opted out via the "subscriptions" tab in the Campaign Manager UI |
Additional Resources
- For information on how to register your endpoint to receive callbacks, see Callback Configuration
- Client Certificate Authentication for Callbacks from the Vibes Platform
2 Comments
Steven Mastandrea
Not sure about these, and the IDs specifically, since the initial thought would be to hide the subscription history. Might make it tough to avoid multiple add/deletes, though. Maybe have them verify opt-in?
Sam Benediktson