Documentation Index
Fetch the complete documentation index at: https://mintlify.com/sam-shervin/space7/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Returns a paginated list of notifications for the currently authenticated user, along with the total count of unread notifications.
Endpoint
Request
Query parameters
Page number for pagination. Defaults to 1.
Number of notifications to return per page. Defaults to 30.
Response
Returns a NotificationsResponse object.
Array of notification objects.
Unique identifier for the notification.
Identifier of the user this notification belongs to.
The category or type of notification (e.g. "like", "mention").
Human-readable description of the notification event.
Identifier of the resource associated with the notification (e.g. a message or space ID).
Whether the notification has been read by the user.
ISO 8601 timestamp of when the notification was created.
Total number of notifications for the user.
Total number of pages available.
Total number of unread notifications across all pages.
Example
import { fetchWithAuth } from "./fetchWithAuth";
async function getNotifications(
page: number = 1,
limit: number = 30,
) {
const res = await fetchWithAuth(
`/api/notifications?page=${page}&limit=${limit}`,
{
method: "GET",
headers: {
"Content-Type": "application/json",
},
},
);
const data = await res.json();
if (!res.ok) {
throw new Error(data.error || "Failed to fetch notifications");
}
return data; // NotificationsResponse
}