View .md

Notifications endpoints (Client API: account)

4 FeatherPanel Client API: account endpoints from user/notifications.php: methods, paths, auth, permissions, rate limits, parameters and responses.

Last synced from FeatherPanel 15b94e9 on .

On this page

Defined in backend/app/routes/user/notifications.php. Authentication used here: Signed-in user. Read Authentication for how to send credentials and Rate limits and errors for the response envelope.

Paths, methods, permissions and rate limits come from the route file. Summaries, parameters and response codes come from the OpenAPI annotations on the controllers; endpoints without annotations show only what the route file declares.

Endpoints

GET/api/user/notifications

Auth: Signed-in userDefault rate limit: 60 / minute (user-notifications)Route name: user-notificationsController: NotificationController::indexroute source

Get user notifications Retrieve global and user-targeted notifications for the authenticated user.

Response data fieldTypeDescription
notificationsUserNotification[]
curl -X GET "$PANEL_URL/api/user/notifications" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"

Responses: 200 Notifications retrieved successfully · 401 Unauthorized

POST/api/user/notifications/{id}/dismiss

Auth: Signed-in userDefault rate limit: 30 / minute (user-notifications)Route name: user-notifications-dismissController: NotificationController::dismissroute source

Dismiss notification Dismiss a specific notification for the authenticated user.

ParameterInTypeRequiredDescription
idpathintegeryesNotification ID
Response data fieldTypeDescription
messagestringSuccess message
curl -X POST "$PANEL_URL/api/user/notifications/$ID/dismiss" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"

Plugin events: featherpanel:user:notifications:notification:dismissed

Responses: 200 Notification dismissed successfully · 400 Bad request - Invalid ID · 401 Unauthorized · 403 Forbidden - Cannot dismiss this notification · 404 Notification not found · 500 Internal server error

GET/api/user/notifications/inbox

Auth: Signed-in userDefault rate limit: 60 / minute (user-notifications-inbox)Route name: user-notifications-inboxController: NotificationInboxController::indexroute source

Notification centre Inbox items and announcements, newest first, with the unread count.

curl -X GET "$PANEL_URL/api/user/notifications/inbox" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"

Responses: 200 Notifications retrieved · 401 Unauthorized

POST/api/user/notifications/inbox/read

Auth: Signed-in userDefault rate limit: 60 / minute (user-notifications-inbox-read)Route name: user-notifications-inbox-readController: NotificationInboxController::markReadroute source

Mark notifications read Mark the given item keys read, or everything with {"all": true}.

Body fieldTypeRequiredDescription
keysstring[]no
allbooleanno
curl -X POST "$PANEL_URL/api/user/notifications/inbox/read" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"keys":[],"all":false}'

Responses: 200 Marked read · 400 Invalid request