---
title: "Notifications hooks"
description: "Hand-written shim. Generated list/delete/restore via ./notifications.gen.
useGetNotificationUnreadCount, useMarkNotificationRead, useMarkAllNotificationsRead
stay hand-written (custom ops + raw fetch)."
section: "Libraries"
group: "React hooks"
order: 435
---

## Hooks

### `useDeleteNotification` `mutation`

Soft-delete a notification.

```ts
useDeleteNotification(options?: MutationOpts<SuccessResponse, string>)
```

**Types:** [SuccessResponse](/types/success-response)

### `useGetNotificationUnreadCount` `query`

```ts
useGetNotificationUnreadCount(options?: QueryOpts<{ count: number; }>)
```

### `useListNotifications` `query`

List notifications.

```ts
useListNotifications(params?: Omit<ListNotificationsParams, | > & { filter?: NotificationFilter; orderBy?: NotificationOrderBy[]; } & NotificationShorthands, options?: QueryOpts<Page<Notification>>)
```

**Types:** [ListNotificationsParams](/types/list-notifications-params) · [NotificationFilter](/types/notification-filter) · [NotificationOrderBy](/types/notification-order-by) · [NotificationShorthands](/types/notification-shorthands) · [Page](/types/page) · [Notification](/types/notification)

### `useMarkAllNotificationsRead` `composite`

```ts
useMarkAllNotificationsRead(options?: MutationOpts<SuccessResponse, void>)
```

**Types:** [SuccessResponse](/types/success-response)

### `useMarkNotificationRead` `composite`

```ts
useMarkNotificationRead(options?: MutationOpts<Notification, string>)
```

**Types:** [Notification](/types/notification)

### `usePurgeNotification` `composite`

Permanently delete a soft-deleted notification.

```ts
usePurgeNotification(options?: MutationOpts<SuccessResponse, PurgeNotificationParams>)
```

**Types:** [SuccessResponse](/types/success-response) · [PurgeNotificationParams](/types/purge-notification-params)

### `useRestoreNotification` `composite`

Restore a notification.

```ts
useRestoreNotification(options?: MutationOpts<Notification, string>)
```

**Types:** [Notification](/types/notification)

### `useRetrieveNotification` `query`

Get a notification by ID.

```ts
useRetrieveNotification(id: string, options?: QueryOpts<Notification>)
```

**Types:** [Notification](/types/notification)
