Skip to content

DoCurious API Reference / types / Notification

Interface: Notification

Defined in: types/notification.types.ts:71

A single in-app notification delivered to a user.

Remarks

Notifications are always stored in-app. Depending on user preferences, they may also be sent via email and/or push. The relatedType and relatedId fields enable deep-linking to the relevant entity from the notification bell dropdown.

Example

ts
const notification: Notification = {
  id: 'notif-001',
  createdAt: '2025-10-06T09:05:00Z',
  updatedAt: '2025-10-06T09:05:00Z',
  userId: 'usr-042',
  category: 'verification',
  priority: 'high',
  title: 'Track Record Approved!',
  message: 'Your "Build a Birdhouse" Track Record has been verified.',
  actionUrl: '/track-records/tr-001',
  relatedType: 'track_record',
  relatedId: 'tr-001',
  isRead: false,
  sentViaEmail: true,
  sentViaPush: false,
}

Extends

Properties

actionLabel?

optional actionLabel: string

Defined in: types/notification.types.ts:82

Button label for the deep-link CTA (e.g., "View Track Record")


actionUrl?

optional actionUrl: string

Defined in: types/notification.types.ts:80

Deep-link URL to the related content


category

category: NotificationCategory

Defined in: types/notification.types.ts:73


createdAt

createdAt: string

Defined in: types/common.types.ts:154

ISO 8601 datetime when the entity was created

Inherited from

BaseEntity.createdAt


id

id: string

Defined in: types/common.types.ts:167

Inherited from

BaseEntity.id


isRead

isRead: boolean

Defined in: types/notification.types.ts:89


message

message: string

Defined in: types/notification.types.ts:77


priority

priority: NotificationPriority

Defined in: types/notification.types.ts:74


readAt?

optional readAt: string

Defined in: types/notification.types.ts:90


relatedId?

optional relatedId: string

Defined in: types/notification.types.ts:87

UUID of the related entity


relatedType?

optional relatedType: "user" | "gift" | "challenge" | "track_record" | "community" | "assignment"

Defined in: types/notification.types.ts:85

Type of entity this notification relates to (for deep-linking)


sentViaEmail

sentViaEmail: boolean

Defined in: types/notification.types.ts:93

Whether this notification was also sent via email


sentViaPush

sentViaPush: boolean

Defined in: types/notification.types.ts:95

Whether this notification was also sent via push


title

title: string

Defined in: types/notification.types.ts:76


updatedAt

updatedAt: string

Defined in: types/common.types.ts:156

ISO 8601 datetime when the entity was last modified

Inherited from

BaseEntity.updatedAt


userId

userId: string

Defined in: types/notification.types.ts:72

DoCurious Platform Documentation