Skip to content

GET   /notifications

Get user notifications

Retrieve a list of user notifications with pagination and filtering options. By default, returns only unread notifications.

Example Query Parameters

Basic Pagination

/notifications?page=2&pageSize=15

Sorting

/notifications?sort=-created (newest first)

/notifications?sort=event (sort by event type alphabetically)

Filtering

/notifications?event=lead_created (filter by event type)

/notifications?markedRead=true (show only read notifications)

/notifications?error=true (show only error notifications)

Search

/notifications?search=application (search in all text fields)

Combined

/notifications?event=application_submitted&search=payment&sort=-created

Authentication Required

Authorization: Bearer {token}   header string

This header is required to access this endpoint

Required Parameters

x-account-id   header string

Account ID for the request

Optional Parameters

Click here to view an exhaustive list of all available parameters
page   query integer

Page number for pagination (starts at 1)

pageSize   query integer

Number of items per page

search   query string

Search term to filter notifications

sort   query string

Sort order (prefix with '-' for descending order, e.g. '-created')

markedRead   query boolean

Filter by read/unread status (true/false)

event   query string

Filter by event type

since   query string

Filter notifications created after this date/time (ISO format)

Try it out

Loading...

Output:

Responses

Description

Successful response

{
"data": [
{
"id": 0,
"event": "string",
"user": "string",
"account_id": "string",
"data": {},
"notificationSubject": "string",
"notificationBody": "string",
"portalLink": "string",
"portalLinkDescription": "string",
"error": false,
"markedRead": false,
"created": "string"
}
],
"totalCount": 0,
"totalPages": 0,
"currentPage": 0,
"userDoesNotHaveNotificationPreferencesConfigured": false
}

References

#/components/parameters/xAccountIdHeader

in: header
name: x-account-id
schema:
type: string
description: Account ID for the request
required: true
example: "2311"

#/components/schemas/Notification

type: object
properties:
id:
type: integer
description: Unique notification ID
event:
type: string
description: Event type
user:
type: string
description: User email associated with this notification
account_id:
type: string
description: Account ID
data:
type: object
description: Additional event data
notificationSubject:
type: string
description: Notification subject line
notificationBody:
type: string
description: Notification message body
portalLink:
type: string
description: A Link to the frontend portal to view the event data
portalLinkDescription:
type: string
description: Human readable text to be used in the link tag for the portalLink
error:
type: boolean
description: Whether this is an error notification
markedRead:
type: boolean
description: Whether this notification has been marked as read
created:
type: string
format: date-time
description: When the notification was created

#/components/schemas/Error

type: object
properties:
error:
type: string
description: Error message
status:
type: integer
description: HTTP status code
message:
type: string
description: Detailed error message
description: Error response object
required:
- error

Route Source Code

Check out the source code for this route entrypoint here: /notifications/route.ts

Or the swagger.yaml spec this documentation was generated from: /notifications/swagger.yaml