# Push Notification API Landing: https://developers.vsee.io/api/push-notification-api · Spec JSON: https://developers.vsee.io/specs/push_notification_api_openapi.json Base URL: https://api.vseepreview.com/api_v3 ### Endpoint Types | Value | Meaning | |-------|---------| | 10 | Email | | 30 | Apple Push Notification (APNS) | | 40 | Google Cloud Messaging (GCM/FCM) | This API is primarily for mobile app push notification registration. ## POST /endpoints URL: https://developers.vsee.io/api/push-notification-api/post/endpoints Auth: User Token — Requires a user access token from login or SSO. Register device endpoint Register a new device for push notifications Register a device for push notifications. **Parameters:** - `key` — Device token (for Apple) or registration ID (for Android) - `type` — 30 for Apple Push Notification, 40 for Google Cloud Messaging Parameters: - X-ApiToken (header, string, required) — API token Request body (application/x-www-form-urlencoded): - key (string, required) — Device token (Apple) or registration ID (Android) - type (integer, required) — Device type: 30=APNS (Apple), 40=GCM (Google) Example request: ```json { "key": "string", "type": 0 } ``` Responses: - 200 — Successful registration ```json { "data": { "id": "551c5f64-a6d8-425d-b89c-581fac1f0144", "key": "123456", "user_id": "201", "type": 30, "created": 1427922788, "modified": 1427922788 } } ``` ## GET /endpoints URL: https://developers.vsee.io/api/push-notification-api/get/endpoints Auth: User Token — Requires a user access token from login or SSO. List endpoints Retrieve all notification endpoints for current user Parameters: - X-ApiToken (header, string, required) — API token - type (query, integer, optional) — Device type: 30=APNS, 40=GCM. Empty for all types. Responses: - 200 — Successful response ```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} URL: https://developers.vsee.io/api/push-notification-api/get/endpoints/%7Bid%7D Auth: User Token — Requires a user access token from login or SSO. Get endpoint Retrieve a specific notification endpoint Parameters: - X-ApiToken (header, string, required) — API token - id (path, string, required) — Endpoint ID Responses: - 200 — Successful response ```json { "data": { "id": "551c5f64-a6d8-425d-b89c-581fac1f0144", "key": "123456", "user_id": "201", "type": 30, "created": 1427922788, "modified": 1427922788 } } ``` ## DELETE /endpoints/{id} URL: https://developers.vsee.io/api/push-notification-api/delete/endpoints/%7Bid%7D Auth: User Token — Requires a user access token from login or SSO. Delete endpoint Delete a notification endpoint Parameters: - X-ApiToken (header, string, required) — API token - id (path, string, required) — Endpoint ID Responses: - 200 — Successful deletion ```json { "data": { "id": "551c5f64-a6d8-425d-b89c-581fac1f0144" } } ``` ## GET /notifications URL: https://developers.vsee.io/api/push-notification-api/get/notifications Auth: User Token — Requires a user access token from login or SSO. List notifications Retrieve notifications for current user Parameters: - X-ApiToken (header, string, required) — API token - size (query, integer, optional) — Fetch size — how many records to return. Default: 10. - last (query, integer, optional) — Unix timestamp in milliseconds. Only fetch notifications before this time. Use the `mtime` field from previous responses for pagination. Responses: - 200 — Successful response ```json { "data": [ { "id": "570f3f04-f1f4-4805-946e-178d50e631f8", "user_id": "201", "type": "foodlog.comment", "time": "1460616964", "mtime": 14606169641000, "is_new": false, "read": false, "title": "Johnathon Lavon commented on a photo", "image": "http://api.vsee.me/files/index/food/photo/1/250x250?auth_code=EXAMPLE_AUTH_CODE" } ] } ``` ## PUT /notifications/{id} URL: https://developers.vsee.io/api/push-notification-api/put/notifications/%7Bid%7D Auth: User Token — Requires a user access token from login or SSO. Mark notification as read Mark a notification as read Parameters: - X-ApiToken (header, string, required) — API token - id (path, string, required) — Notification ID Responses: - 200 — Successful update ```json { "data": { "id": "570f3f04-f1f4-4805-946e-178d50e631f8", "user_id": "201", "type": "foodlog.comment", "time": 1460616964, "mtime": 14606169641000, "is_new": false, "read": true, "title": "Johnathon Lavon commented on a photo" } } ``` ## GET /notifications/badge URL: https://developers.vsee.io/api/push-notification-api/get/notifications/badge Auth: User Token — Requires a user access token from login or SSO. Get badge count Get the badge number for notifications Parameters: - X-ApiToken (header, string, required) — API token Responses: - 200 — Successful response ```json { "data": 5 } ``` ## POST /notifications/badge URL: https://developers.vsee.io/api/push-notification-api/post/notifications/badge Auth: User Token — Requires a user access token from login or SSO. Reset badge count Reset the badge number for notifications Parameters: - X-ApiToken (header, string, required) — API token Responses: - 200 — Successful reset ```json { "data": true } ```