Create Notification
POST /client/notifications/
Use the POST /client/notifications/
endpoint to create a new notification by specifying the required details such as a header, body, and optionally an image. Notifications can be used to share important updates or messages with clients.
Parameters
Name
Type
In
Description
Required
header
string
body
The title or header of the notification (1–255 characters).
Yes
body
string
body
The main content of the notification.
Yes
image
string
body
URL of the image to include in the notification (optional).
No
Request Body Example:
{
"header": "Maintenance Reminder",
"body": "Your scheduled maintenance is due tomorrow. Please confirm.",
"image": "https://example.com/notification-image.jpg"
}
Responses
201 Created
Description: The notification was successfully created.
Example Response:
{
"id": 101,
"header": "Maintenance Reminder",
"body": "Your scheduled maintenance is due tomorrow. Please confirm.",
"image": "https://example.com/notification-image.jpg",
"created_at": "2024-11-17T10:30:00Z",
"created_by": "admin"
}
Last updated