PATCH /notifications
Mark notification(s) as read/unread
Update the read status of one or multiple notifications
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
Request Body
{}{ "id": 123, "markedRead": true}{ "id": 123, "markedRead": false}{ "ids": [ 123, 456, 789 ], "markedRead": true}{ "id": 0, "ids": [ 0 ], "markedRead": true}Try it out
Loading...
Output:
Responses
Description
Notification(s) updated successfully
{ "id": 0, "event": "string", "user": "string", "account_id": "string", "data": {}, "notificationSubject": "string", "notificationBody": "string", "portalLink": "string", "portalLinkDescription": "string", "error": false, "markedRead": false, "created": "string"}Description
Bad request - missing required fields or notification not found
{ "error": "string", "status": 0, "message": "string"}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