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

# Mark a notification read

> Mark one library notification as read.

One row. Actor-only — same key-refusal as the list route.


## OpenAPI

````yaml POST /api/v2/notifications/{id}/mark-read/
openapi: 3.1.0
info:
  title: Abacus Docs API
  version: 1.0.0
  description: |
    REST + SSE surface for Abacus Docs on the same host as the web app
    (`https://abacusdocs.com`). Paths are `/api/v2/…`.

    Authenticate with an organisation API key (`sk-abacus-*`) as a Bearer
    token, or an Auth0 access token. Cross-tenant reads return **404**, not
    403. Page-based lists use `?page=` and `?page_size=`.

    Extraction, reprocess, schema tests, and chat turns spend credits.
    See the help centre Credits pages for rates.
  contact:
    name: Abacus Docs
    url: https://abacusdocs.com/contact
servers:
  - url: https://abacusdocs.com
    description: Production (Extract)
security: []
paths:
  /api/v2/notifications/{id}/mark-read/:
    post:
      tags:
        - v2/notifications
      summary: Mark a single notification read
      description: >-
        Idempotent: re-marking an already-read notification is a no-op
        (``read_at`` does not move). Returns 404 when the row belongs to another
        user or doesn't exist — we never leak the existence of another user's
        notifications.
      operationId: v2_notifications_mark_read_create
      parameters:
        - in: path
          name: id
          schema:
            type: integer
          required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LibraryNotification'
          description: ''
        '404':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: ''
      security:
        - extractApiKey: []
        - bearerAuth: []
        - cookieAuth: []
components:
  schemas:
    LibraryNotification:
      type: object
      description: >-
        Output projection for a ``LibraryNotification`` row.


        Carries ``share_summary`` / ``direct_share_summary`` /
        ``struct_summary``

        rather than the full related serializer to keep response sizes small —

        the notifications list can run to hundreds of rows for an active mod

        and we want to render the nav-tray panel fast. Callers wanting

        the full row hit ``/api/v2/library/shares/<id>/`` or

        ``/api/v2/library/share/links/<id>/`` separately.


        For any given row, exactly one of (``share_summary``,

        ``direct_share_summary``, ``struct_summary``) is non-null — the

        share/direct-share tracks carry a share row, the AD-368

        ``batch_test_completed`` kind carries a ``struct_summary``

        (its click-through back to the builder). The ``kind`` field is the

        discriminator the UI should branch on.
      properties:
        id:
          type: integer
          readOnly: true
        kind:
          allOf:
            - $ref: '#/components/schemas/KindEnum'
          readOnly: true
        is_read:
          type: boolean
          readOnly: true
        created_at:
          type: string
          format: date-time
          readOnly: true
        read_at:
          type:
            - string
            - 'null'
          format: date-time
          readOnly: true
        share_summary:
          oneOf:
            - $ref: '#/components/schemas/_ShareSummary'
            - type: 'null'
          readOnly: true
        direct_share_summary:
          oneOf:
            - $ref: '#/components/schemas/_DirectShareSummary'
            - type: 'null'
          readOnly: true
        struct_summary:
          oneOf:
            - $ref: '#/components/schemas/_StructSummary'
            - type: 'null'
          readOnly: true
      required:
        - created_at
        - direct_share_summary
        - id
        - is_read
        - kind
        - read_at
        - share_summary
        - struct_summary
    KindEnum:
      enum:
        - share_requested
        - share_approved
        - share_rejected
        - share_kicked
        - mod_shared_your_item
        - direct_share_link_revoked
        - batch_test_completed
        - batch_test_failed
      type: string
      description: |-
        * `share_requested` - Share requested
        * `share_approved` - Share approved
        * `share_rejected` - Share rejected
        * `share_kicked` - Share kicked
        * `mod_shared_your_item` - Mod shared your item
        * `direct_share_link_revoked` - Direct share link revoked
        * `batch_test_completed` - Batch test completed
        * `batch_test_failed` - Batch test failed
    _ShareSummary:
      type: object
      description: |-
        Compact projection of the share row that triggered a notification.

        ``content_type`` mirrors the discriminator used elsewhere in
        /api/v2/library/ (``"struct"`` / ``"batch"``). ``object_id`` is
        the underlying item's primary key — the SPA can navigate to
        ``/structs/<slug>/`` or ``/batch/<id>/`` from there.
      properties:
        id:
          type: integer
        content_type:
          type: string
        object_id:
          type: integer
        state:
          type: string
      required:
        - content_type
        - id
        - object_id
        - state
    _DirectShareSummary:
      type: object
      description: >-
        Compact projection of the direct-share link that triggered a
        notification.


        Shape mirrors :class:`_ShareSummarySerializer` so the SPA can use a

        single notification-card component for both surfaces. ``content_type``

        + ``object_id`` resolve to the underlying ``Struct`` / ``Batch``;

        ``is_revoked`` is always True at notification time (the revoke is

        what triggered the row) but the field is present so a future

        REVOKED-vs-future-kind disambiguation stays cheap.
      properties:
        id:
          type: integer
        content_type:
          type: string
        object_id:
          type: integer
        is_revoked:
          type: boolean
      required:
        - content_type
        - id
        - is_revoked
        - object_id
    _StructSummary:
      type: object
      description: |-
        Compact projection of the ``Struct`` a notification points at.

        Emitted for the ``batch_test_completed`` kind (AD-368), whose
        click-through target is the schema builder rather than a share row.
        ``slug`` resolves to ``/structs/<slug>/`` — the same lookup the HTML
        routes and the ``/api/v2/structs/<slug>/`` surface use.
      properties:
        id:
          type: integer
        slug:
          type: string
        name:
          type: string
      required:
        - id
        - name
        - slug
  securitySchemes:
    extractApiKey:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: |
        Organisation API key from Settings → API / `/api/keys/`. The secret is
        shown once. Send `Authorization: Bearer sk-abacus-…`. One active key
        per organisation. Ingest (`/api/v2/ingest/*`) refuses API keys — that
        surface is Auth0-only with `ingest:read` / `ingest:write` scopes.
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >
        Auth0 access token for a signed-in user. Send `Authorization: Bearer
        <token>`.

        The SPA and desktop agent use this. Prefer an organisation API key for

        server-to-server integrations.
    cookieAuth:
      type: apiKey
      in: cookie
      name: sessionid
      description: |
        Django session cookie from a browser login. Present so the web app can
        call `/api/v2` without a header. Do not rely on this for integrations.

````