---
title: "Notification"
description: "The `Notification` entity."
section: "Reference"
group: "Types"
order: 153
---

## Definition

```ts
interface Notification {
  id: string;
  userId: string;
  workspaceId: string | null;
  type: "error" | "success" | "system" | "info" | "warning";
  title: string;
  body: string | null;
  data: Record<string, unknown>;
  read: boolean;
  readAt: string | null;
  createdAt: string;
}
```

## Fields

| Field         | Type                                                      | Notes                                                                                   |
| ------------- | --------------------------------------------------------- | --------------------------------------------------------------------------------------- |
| `id`          | `string`                                                  | `readonly` `required`                                                                   |
| `userId`      | `string`                                                  | `required` — User this notification is addressed to.                                    |
| `workspaceId` | `string \| null`                                          | `required` — Workspace the notification is about; null for account-level notifications. |
| `type`        | `"error" \| "success" \| "system" \| "info" \| "warning"` | `required` — Notification category used for grouping and filtering.                     |
| `title`       | `string`                                                  | `required` — Short headline rendered in the notification list.                          |
| `body`        | `string \| null`                                          | `required` — Optional longer-form message body.                                         |
| `data`        | `Record<string, unknown>`                                 | `required` — Structured payload for the consumer (e.g. linked entity IDs).              |
| `read`        | `boolean`                                                 | `required` — True once the user has marked the notification as read.                    |
| `readAt`      | `string \| null`                                          | `required` — ISO-8601 timestamp when the notification was marked read.                  |
| `createdAt`   | `string`                                                  | `readonly` `required` — ISO-8601 timestamp of creation.                                 |
