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
Get user notifications Retrieve global and user-targeted notifications for the authenticated user.
Response data field | Type | Description |
|---|---|---|
notifications | UserNotification[] |
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
Dismiss notification Dismiss a specific notification for the authenticated user.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | integer | yes | Notification ID |
Response data field | Type | Description |
|---|---|---|
message | string | Success 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
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
Mark notifications read Mark the given item keys read, or everything with {"all": true}.
| Body field | Type | Required | Description |
|---|---|---|---|
keys | string[] | no | |
all | boolean | no |
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