Misar IO Docs
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

ParameterTypeDescription
unread_onlytrue | falseReturn only unread notifications. Defaults to false
limitinteger (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

FieldTypeDescription
idsstring[]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_typeTrigger
campaignCampaign sent, failed, or completed A/B test
contact_importCSV or API import finished
domain_verificationDomain DNS check passed or failed
billingSubscription renewed, payment failed, plan upgraded
systemPlatform maintenance, feature announcements
automationAutomation 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({}),
});