# Notifications endpoints (Client API: account)

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

Source: https://featherpanel.com/docs/api/reference/user/notifications/

Defined in [`backend/app/routes/user/notifications.php`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/user/notifications.php). Authentication used here: **Signed-in user**. Read [Authentication](https://featherpanel.com/docs/api/authentication/) for how to send credentials and [Rate limits and errors](https://featherpanel.com/docs/api/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 user
- Default rate limit: 60 / minute (`user-notifications`)
- Route name: `user-notifications`
- Controller: [`NotificationController::index`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/User/NotificationController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/user/notifications.php#L27)

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

| Response `data` field | Type | Description |
| --- | --- | --- |
| `notifications` | UserNotification\[\] |  |

```bash
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 user
- Default rate limit: 30 / minute (`user-notifications`)
- Route name: `user-notifications-dismiss`
- Controller: [`NotificationController::dismiss`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/User/NotificationController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/user/notifications.php#L39)

**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 |

```bash
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`](https://featherpanel.com/docs/plugins/events/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 user
- Default rate limit: 60 / minute (`user-notifications-inbox`)
- Route name: `user-notifications-inbox`
- Controller: [`NotificationInboxController::index`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/User/NotificationInboxController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/user/notifications.php#L56)

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

```bash
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 user
- Default rate limit: 60 / minute (`user-notifications-inbox-read`)
- Route name: `user-notifications-inbox-read`
- Controller: [`NotificationInboxController::markRead`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/User/NotificationInboxController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/user/notifications.php#L68)

**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 |  |

```bash
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
