DocsAPI 文件通知 API
👤 全部

通知 API

推播通知與通知中心端點。

推播通知

POST /notifications/push

發送推播通知。

Request Body

參數類型必填說明
`user_id`string目標使用者
`title`string通知標題
`body`string通知內容
`data`object附加數據

POST /notifications/tokens/device

註冊推播 token。

Request Body

參數類型必填說明
`token`stringFCM device token
`platform`string平台(`ios`, `android`)

通知中心

GET /notifications/center

取得通知中心的通知列表。

Query Parameters

參數類型說明
`page_size`int每頁數量
`before`number分頁(epoch ms)

GET /notifications/center/counts

取得未讀通知數量。

Response (200)

{"unread": 5, "total": 120}


PATCH /notifications/center/{notification_id}/read

標記通知為已讀。


POST /notifications/center/mark-all-read

標記所有通知為已讀。


DELETE /notifications/center/{notification_id}

刪除通知。