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

# Toggle Notifications

> Updates the read status of specified notifications for the authenticated user.



## OpenAPI

````yaml POST /notifications/toggle
openapi: 3.0.1
info:
  title: Notification API
  version: 1.0.0
  description: API for fetching user notifications
servers: []
security: []
paths:
  /notifications/toggle:
    post:
      summary: Toggle Notification Read Status
      description: >-
        Updates the read status of specified notifications for the authenticated
        user.
      parameters:
        - $ref: '#/components/parameters/X-API-KEY'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                notificationIds:
                  type: array
                  items:
                    type: integer
                  description: List of notification IDs to update
                newRead:
                  type: boolean
                  description: New read status to apply to the notifications
              required:
                - notificationIds
                - newRead
      responses:
        '200':
          description: The updated notifications
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                    type:
                      type: string
                      enum:
                        - quote
                        - reply
                        - repost
                        - mention
                        - follow
                    userId:
                      type: integer
                    createdAt:
                      type: string
                      format: date-time
                    actorId:
                      type: integer
                    postId:
                      type: integer
                      nullable: true
                    read:
                      type: boolean
        '401':
          description: Unauthorized access
        '500':
          description: Internal server error
      security:
        - bearerAuth: []
components:
  parameters:
    X-API-KEY:
      name: X-API-KEY
      description: API key required for authentication
      in: header
      required: true
      schema:
        type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````