Add token to user device notification tokens list
Notifications
POST add token
Endpoint
POST /api/v1/users/notifications/token
Parameters
Name | Description |
---|---|
notification[token] required | Notification token |
notification[platform] | Notification platform |
notification[device_id] | Notification device |
Request
Route
POST /api/v1/users/notifications/token
Headers
Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxNzk3Iiwic2NwIjoidXNlciIsImF1ZCI6bnVsbCwiaWF0IjoxNzM3NTUxNTkyLCJleHAiOjE3NDAxNDM1OTIsImp0aSI6IjAxYTExNGUwLTkxYTEtNDgwNS1hMDBmLTRhYjE0OTlhY2VhYyJ9.6EZBFCzo4xpMaN_FHB6AsquqKJdjfldErqDE7MF4U5E
Host: example.org
Cookie:
Body
{
"notification": {
"token": "test_token",
"device_id": "test_id"
}
}
Response
Simulated Response
Status
200
Headers
x-frame-options: SAMEORIGIN
x-xss-protection: 0
x-content-type-options: nosniff
x-permitted-cross-domain-policies: none
referrer-policy: strict-origin-when-cross-origin
content-type: application/json; charset=utf-8
vary: Accept, Origin
etag: W/"1dc4dce3e17d74a9849a786cc434f50a"
cache-control: max-age=0, private, must-revalidate
x-request-id: 76fdec6d-85fa-425b-abb1-0af63be92dfd
x-runtime: 0.015554
content-length: 63
Body
{
"notification": {
"id": 1,
"platform": "fcm",
"token": "test_token"
}
}