Notification

The `Notification` entity.

Definition

TypeScript
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

FieldTypeNotes
idstringreadonly required
userIdstringrequired — User this notification is addressed to.
workspaceIdstring | nullrequired — Workspace the notification is about; null for account-level notifications.
type"error" | "success" | "system" | "info" | "warning"required — Notification category used for grouping and filtering.
titlestringrequired — Short headline rendered in the notification list.
bodystring | nullrequired — Optional longer-form message body.
dataRecord<string, unknown>required — Structured payload for the consumer (e.g. linked entity IDs).
readbooleanrequired — True once the user has marked the notification as read.
readAtstring | nullrequired — ISO-8601 timestamp when the notification was marked read.
createdAtstringreadonly required — ISO-8601 timestamp of creation.