Skip to content
JAOT

Notifications

The Notifications endpoints let you manage in-app notifications for the authenticated user. Notifications are created automatically by the system when events occur, such as completed solves, credit purchases, or model updates.

GET /api/v2/notifications

List notifications for the current user.

Authentication: Requires API key or JWT token.

Query Parameters

ParameterTypeDefaultDescription
unread_onlybooleanfalseOnly return unread notifications
limitinteger50Maximum notifications to return (1-100)

Response

FieldTypeDescription
itemsarrayList of notification objects
items[].idstringNotification ID (e.g. "ntf_a1b2c3d4")
items[].typestringNotification type (see table below)
items[].titlestringNotification title
items[].messagestringFull notification message
items[].dataobjectAdditional structured data (e.g. execution_id, objective_value)
items[].linkstringDeep link to related page (e.g. "/executions/exe_9a1b2c3d")
items[].is_readbooleanWhether the notification has been read
items[].created_atstringISO 8601 timestamp
totalintegerTotal notifications returned
unread_countintegerTotal unread notifications

Notification types:

TypeDescription
execution_completeAn optimization execution finished
execution_failedAn optimization execution failed
credits_lowCredit balance is running low
credits_purchasedCredits were purchased
subscription_updatedSubscription plan changed
systemSystem announcement

Examples

import httpx

response = httpx.get(
    "https://api.jaot.io/api/v2/notifications",
    params={"unread_only": True, "limit": 10},
    headers={"Authorization": "Bearer ok_live_your_key_here"},
)

notifications = response.json()
print(f"Unread: {notifications['unread_count']}")
for n in notifications["items"]:
    icon = "[*]" if not n["is_read"] else "[ ]"
    print(f"  {icon} {n['title']}: {n['message']}")

Response

{
  "items": [
    {
      "id": "ntf_a1b2c3d4",
      "type": "execution_complete",
      "title": "Solve completed",
      "message": "Your warehouse allocation optimization finished with status: optimal",
      "data": {"execution_id": "exe_9a1b2c3d", "objective_value": 1250.50},
      "link": "/executions/exe_9a1b2c3d",
      "is_read": false,
      "created_at": "2026-02-19T10:05:12Z"
    },
    {
      "id": "ntf_e5f6g7h8",
      "type": "credits_low",
      "title": "Low credit balance",
      "message": "Your organization has 15 credits remaining. Consider purchasing more.",
      "data": {"credits_remaining": 15},
      "link": "/workspace/credits",
      "is_read": false,
      "created_at": "2026-02-18T14:30:00Z"
    }
  ],
  "total": 2,
  "unread_count": 2
}

GET /api/v2/notifications/unread-count

Get the count of unread notifications. This is a lightweight endpoint for polling or badge display.

Authentication: Requires API key or JWT token.

Response

FieldTypeDescription
unread_countintegerNumber of unread notifications

Examples

import httpx

response = httpx.get(
    "https://api.jaot.io/api/v2/notifications/unread-count",
    headers={"Authorization": "Bearer ok_live_your_key_here"},
)
count = response.json()["unread_count"]
print(f"Unread: {count}")

Response

{"unread_count": 5}

POST /api/v2/notifications/{notification_id}/read

Mark a specific notification as read.

Authentication: Requires API key or JWT token.

Path Parameters

ParameterTypeDescription
notification_idstringThe notification ID to mark as read

Response

FieldTypeDescription
successbooleanWhether the operation succeeded
marked_countintegerNumber of notifications marked (always 1)

Examples

import httpx

response = httpx.post(
    "https://api.jaot.io/api/v2/notifications/ntf_a1b2c3d4/read",
    headers={"Authorization": "Bearer ok_live_your_key_here"},
)
print(response.json())  # {"success": true, "marked_count": 1}

Response

{"success": true, "marked_count": 1}

POST /api/v2/notifications/read-all

Mark all notifications as read for the current user.

Authentication: Requires API key or JWT token.

Response

FieldTypeDescription
successbooleanWhether the operation succeeded
marked_countintegerNumber of notifications marked as read

Examples

import httpx

response = httpx.post(
    "https://api.jaot.io/api/v2/notifications/read-all",
    headers={"Authorization": "Bearer ok_live_your_key_here"},
)
result = response.json()
print(f"Marked {result['marked_count']} notifications as read")

Response

{"success": true, "marked_count": 5}

Errors

HTTP CodeErrorDescription
401unauthorizedMissing or invalid API key
404not_foundNotification not found (for single mark-read)