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
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}Description
Unauthorized
{ "error": "string", "status": 0, "message": "string"}Description
Forbidden - missing required permissions
{ "error": "string", "status": 0, "message": "string"}References
#/components/parameters/xAccountIdHeader
in: headername: x-account-idschema: type: stringdescription: Account ID for the requestrequired: trueexample: "2311"|export type xAccountIdHeader = any; // Schema type not fully supported#/components/schemas/Notification
type: objectproperties: 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|export interface Notification { /** Unique notification ID */ id?: number; /** Event type */ event?: string; /** User email associated with this notification */ user?: string; /** Account ID */ account_id?: string; /** Additional event data */ data?: {}; /** Notification subject line */ notificationSubject?: string; /** Notification message body */ notificationBody?: string; /** A Link to the frontend portal to view the event data */ portalLink?: string; /** Human readable text to be used in the link tag for the portalLink */ portalLinkDescription?: string; /** Whether this is an error notification */ error?: boolean; /** Whether this notification has been marked as read */ markedRead?: boolean; /** When the notification was created */ created?: Date;}#/components/schemas/Error
type: objectproperties: error: type: string description: Error message status: type: integer description: HTTP status code message: type: string description: Detailed error messagedescription: Error response objectrequired: - error|export interface Error { /** Error message */ error: string; /** HTTP status code */ status?: number; /** Detailed error message */ message?: string;}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