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

# Toggle notification status



## OpenAPI

````yaml patch /v1/notifications/{id}/toggle-status
openapi: 3.0.0
info:
  title: Notification APIs Specification
  description: Section for description
  version: '1.0'
  contact: {}
servers:
  - url: https://staging.api.us.aptlydone.com
  - url: https://staging.api.us.aptlydone.com/notification
  - url: https://api.us.aptlydone.com
  - url: https://api.us.aptlydone.com/notification
security: []
tags: []
paths:
  /v1/notifications/{id}/toggle-status:
    patch:
      tags:
        - notifications
      summary: Toggle notification status
      operationId: NotificationController_toggleNotificationStatus_v1
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ToggleNotificationStatusDto'
      responses:
        '200':
          description: Notification status toggled successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotificationResponseDtoResponse'
      security:
        - accessToken: []
components:
  schemas:
    ToggleNotificationStatusDto:
      type: object
      properties:
        status:
          type: string
          enum:
            - UNREAD
            - READ
          description: The specific status to set (optional)
          example: READ
    NotificationResponseDtoResponse:
      type: object
      properties:
        statusCode:
          type: number
          description: HTTP Status code
          example: 200
        timestamp:
          type: string
          description: Timestamp of the response
          example: '2026-01-12T09:08:08.140Z'
        message:
          type: string
          description: Response message
          example: Success
        data:
          description: Response data
          allOf:
            - $ref: '#/components/schemas/NotificationResponseDto'
      required:
        - statusCode
        - timestamp
        - message
        - data
    NotificationResponseDto:
      type: object
      properties:
        id:
          type: string
          description: The notification ID
          example: 550e8400-e29b-41d4-a716-446655440002
        tenantId:
          type: string
          description: Tenant ID to filter notifications
          example: 123e4567-e89b-12d3-a456-426614174000
        templateKey:
          type: string
          description: The notification template key
          example: DELEGATION_ISSUED
        category:
          type: string
          description: The notification category
          example: Delegations
        title:
          type: string
          description: The notification title
          example: Delegation Issued
        message:
          type: string
          description: The notification message content
          example: Delegation ABC123 was issued to you. Click to review.
        isActionable:
          type: boolean
          description: Whether the notification is actionable
          example: true
        status:
          type: string
          enum:
            - UNREAD
            - READ
          description: The notification status
          example: UNREAD
        createdAt:
          format: date-time
          type: string
          description: Timestamp when the notification was created
          example: '2023-01-01T12:00:00Z'
        readAt:
          format: date-time
          type: string
          nullable: true
          description: Timestamp when the notification was read, if applicable
          example: '2023-01-02T14:30:00Z'
        userId:
          type: string
          description: The user ID who received this notification
          example: 550e8400-e29b-41d4-a716-446655440000
        entityType:
          type: string
          description: The type of entity this notification relates to
          example: delegation
        entityId:
          type: string
          description: The ID of the entity this notification relates to
          example: '123456'
        actionUrl:
          type: string
          nullable: true
          description: URL for action button on the notification, if applicable
          example: https://example.com/delegations/123456
        payload:
          type: object
          nullable: true
          description: Additional payload data for the notification
          example:
            assignedBy: John Doe
            priority: high
        relativeTime:
          type: string
          description: Relative time for display (e.g. "2 hours ago")
          example: 2 hours ago
      required:
        - id
        - tenantId
        - templateKey
        - category
        - title
        - message
        - isActionable
        - status
        - createdAt
        - userId
        - entityType
        - entityId
        - relativeTime
  securitySchemes:
    accessToken:
      scheme: bearer
      bearerFormat: JWT
      type: http

````