⚠️ Work in progress — createCMS is pre-1.0 and not production-ready (not tested in production). Expect breaking changes.
createCMS
Reference

Notifications

The per-user inbox, via cms.api.notifications.

Notifications are the per-user inbox. The CMS raises them on @mentions in comments, approval decisions, merge-request activity, and publishing. Methods live under cms.api.notifications and mirror on the client as client.notifications.<method> with identical types.

These endpoints operate on the recipient's inbox, not on content commits, so no method returns a commit envelope. Every endpoint scopes to the authenticated user: reads and mutations only ever touch the current user's own notifications, and acting on another user's notification fails with NOTIFICATION_RECIPIENT_MISMATCH.

The whole notifications namespace is omitted when the CMS is configured with notifications: false.

Methods

List Notifications

Fetch a page of your notifications (newest first, archived ones excluded) so you can render an inbox. Filter by type, collection, or read status, or leave every query field off to pull the latest across the board.

notification:read
GET/notifications/list
const { data, error } = await client.notifications.list({
  query: { unreadOnly: true, limit: 10 },
});
Parameters
typeNotificationType

Filter by notification type (see Types below for the full set).

unreadOnlyboolean

When true, returns only unread notifications.

collectionstring

Filter to notifications about one collection.

limitnumber= 20

Page size, 1 to 100.

offsetnumber= 0

Rows to skip.

Returns
notificationsNotificationListItem[]

This page of notifications, newest first. Each carries id, recipientId, actorId, type, title, body, resourceType, resourceId, collection, meta, readAt, and createdAt.

totalnumber

Total matching notifications across all pages, ignoring limit/offset.

hasMoreboolean

Whether more notifications exist after this page.

unreadCountnumber

Count of all your unread notifications, independent of the current page or filters.

unreadCount is the count of all unread notifications for the user, independent of the current page or filters. Each item carries id, recipientId, actorId, type, title, body, resourceType, resourceId, collection, meta, readAt, and createdAt. Pass the transport-level withUser: true flag to also include actorUser (the acting user, limited to your user config's exposeColumns allowlist) on each item.

Mark Notifications Read

Mark a notification as read once you've seen it. Pass a notificationId to clear a single one, or omit it entirely to mark your whole unread inbox as read in one call. You get back how many were actually flipped.

notification:update
POST/notifications/markNotificationsRead
const { data, error } = await client.notifications.markNotificationsRead({
  body: { notificationId: 'notif_8fd21c' }, // omit body to mark all unread as read
});
Parameters
notificationIdstring

Notification to mark read. Omit to mark all unread notifications read.

Returns
markedCountnumber

How many notifications this call flipped to read.

Mark Notifications Unread

Flag a notification as unread so it resurfaces for later. Pass a notificationId to reopen one, or omit it to mark all of your read notifications unread. You get back how many were flipped.

notification:update
POST/notifications/markNotificationsUnread
const { data, error } = await client.notifications.markNotificationsUnread({
  body: { notificationId: 'notif_8fd21c' }, // omit body to mark all read as unread
});
Parameters
notificationIdstring

Notification to mark unread. Omit to mark all read notifications unread.

Returns
markedCountnumber

How many notifications this call flipped to unread.

Archive a Notification

Archive a notification to drop it from your active inbox, so it stops showing up in list. Use it to clear out items you're done with without losing the underlying record.

notification:delete
POST/notifications/archiveNotification
const { data, error } = await client.notifications.archiveNotification({
  body: { notificationId: 'notif_8fd21c' }, // required
});
Parameters
notificationIdstringrequired

The notification to archive.

Returns
notificationIdstring

The id of the notification that was archived.

Types

type is one of: mention, comment, threadResolved, threadReopened, approvalRequested, approvalApproved, approvalRejected, mergeRequestOpened, mergeRequestMerged, mergeRequestClosed, mergeRequestReopened, published, custom.

On this page