View .md

Notifications endpoints (Admin API)

5 FeatherPanel Admin API endpoints from admin/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/admin/notifications.php. Authentication used here: Admin. 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/admin/notifications

Auth: AdminPermission: admin.notifications.viewRoute name: admin-notificationsController: NotificationsController::indexroute source

Get all notifications Retrieve a paginated list of all notifications with optional search and filtering.

ParameterInTypeRequiredDescription
pagequeryintegernoPage number for pagination
limitqueryintegernoNumber of records per page
searchquerystringnoSearch term to filter notifications by title or message
typequerystringnoFilter by notification type
user_idqueryintegernoFilter by target user ID
server_idqueryintegernoFilter by target server ID
global_onlyquerybooleannoWhen true, only return global (all-users) notifications
Response data fieldTypeDescription
notificationsNotification[]
paginationNotificationPagination
curl -X GET "$PANEL_URL/api/admin/notifications" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"

Plugin events: featherpanel:admin:notifications:retrieved

Responses: 200 Notifications retrieved successfully · 401 Unauthorized · 403 Forbidden - Insufficient permissions

GET/api/admin/notifications/{id}

Auth: AdminPermission: admin.notifications.viewRoute name: admin-notifications-showController: NotificationsController::showroute source

Get notification by ID Retrieve a specific notification by its ID with comprehensive information.

ParameterInTypeRequiredDescription
idpathintegeryesNotification ID
Response data fieldTypeDescription
notificationNotification
curl -X GET "$PANEL_URL/api/admin/notifications/$ID" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"

Plugin events: featherpanel:admin:notifications:notification:not:found, featherpanel:admin:notifications:notification:retrieved

Responses: 200 Notification retrieved successfully · 400 Bad request - Invalid ID · 401 Unauthorized · 403 Forbidden - Insufficient permissions · 404 Notification not found

PUT/api/admin/notifications

Auth: AdminPermission: admin.notifications.createRoute name: admin-notifications-createController: NotificationsController::createroute source

Create new notification Create a new notification with comprehensive validation.

Request body: NotificationCreate (application/json)

Body fieldTypeRequiredDescription
titlestringyesNotification title
message_markdownstringyesNotification message in Markdown format
typestringyesNotification type
user_idintegernoTarget user ID (null = all users)
server_idintegernoTarget server ID (optional; implies owner)
send_emailbooleannoAlso email the target user (requires user or server target)
is_dismissiblebooleannoWhether the notification can be dismissed (default: true)
is_stickybooleannoWhether the notification stays until explicitly closed (default: false)
Response data fieldTypeDescription
notification_idintegerCreated notification ID
curl -X PUT "$PANEL_URL/api/admin/notifications" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"title":"","message_markdown":"","type":"","user_id":0,"server_id":0,"send_email":false,"is_dismissible":false,"is_sticky":false}'

Plugin events: featherpanel:admin:notifications:notification:created

Responses: 201 Notification created successfully · 400 Bad request - Validation errors · 401 Unauthorized · 403 Forbidden - Insufficient permissions · 500 Internal server error

PATCH/api/admin/notifications/{id}

Auth: AdminPermission: admin.notifications.editRoute name: admin-notifications-updateController: NotificationsController::updateroute source

Update notification Update an existing notification with comprehensive validation.

ParameterInTypeRequiredDescription
idpathintegeryesNotification ID

Request body: NotificationUpdate (application/json)

Body fieldTypeRequiredDescription
titlestringnoNotification title
message_markdownstringnoNotification message in Markdown format
typestringnoNotification type
user_idintegernoTarget user ID (null = all users)
server_idintegernoTarget server ID
is_dismissiblebooleannoWhether the notification can be dismissed
is_stickybooleannoWhether the notification stays until explicitly closed
Response data fieldTypeDescription
messagestringSuccess message
curl -X PATCH "$PANEL_URL/api/admin/notifications/$ID" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"title":"","message_markdown":"","type":"","user_id":0,"server_id":0,"is_dismissible":false,"is_sticky":false}'

Plugin events: featherpanel:admin:notifications:notification:updated

Responses: 200 Notification updated successfully · 400 Bad request - Validation errors · 401 Unauthorized · 403 Forbidden - Insufficient permissions · 404 Notification not found · 500 Internal server error

DELETE/api/admin/notifications/{id}

Auth: AdminPermission: admin.notifications.deleteRoute name: admin-notifications-deleteController: NotificationsController::deleteroute source

Delete notification Permanently delete a notification.

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

Plugin events: featherpanel:admin:notifications:notification:deleted

Responses: 200 Notification deleted successfully · 400 Bad request - Invalid ID · 401 Unauthorized · 403 Forbidden - Insufficient permissions · 404 Notification not found · 500 Internal server error