Notifications

In-app notifications keep users informed about deployments, billing, and their account. All routes are mounted under /v1/notifications and require an authenticated session (the session cookie set at sign-in). Notifications are scoped to the current user.

Categories

Every notification has a category and an event_type.

CategoryExample event types
deploymentdeployment.in_progress, deployment.completed, deployment.failed
billingbilling.payment_failed
accountaccount.welcome
announcementPlatform announcements

List Notifications

GET /v1/notifications

Query parameters:

ParameterTypeDefaultDescription
categorystringFilter by category (deployment, billing, account, announcement)
limitinteger50Page size (1–100)
offsetinteger0Pagination offset (≥ 0)

Response:

{
  "items": [
    {
      "id": 101,
      "category": "deployment",
      "event_type": "deployment.completed",
      "title": "Deployment ready",
      "body": "Your qwen2.5-instruct deployment is running.",
      "action_url": "/deployments/dep_abc123",
      "metadata": {},
      "created_at": "2025-06-17T10:05:30Z",
      "read_at": null
    }
  ],
  "total": 12,
  "limit": 50,
  "offset": 0
}

Unread Count

GET /v1/notifications/unread-count

Returns { "unread_count": 3 }.

Mark as Read

POST /v1/notifications/{notification_id}/read

Marks a single notification as read; returns { "read": true }. Responds 404 if the notification does not exist or does not belong to the current user.

Mark All as Read

POST /v1/notifications/mark-all-read

Marks all of the current user's notifications as read and returns { "read": true }. Accepts an optional category query parameter to limit the scope to one category.