Skip to main content

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

Marks a specific notification as read. Use this when the user views or acknowledges an individual notification.

Endpoint

PUT /api/notifications/:id/read
Requires authentication

Request

Path parameters

id
number
required
The unique identifier of the notification to mark as read.

Response

message
string
A confirmation string indicating the notification was successfully marked as read.

Example

TypeScript
import { fetchWithAuth } from "./fetchWithAuth";

async function markNotificationAsRead(id: number): Promise<{ message: string }> {
  const res = await fetchWithAuth(`/api/notifications/${id}/read`, {
    method: "PUT",
    headers: {
      "Content-Type": "application/json",
    },
  });

  const data = await res.json();

  if (!res.ok) {
    throw new Error(data.error || "Failed to mark notification as read");
  }

  return data; // { message: string }
}

Build docs developers (and LLMs) love