> ## Documentation Index
> Fetch the complete documentation index at: https://rideshare.docs.sumit-dhondikar.in/llms.txt
> Use this file to discover all available pages before exploring further.

# Mark Read

> Mark one or all notifications as read for the authenticated user.

Use these endpoints to dismiss notifications. You can mark a single notification by its ID or mark every unread notification at once. Both endpoints require a valid Bearer token.

## Mark a Single Notification

**`POST /notifications/mark-read/{notificationId}`**

```http theme={null}
Authorization: Bearer <token>
```

### Path Parameters

<ParamField path="notificationId" type="integer" required>
  The ID of the notification to mark as read.
</ParamField>

### Response

<ResponseField name="message" type="string">
  Confirmation message. Returns `"Notification marked as read."` on success.
</ResponseField>

## Mark All Notifications

**`POST /notifications/mark-all-read`**

```http theme={null}
Authorization: Bearer <token>
```

This endpoint takes no request body. All unread notifications belonging to the authenticated user are marked as read in a single operation.

### Response

<ResponseField name="message" type="string">
  Confirmation message. Returns `"All notifications marked as read."` on success.
</ResponseField>

## Examples

<CodeGroup>
  ```bash Mark single (cURL) theme={null}
  curl -X POST http://localhost:8080/notifications/mark-read/42 \
    -H "Authorization: Bearer <token>"
  ```

  ```json Mark single (Response) theme={null}
  {
    "message": "Notification marked as read."
  }
  ```
</CodeGroup>

<CodeGroup>
  ```bash Mark all (cURL) theme={null}
  curl -X POST http://localhost:8080/notifications/mark-all-read \
    -H "Authorization: Bearer <token>"
  ```

  ```json Mark all (Response) theme={null}
  {
    "message": "All notifications marked as read."
  }
  ```
</CodeGroup>
