Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Last Updated:

Lastupdatedate

Livesearch
placeholderSearch the Vibes Developer Wiki
typepage



The following methods describe how and why Subscription Added and Subscription Removed callback events are used, including examples.

Subscription Added Callback

Anchor
subscriptionaddedcallback
subscriptionaddedcallback

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.

Callback Body

Code Block
{
   "event_id":"AB234SDFD234",
   "event_type":"subscription_added",
   "event_date":"2017-03-15T15:42:23Z",
   "delivery_attempt":"1",
   "subscription":{
      "person":{
         "id":"ABC123",
         "external_id":"ex1234",
         "url":"/companies/:company_key/mobiledb/persons/ABC123"
      },
      "subscription_list":{
         "id":"1234",
         "url":"/companies/:company_key/mobiledb/subscription_lists/1234"
      },
      "opt_in_date":"2017-01-15T15:34:52Z"
   }
}

Subscription Removed Callback

Anchor
subscriptionremovedcallback
subscriptionremovedcallback

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.

Callback Body

Code Block
{
   "event_id":"AB234SDFD234",
   "event_type":"subscription_removed",
   "event_date":"2017-03-15T15:42:23Z",
   "delivery_attempt":"1",
   "subscription":{
      "person":{
         "id":"ABC123",
         "external_id":"ex1234",
         "url":"/companies/:company_key/mobiledb/persons/ABC123"
      },
      "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"
   }
}


The opt_out_reason values for the disconnect are as follows.

  • user_opt_out
  • disconnect
  • list_archived
  • bulk_opt_out
  • failed_at_carrier
  • obsolete_carrier
Note
Note: Vibes may add additional opt_out_reason options in the future.