MisarMailApi Reference
Notifications
Fetch and manage in-app notifications for your MisarMail account
The notifications API gives you programmatic access to in-app notifications — campaign status updates, import completions, domain verifications, billing alerts, and system announcements.
Requires active session (dashboard only). These endpoints are not available via API key.
List notifications
GET /api/notifications
Query parameters
| Parameter | Type | Description |
|---|---|---|
unread_only | true | false | Return only unread notifications. Defaults to false |
limit | integer (1–100) | Max notifications to return. Defaults to 50 |
Response
{
"success": true,
"notifications": [
{
"id": "notif_01hx9k2m",
"type": "campaign",
"title": "Campaign sent successfully",
"body": "\"Summer Sale 2025\" was delivered to 4,821 contacts.",
"entity_type": "campaign",
"entity_id": "camp_7f3ab1",
"is_read": false,
"created_at": "2025-06-14T10:32:00Z"
},
{
"id": "notif_01hx8z0q",
"type": "contact_import",
"title": "Import complete",
"body": "2,300 contacts imported. 14 skipped (duplicate emails).",
"entity_type": "contact_import",
"entity_id": "import_cc9d4e",
"is_read": true,
"created_at": "2025-06-13T18:11:45Z"
}
],
"unreadCount": 3
}unreadCount is always returned regardless of the unread_only filter — use it to render a badge in your UI without a separate request.
Mark as read
PATCH /api/notifications
Content-Type: application/json
Request body
| Field | Type | Description |
|---|---|---|
ids | string[] | IDs to mark as read. Max 100 per call. Omit to mark all notifications as read |
Mark specific notifications
{ "ids": ["notif_01hx9k2m", "notif_01hx8z0q"] }Mark all as read
{}Response
{ "success": true }Notification types
entity_type | Trigger |
|---|---|
campaign | Campaign sent, failed, or completed A/B test |
contact_import | CSV or API import finished |
domain_verification | Domain DNS check passed or failed |
billing | Subscription renewed, payment failed, plan upgraded |
system | Platform maintenance, feature announcements |
automation | Automation enabled, disabled, or errored |
Example: fetch unread notifications
curl "https://api.misar.io/mail/api/notifications?unread_only=true&limit=20" \
-H "Cookie: session=..."const res = await fetch('/api/notifications?unread_only=true&limit=20', {
credentials: 'include',
});
const { notifications, unreadCount } = await res.json();Example: mark all as read
curl -X PATCH /api/notifications \
-H "Content-Type: application/json" \
-d '{}'await fetch('/api/notifications', {
method: 'PATCH',
credentials: 'include',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({}),
});