Skip to main content
The notification infrastructure is in place for all channels listed below, but individual channel readiness may vary. Verify each channel with the test endpoint before relying on it in production.

Available channels

AI Review includes implementations for the following notification channels:
ChannelIdentifier
Emailemail
Slackslack
Webhookwebhook
DingTalkdingtalk
Feishufeishu
WeChatwechat
Browser Pushpush

Configure notifications

Retrieve current configuration

GET /api/notifications/config
Returns the stored notification configuration object.

Create or replace configuration

POST /api/notifications/config
Content-Type: application/json
Replaces the entire notification configuration. Accepted fields:
FieldTypeDescription
channelsstring[]List of enabled channel identifiers
emailEnabledbooleanEnable or disable email notifications
slackWebhookUrlstring (URL)Incoming webhook URL for Slack
dingtalkWebhookUrlstring (URL)Incoming webhook URL for DingTalk
feishuWebhookUrlstring (URL)Incoming webhook URL for Feishu

Partial update

PATCH /api/notifications/config
Content-Type: application/json
Accepts the same fields as POST but only updates the supplied keys.

Channel configuration

Set slackWebhookUrl to your Slack incoming webhook URL and include "slack" in the channels array:
{
  "channels": ["slack"],
  "slackWebhookUrl": "https://hooks.slack.com/services/..."
}

Test a channel

Before relying on a channel, send a test notification:
POST /api/notifications/config/test-channel
Content-Type: application/json

{
  "channel": "slack"
}
Valid values for channel: email, webhook, slack, wechat, dingtalk, feishu, push. The response contains a result field with the outcome from the notification manager.

Push notifications

Browser Push notifications use the Web Push protocol and require a VAPID key pair.

Generate VAPID keys

POST /api/notifications/config/generate-vapid-keys
Returns a new key pair:
{
  "data": {
    "keys": {
      "publicKey": "...",
      "privateKey": "..."
    }
  }
}
Store both keys in your notification configuration. The public key must be provided to browser clients when registering subscriptions.

Manage subscriptions

MethodPathDescription
POST/api/notifications/push/subscribeRegister a new push subscription
GET/api/notifications/push/subscriptionsList all push subscriptions
GET/api/notifications/push/users/:userIdList subscriptions for a user
POST/api/notifications/push/touchUpdate last-used time for a subscription
DELETE/api/notifications/push/unsubscribeRemove a push subscription
POST/api/notifications/push/cleanDelete all expired push subscriptions
A subscription payload (for POST /push/subscribe) requires:
{
  "endpoint": "https://...",
  "keys": { ... },
  "userId": "optional-user-id",
  "userAgent": "optional-user-agent"
}
The browser-side push management UI is available under the Notifications section in the dashboard. Enable push in your browser settings before subscribing.

Notification history

List notifications

GET /api/notifications
Supports query parameters for filtering and pagination:
ParameterTypeDescription
pagenumberPage number (default: 1)
pageSizenumberItems per page (default: 10)
channelstringFilter by channel identifier
statusstringFilter by status
notificationTypestringFilter by notification type
reviewIdstringFilter by associated review ID
startDatestringISO 8601 start date for range filter
endDatestringISO 8601 end date for range filter

Get notification detail

GET /api/notifications/history/:id
Returns full detail for a single notification record.

Get statistics

GET /api/notifications/stats
Accepts optional startDate and endDate query parameters. Returns aggregate stats for the specified period.

Pending and failed notifications

GET /api/notifications/pending
GET /api/notifications/failed
Returns lists of pending or failed notification records. Use PATCH /api/notifications/history/:id to update status and retry as needed.

Clean old notifications

POST /api/notifications/clean
Content-Type: application/json

{ "days": 30 }
Deletes notification records older than the specified number of days.

Build docs developers (and LLMs) love