/api/notifications and require authentication.
AI Review supports multiple notification channels: email, Slack, webhook, WeChat Work (企业微信), DingTalk (钉钉), Feishu (飞书), and browser push.
Get notification config
GET /api/notifications/config
Returns the current notification configuration.
200
object
Create or replace notification config
POST /api/notifications/config
Creates or completely replaces the notification configuration. Requires config:update permission.
200
object
The saved notification config.
Partially update notification config
PATCH /api/notifications/config
Updates only the provided fields in the notification config. Requires config:update permission.
Send only the fields you want to change. All other fields remain unchanged.
Test a notification channel
POST /api/notifications/config/test-channel
Sends a test notification through the specified channel to verify the configuration is working.
Request body
string
required
The channel to test:
email | webhook | slack | wechat | dingtalk | feishu | push.200
object
Test result details including success status and any error message.
Generate VAPID keys
POST /api/notifications/config/generate-vapid-keys
Generates a new VAPID key pair for use with browser push notifications. Requires config:update permission.
Store the private key securely — it cannot be recovered after leaving this response.
200
object
List notification history
GET /api/notifications
Returns a paginated list of notification history records.
number
Page number. Default:
1.number
Items per page.
string
Filter by channel:
email | webhook | slack | wechat | dingtalk | feishu | push.string
Filter by delivery status:
pending | sent | failed.string
Filter by event type:
review_completed | review_failed | rating_low | daily_summary | weekly_summary.string
Filter by review UUID.
string
ISO 8601 start date.
string
ISO 8601 end date.
200
array
Get a notification history record
GET /api/notifications/history/:id
string
required
Notification history record ID.
200
object
Single notification history record.
Get notification statistics
GET /api/notifications/stats
Returns delivery statistics aggregated by channel and status.
string
ISO 8601 start date for the statistics window.
string
ISO 8601 end date for the statistics window.
200
object
Aggregated notification statistics.
Get pending notifications
GET /api/notifications/pending
Returns all notifications currently in pending status (awaiting delivery).
Get failed notifications
GET /api/notifications/failed
Returns all notifications with failed delivery status.
Clean old notifications
POST /api/notifications/clean
Deletes notification history records older than the specified number of days. Requires notification:delete permission.
Request body
number
required
Delete records older than this many days.
200
number
Number of records deleted.
Push subscription management
Subscribe to push notifications
POST /api/notifications/push/subscribe
Registers a browser push subscription endpoint.
Request body
string
required
The push subscription endpoint URL from the browser.
object
required
List all push subscriptions
GET /api/notifications/push/subscriptions
Returns all registered push subscriptions.
Get push subscriptions for a user
GET /api/notifications/push/users/:userId
string
required
User ID whose subscriptions to retrieve.
Update subscription last-used timestamp
POST /api/notifications/push/touch
string
required
The push subscription endpoint to update.
Unsubscribe from push notifications
DELETE /api/notifications/push/unsubscribe
string
required
The push subscription endpoint to remove.
Clean expired push subscriptions
POST /api/notifications/push/clean
Deletes all expired push subscriptions. Requires notification:delete permission.