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.eyJzdWIiOiIxODg1Iiwic2NwIjoidXNlciIsImF1ZCI6bnVsbCwiaWF0IjoxNzYzNjI2NDEzLCJleHAiOjE3NjYyMTg0MTMsImp0aSI6ImNiYjIzMzcyLTkyNDItNDViNy05MzE5LWU1NThlOWI0NGY3ZiJ9.nRFvqe43gInf-YNsuWrDr0QjbzCRClvT2XVd69p_WFM
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: 50547ddf-e15e-405a-9fe3-eab97737c580
x-runtime: 0.013907
content-length: 63
Body
{
"notification": {
"id": 1,
"platform": "fcm",
"token": "test_token"
}
}