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.eyJzdWIiOiIxODI4Iiwic2NwIjoidXNlciIsImF1ZCI6bnVsbCwiaWF0IjoxNzQyNDY0OTUzLCJleHAiOjE3NDUwNTY5NTMsImp0aSI6ImZmYmM4OWExLTg4YTEtNDhhNS1iOGYwLWM5ZTY0Y2M5MjJkYyJ9.YPaTm_UZhjvayJgFwuiccrOzXUeGltw-9RPKKIwhp0Y
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: 69a9ea21-6f31-4d03-ba1f-df6ad1b1eae5
x-runtime: 0.017174
content-length: 63

Body

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