curl https://api.thanxsandbox.com/push_registrations \
-X PUT \
-H "Content-Type: application/json" \
-H "Accept-Version: v4.0" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${token}" \
-H "X-ClientId: ${client_id}"
-d '{
"push_registration": {
"device_type": "ios",
"token": "wourdweroi238432423425fsgd"
}
}'
{
"push_registration": {
"token": "wourdweroi238432423425fsgd",
"device_type": "ios"
}
}
Push Registrations
Create Push Registration
This endpoint creates or updates a push registration record for a user’s device.
PUT
/
push_registrations
curl https://api.thanxsandbox.com/push_registrations \
-X PUT \
-H "Content-Type: application/json" \
-H "Accept-Version: v4.0" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${token}" \
-H "X-ClientId: ${client_id}"
-d '{
"push_registration": {
"device_type": "ios",
"token": "wourdweroi238432423425fsgd"
}
}'
{
"push_registration": {
"token": "wourdweroi238432423425fsgd",
"device_type": "ios"
}
}
Please review proper request headers here.
Parameters
enum
required
The type of device: (
ios, android)string
required
The token returned by the local push notification library
Response
enum
required
The type of device: (
ios, android)string
required
The token returned by the local push notification library
curl https://api.thanxsandbox.com/push_registrations \
-X PUT \
-H "Content-Type: application/json" \
-H "Accept-Version: v4.0" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${token}" \
-H "X-ClientId: ${client_id}"
-d '{
"push_registration": {
"device_type": "ios",
"token": "wourdweroi238432423425fsgd"
}
}'
{
"push_registration": {
"token": "wourdweroi238432423425fsgd",
"device_type": "ios"
}
}