Add device to user
Push notifications require a device ID (or multiple) to be associated to the user.
To add a device ID to the user, make a POST request to /devices passing udid as the device ID. This will be added to the current user identified by the access token
Attributes
-
udid: the device id to be added to the user
Route
POST /api/v1/devices
Example Response
{
"id": null,
"type": "home",
"data": {
"menu": {
"items": [{
"label": "Driven Daily",
"url": "feed",
"symbol": "li-brain"
},
{
"label": "My Stats",
"url": "https://baseurl.com/activities/:activity_id",
"symbol": "li-clipboard-check"
},
{
"label": "Explore",
"url": "https://baseurl.com/activities/:activity_id",
"symbol": "li-satellite2"
},
{
"label": "Managers",
"url": "https://baseurl.com/activities/:activity_id",
"symbol": "li-users2"
},
{
"label": "History",
"url": "https://baseurl.com/history",
"symbol": "li-history2"
},
{
"label": "Support",
"url": "https://baseurl.com/activities/:activity_id",
"symbol": "li-phone-wave"
}
]
},
"home_url": "https://baseurl.com/feed",
"nav_bar": {
"logo_url": "url_for_picture",
"tools": {
"visibility": true,
"url": "https://baseurl.com/activities/:activity_id"
},
"points": {
"visibility": true,
"amount": 140,
"url": "url_for_points"
}
},
"user": {
"first_name": "Name1",
"email": "email@example.corn",
"img_url": "url_for_picture"
}
}
}