Push Registrations
Create Push Registration
Push Registrations
Create Push Registration
This endpoint creates or updates a push registration record for a user's device.
PUT
/push_registrations
Bearer*
curl --request PUT \
--url https://api.thanx.com/push_registrations \
--header 'Authorization: Bearer <token>' \
--data '{
"device_type": "<device_type>",
"token": "<token>"
}'
Parameters
device_typerequired
enum
The type of device: (ios
, android
)
tokenrequired
string
The token returned by the local push notification library
Response
device_typerequired
enum
The type of device: (ios
, android
)
tokenrequired
string
The token returned by the local push notification library
curl https://api.thanxsandbox.com/push_registrations \
-X PUT \
$AUTH_HEADERS
-d '{
"push_registration": {
"device_type": "ios",
"token": "wourdweroi238432423425fsgd"
}
}'
{
"push_registration": {
"token": "wourdweroi238432423425fsgd",
"device_type": "ios"
}
}
curl https://api.thanxsandbox.com/push_registrations \
-X PUT \
$AUTH_HEADERS
-d '{
"push_registration": {
"device_type": "ios",
"token": "wourdweroi238432423425fsgd"
}
}'
{
"push_registration": {
"token": "wourdweroi238432423425fsgd",
"device_type": "ios"
}
}