Misar Docs
MisarMailMisar.BlogMisarReachMisarPostMisar.DevMisar PlatformMisar IdentityMisar Posts API
Api 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/mail/api/notifications

List in-app notifications with optional filtering. unreadCount is always returned regardless of the unread_only filter — use it to render a badge in your UI without a separate request.

Query parameters

unread_onlytrue | falsequerydefault: false

Return only unread notifications.

limitintegerquerydefault: 50

Max notifications to return (1–100).

Response fields

successboolean

true when the request succeeded.

notificationsArray<Notification>

Notifications. Each includes id, type, title, body, entity_type, entity_id, is_read, and created_at.

unreadCountinteger

Total unread notifications, always returned regardless of the unread_only filter.

curl "https://api.misar.io/mail/api/notifications?unread_only=true&limit=20" \
  -H "Cookie: session=..."
{
  "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
}

Mark as read

PATCH/mail/api/notifications

Mark specific notifications as read, or omit ids to mark all notifications as read.

Request body

idsstring[]body

IDs to mark as read. Max 100 per call. Omit to mark all notifications as read.

Response fields

successboolean

true when the notifications were marked as read.

{ "ids": ["notif_01hx9k2m", "notif_01hx8z0q"] }
{}
{ "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