Skip to content

Notification API

The Notification API lists the in-app notifications of a workspace and marks them as read or deleted, and provides chat between users of an organization: direct chats, group chats, messages and a live websocket. Notifications are created by the platform when something happens, for example an order is placed; you can't create them.

Resources

Resource What it is
Notification A message about an event in a workspace, such as "Customer create order".
Chat A conversation between users of one organization: direct (two users) or group (named, three or more).
Chat message One text message in a chat.

Authentication and permissions

All routes need an access token. See Authentication.

Action Permission
List, update, mark all as read and delete notifications workspace:notifications:manage in the workspace
Chat: list users, start and read chats, send messages, manage group members, websocket Any signed-in user; you only see chats you take part in, and users of your own organization

Base path

https://<API_HOST>/api/{workspaceId}/notifications…      notifications (no /v1)
https://<API_HOST>/api/v1/chat/…                         chat

{workspaceId} is the workspace whose notifications you read. Chat takes no scope: the organization comes from your token.

Capabilities

  • List notifications with search and pagination
  • Mark one notification as read, or as deleted
  • Mark all notifications as read; delete all
  • Direct chat, group chat and message history
  • Live messages over a websocket
  • Push notifications to mobile (planned)
  • Notification preferences per user (planned)

Object model

Notification

Field Type Required Description
notificationId integer read-only ID of the notification.
performedBy string read-only Who caused it: a person's name or system.
authorityLevel string read-only The kind of actor, for example customer, system or an admin role.
type string read-only What it is about, for example Order, Customer, Ticket Group, Rail Menu, Banner, Password reset.
title string read-only Short title.
message string read-only Details.
date string read-only When it happened, YYYY-MM-DD HH:MM:SS.
isRead boolean writable true once read.
isDeleted boolean writable true once deleted. Deleted notifications don't appear in lists.
createdAt, updatedAt string read-only ISO 8601 UTC.
{
  "notificationId": 42,
  "performedBy": "Aisyah Rahman",
  "authorityLevel": "customer",
  "type": "Order",
  "title": "Customer create order",
  "message": "aisyah@example.com (Aisyah Rahman) has created an order no: 20260715TB004821937",
  "date": "2026-07-15 10:40:51",
  "isRead": false,
  "isDeleted": false,
  "createdAt": "2026-07-15T02:40:51Z",
  "updatedAt": "2026-07-15T02:40:51Z"
}

Chat

Field Type Description
chatId string (UUID) ID of the chat.
type string direct or group.
name string Group name (group chats only).
avatarUrl string Group picture, if any.
otherParticipant object The other user (direct chats only).
participants array The members (group chats only).
lastMessage object The newest message, if any.
lastMessageAt string When it was sent, ISO 8601.
createdAt string When the chat started.

A user in a chat has userId, username, email, firstName, lastName and avatarUrl. A message has id, chatId, body, createdAt and sender (a user). Message IDs sort by time.

Websocket

Open wss://<API_HOST>/api/v1/chat/ws. The browser sends your sign-in cookie; there is one connection for all your chats. Send { "type": "message", "chatId": "<CHAT_ID>", "body": "Hello" } to send a message. You receive { "type": "message", "message": { … } } for every new message in your chats, and { "type": "error", "error": "…" } when a send fails.

Lists

  • List notifications is paginated with page (from 1, default 1) and limit (default 10; values below 10 become 10 and values above 100 become 100). Newest first. search matches title, message, type and who caused it. totalCount counts the matching notifications on all pages, and hasNext is true when another page follows. Deleted notifications are left out.
  • List chat users (items, matched with q, sorted by first then last name) and List chats (items, most recently active first) are not paginated: they return all items.
  • List messages of a chat pages backwards: limit is 1 to 100 (other values become 50, the default) and before is a message ID. Messages in a page are oldest first, and hasMore is true when older messages exist.
curl "https://<API_HOST>/api/<WORKSPACE_ID>/notifications?page=1&limit=10" \
  -H "Authorization: Bearer <ACCESS_TOKEN>"
{
  "respCode": 2000,
  "respDesc": "Success",
  "result": {
    "notifications": [
      {
        "notificationId": 42,
        "performedBy": "Aisyah Rahman",
        "authorityLevel": "customer",
        "type": "Order",
        "title": "Customer create order",
        "message": "aisyah@example.com (Aisyah Rahman) has created an order no: 20260715TB004821937",
        "date": "2026-07-15 10:40:51",
        "isRead": false,
        "isDeleted": false,
        "createdAt": "2026-07-15T02:40:51Z",
        "updatedAt": "2026-07-15T02:40:51Z"
      }
    ],
    "totalCount": 1,
    "hasNext": false,
    "page": 1,
    "limit": 10
  }
}

Chat lists use a different, unwrapped shape (no respCode):

curl "https://<API_HOST>/api/v1/chat/chats/<CHAT_ID>/messages?limit=50" \
  -H "Authorization: Bearer <ACCESS_TOKEN>"
{
  "messages": [
    {
      "id": "0197a3c2-5b1e-7c44-9d10-2f6a8e3b1c07",
      "chatId": "7c1f3b0e-2a44-4d3c-9a51-3f0b8f2d6e10",
      "body": "Hello",
      "createdAt": "2026-07-15T02:41:00Z",
      "sender": {
        "userId": "3f6a1d2e-8b4c-4e7f-9a1b-2c3d4e5f6a7b",
        "username": "aisyah",
        "email": "aisyah@example.com",
        "firstName": "Aisyah",
        "lastName": "Rahman",
        "avatarUrl": null
      }
    }
  ],
  "hasMore": false
}

States

A notification starts unread (isRead: false) and stays until you set isRead or isDeleted. Marking as deleted hides it; there is no way to bring it back through the API.

Errors

Notification routes answer in the ticketing format: success has respCode 2000; an error has respCode 4000 and the reason in respDesc. Chat routes answer { "error": "…" }. Missing or wrong tokens answer { "message": "…" }.

400, notification routes
{ "respCode": 4000, "respDesc": "Invalid request body", "result": null }
400, chat routes
{ "error": "cannot start a chat with yourself" }
401, token missing or invalid
{ "message": "Unauthorized - No token provided" }
403, missing permission
{ "message": "Forbidden - Insufficient permissions" }
403, chat you aren't part of
{ "error": "not a participant of this chat" }
404, notification routes
{ "respCode": 4000, "respDesc": "Notification does not exist", "result": null }
500, chat routes
{ "error": "failed to send message" }
Status When it happens What to do
400 The body is invalid, notificationId is missing, a chat message is empty, you start a chat with yourself, or you change members of a direct chat. Fix the request.
401 No valid access token. Sign in again.
403 Your role lacks workspace:notifications:manage, or you aren't a participant of the chat. Ask an admin, or use a chat you belong to.
404 The notification doesn't exist in this workspace. Check the ID and workspace.
500 The request couldn't be completed. Retry later.

Endpoints