[New] Push Notification API

POST /endpoints

Parameters

Parameter

Type

Description

Parameter

Type

Description

key

String

device token (for apple) or registration id (for android)

type

Integer

30 - Apple Push Notification

40 - Google Cloud Messaging

Response

curl -X POST -H "X-ApiToken: 6366a7018a39536a1ef4b63626f8e734" \ -d "key=12345&type=30" \ https://api.vsee.me/api_v3/endpoints { "data": { "id": "551c5f64-a6d8-425d-b89c-581fac1f0144", "key": "123456", "user_id": "201", "type": 30, "created": 1427922788, "modified": 1427922788 } }

GET /endpoints

Retrieve all notification endpoints for current user

Parameters

Parameter

Type

Description

Parameter

Type

Description

type

Integer

(empty) - get all type of endpoints for current user

30 - Apple Push Notification

40 - Google Cloud Messaging

Response

curl -X GET -H "X-ApiToken: 6366a7018a39536a1ef4b63626f8e734" https://api.vsee.me/api_v3/endpoints.json { "data": [ { "id": "551c5f64-a6d8-425d-b89c-581fac1f0144", "key": "123456", "user_id": "201", "type": 30, "arn": "arn:aws:sns:us-west-2:048881245029:endpoint\/APNS\/com.vsee.isos.TeleAssistance\/203fd06c-e559-3fba-a47f-87844eca4e6e", "created": 1427922788, "modified": 1427922788 }, { "id": "551c6005-83d0-48f0-abfe-59c4ac1f0144", "key": "an@vsee.com", "user_id": "201", "type": 10, "created": 1427922949, "modified": 1427922949 } ] }

GET /endpoints/:id

Parameters

Parameter

Type

Description

Parameter

Type

Description

type

Integer

(empty) - get all type of endpoints for current user

30 - Apple Push Notification

40 - Google Cloud Messaging

Response

curl -X GET \ -H "X-ApiToken: 6366a7018a39536a1ef4b63626f8e734" \ https://api.vsee.me/api_v3/endpoints/551c5f64-a6d8-425d-b89c-581fac1f0144 { "data": { "id": "551c5f64-a6d8-425d-b89c-581fac1f0144", "key": "123456", "user_id": "201", "type": 30, "created": 1427922788, "modified": 1427922788 } }

DELETE /endpoints/:id

Parameters

Parameter

Type

Description

Parameter

Type

Description

Response

GET /notifications

Reference here for more information: https://docs.google.com/document/d/1o-FH6yKDd8g4ecRZhJT91O8SL7luucK_zyxIFUaHxSw/edit#heading=h.gpbb94y21tki

Parameters

Parameter

Type

Description

Parameter

Type

Description

size

Integer

(optional) Fetch size, how many records to fetch, default to 10

last

Integer

(optional) unix timestamp in ms, only fetch notifications before this time (please use the fieldĀ mtime)

Response

PUT /notifications/:id

Mark a notification as read

Parameters

Parameter

Type

Description

Parameter

Type

Description

id

String

Notification id

Response

Notification object

GET /notifications/badge

Get the badge number for notifications

Parameters

(None)

Response

POST /notifications/badge

Reset the badge number for notifications

Parameters

(None)

Response