A Callback entity is a registration to receive callback events to an external URL. It is identified by a CallbackID, which uniquely identifies the record. Additionally, each callback is unique for a given event type and active date range.
Callback Entity
The following is the JSON representation of a Callback entity within the APIs.
{ "callback_id":"AB3423", "event_type":"person_added", "destination":{ "url":"http://destination.url", "method":"POST", "content_type":"application/json" }, "start_date":"2017-01-01T00:00Z", "end_date":"2017-02-01T00:00Z", "url":"/companies/:id/mobiledb/config/callbacks/:callback_id", "created_at":"2017-04-15T14:30Z", "updated_at":"2017-05-18T19:30Z" }
Elements
Data Element | Type | Description | Required | Default |
---|---|---|---|---|
callback_id | String | Vibes unique identifier for each callback record. | Required |
|
event_type | String | Event type to trigger this callback. | Required |
|
destination.url | String | External URL to submit the callback data. | Required |
|
destination.method | String | Method to submit the data to the destination URL. | Optional | POST |
destination.content_type | String | Content type to set when submitting the data to the destination URL. | Optional | application/json |
start_date | String | Date this callback starts. | Optional | now |
end_date | String | Date this callback ends. | Optional | no end date |
url | String | Unique resource URL for the callback. | N/A |
|
created_at | String | Date this callback was created. | N/A |
|
updated_at | String | Date this callback was last updated. | N/A |
|
Person Event Types
Event Type | Description |
---|---|
person_added | This callback event is triggered when a new Person record is added into the Mobile Database. |
person_updated | This callback event is triggered when an existing Person record has been modified in the Mobile Database. |
Subscription Event Types
Event Type | Description |
---|---|
subscription_added | This callback event is triggered when a Person has been added to a Subscription List. |
subscription_removed | This callback event is triggered when a Person has been removed from a Subscription List. |
Data Element | Type | Description | Required |
---|---|---|---|
list_id | String | Vibes unique identifier for a Subscription list. | Required |
{ ... "event_type": "subscription_added", "subscription_added": { "list_id": "l1234" }, ... }
{ ... "event_type": "subscription_removed", "subscription_removed": { "list_id": "l1234" }, ... }
Acquisition Campaign Event Types
Event Type | Description |
---|---|
ack_participant_added | This callback event is triggered when a new participant has been added to the Acquisition Campaign. |
ack_participant_changed | This callback event is triggered when a participant has confirmed or declined the opt-in. |
Data Element | Type | Description | Required |
---|---|---|---|
campaign_id | String | Vibes unique identifier for an Acquisition Campaign. | Required |
{ ... "event_type": "ack_participant_added", "ack_participant_added": { "campaign_id": "c1234" }, ... }
{ ... "event_type": "ack_participant_changed", "ack_participant_changed": { "campaign_id": "c1234" }, ... }
Subscription List Event Types
subscription_list_added | This callback event is triggered when a new Subscription List has been created in the Mobile Database. |
subscription_list_updated | This callback event is triggered whenever a Subscription List has been modified in the Mobile Database. |
Valid Destination Methods
POST
PUT
Valid Content Types
application/json
text/json
application/xml,
text/xml