The Vibes Push Device Callbacks for our Vibes Push Notifications SDK are triggered when a device is added, moved, updated, or removed from a person. To receive callbacks, please make sure your endpoint is compatible with our endpoint specifications.
Before you register...
Set up your endpoint before sending any callback configurations. Do not use a "fake" URL to test the configuration, as this will result in errors.
Available Callbacks
Device Added Callback
This callback is triggered when a device is added to a person record, or when a device is moved from one person record to another.
Callback configuration
When registering for this callback, your request body should look something like the below example.
{
"callback_type": "device_added",
"device_added": {
"app_id": "YOUR_APPLICATION_ID"
},
"destination":{
"url":"YOUR_DESTINATION_URL_W_HTTPS", /*Do not use a "fake" URL (such as google.com).*/
"method":"POST",
"content_type":"application/json"
}
}
Callback body
The callback body will include a reference to the device that was added.
{
"event_id": "AB234SDFD234",
"callback_type": "device_added",
"event_type": "device_added", //deprecated
"event_date": "2017-03-15T15:42:23Z",
"person": {
"person_id": "ABC123",
"external_id": "ex1234",
"url": "/companies/:company_key/mobiledb/persons/ABC123"
},
"push_device": {
"app_id": "abe57f09-3126-4a7e-abc5-cac779710fd7",
"vibes_device_id": "92e9d683-dd1e-4646-88d7-b89fc415a5c1",
"push_token": "62171B3484EE776DB11083F06C90CF970B9C50AC263F46F5B3FBA3CBAF23601F",
"device_os": "ANDROID",
"url": "/mobile_apps/abe57f09-3126-4a7e-abc5-cac779710fd7/devices/92e9d683-dd1e-4646-88d7-b89fc415a5c1"
}
}
Device Removed Callback
This callback is triggered when a device is removed from a person record, or when a device is moved from one person record to another.
Callback configuration
When registering for this callback, your request body should look something like the below example.
{
"callback_type": "device_removed",
"device_added": {
"app_id": "YOUR_APPLICATION_ID"
},
"destination":{
"url":"YOUR_DESTINATION_URL_W_HTTPS", /*Do not use a "fake" URL (such as google.com).*/
"method":"POST",
"content_type":"application/json"
}
}
Callback body
The callback body contains a reference to the device that was added.
{
"event_id": "AB234SDFD234",
"callback_type": "device_removed",
"event_type": "device_removed", //deprecated
"event_date": "2017-03-15T15:42:23Z",
"person": {
"person_id": "ABC123",
"external_id": "ex1234",
"url": "/companies/:company_id/mobiledb/persons/ABC123"
},
"push_device": {
"app_id": "abe57f09-3126-4a7e-abc5-cac779710fd7",
"vibes_device_id": "92e9d683-dd1e-4646-88d7-b89fc415a5c1",
"push_token": "62171B3484EE776DB11083F06C90CF970B9C50AC263F46F5B3FBA3CBAF23601F",
"device_os": "ANDROID",
"url": "/mobile_apps/abe57f09-3126-4a7e-abc5-cac779710fd7/devices/92e9d683-dd1e-4646-88d7-b89fc415a5c1"
}
}
Device Updated Callback
This callback is triggered when an Apple or Google push_token is added or removed from a device. A push_token
is what allows a user to receive push notifications on their specific device. If they do not have push notifications enabled, the push_token
value will be empty.
Callback configuration
When registering for this callback, your request body should look something like the below example.
{
"callback_type": "device_updated",
"device_added": {
"app_id": "YOUR_APPLICATION_ID"
},
"destination":{
"url":"YOUR_DESTINATION_URL_W_HTTPS", /*Do not use a "fake" URL (such as google.com).*/
"method":"POST",
"content_type":"application/json"
}
}
Callback body
The push_device
object contains a reference to the device that was updated. The push_token
is the value provided by Apple or Google to send notifications to those systems.
- If push is enabled, the value will be present.
- If push is disabled, the value will be blank.
{
"event_id": "AB234SDFD234",
"callback_type": "device_updated",
"event_type": "device_updated", //deprecated
"event_date": "2017-03-15T15:42:23Z",
"person": {
"person_id": "ABC123",
"external_id": "ex1234",
"url": "/companies/:company_id/mobiledb/persons/ABC123"
},
"push_device": {
"app_id": "abe57f09-3126-4a7e-abc5-cac779710fd7",
"vibes_device_id": "92e9d683-dd1e-4646-88d7-b89fc415a5c1",
"push_token": "62171B3484EE776DB11083F06C90CF970B9C50AC263F46F5B3FBA3CBAF23601F",
"device_os": "ANDROID",
"url": "/mobile_apps/abe57f09-3126-4a7e-abc5-cac779710fd7/devices/92e9d683-dd1e-4646-88d7-b89fc415a5c1"
}
}