Notifications

Add token to user device notification tokens list

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.eyJzdWIiOiIxODUyIiwic2NwIjoidXNlciIsImF1ZCI6bnVsbCwiaWF0IjoxNzQ4NTE2NTQwLCJleHAiOjE3NTExMDg1NDAsImp0aSI6ImFmYTdmZjA3LTllZDEtNDM4YS04MTJmLTIzYzljOGNlYmFmNyJ9.WNdl2mGwiTCodcmmy5Q-ZX867elcFWdyLbNwWRH7Gdk
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: 3212785c-3622-4271-967b-d47a0f1759e5
x-runtime: 0.013372
content-length: 63

Body

{
  "notification": {
    "id": 1,
    "platform": "fcm",
    "token": "test_token"
  }
}