> ## 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.

# List direct-share links

> List direct-share links the caller issued.

Links the caller issued. Listing is how you find an id to revoke.


## OpenAPI

````yaml GET /api/v2/library/share/links/
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/library/share/links/:
    get:
      tags:
        - v2/library
      summary: List direct-share links issued by the current user
      description: >-
        Returns links scoped to the user's organization. Mods see every link in
        the org; rank-and-file users see only links they issued. Filter by
        ``content_type`` (struct/batch) and/or ``object_id`` to narrow to a
        specific item's links — useful for the schema-edit / batch-detail
        toolbar that renders the active link next to the [Share via Link]
        button.
      operationId: v2_library_share_links_list
      parameters:
        - in: query
          name: content_type
          schema:
            type: string
            enum:
              - batch
              - struct
          description: '"struct" or "batch".'
        - in: query
          name: cursor
          schema:
            type: string
          description: Opaque cursor from a previous response.
        - in: query
          name: object_id
          schema:
            type: integer
          description: Narrow to a specific Struct or Batch primary key.
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedDirectShareLinkList'
          description: ''
      security:
        - extractApiKey: []
        - bearerAuth: []
        - cookieAuth: []
components:
  schemas:
    PaginatedDirectShareLinkList:
      type: object
      required:
        - results
      properties:
        next:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?cursor=cD00ODY%3D"
        previous:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?cursor=cj0xJnA9NDg3
        results:
          type: array
          items:
            $ref: '#/components/schemas/DirectShareLink'
    DirectShareLink:
      type: object
      description: |-
        Output projection for a :class:`DirectShareLink` row.

        Composed for the list endpoint (owner-side roster) and as the
        response body of every mutation endpoint.

        The ``acceptances`` field carries the roster — recipients do NOT see
        other users' acceptances (Decision 33), so the view layer is
        responsible for nulling this out (or using a different serializer
        class entirely) on recipient-facing endpoints.

        The ``url`` field is the fully-qualified token-landing URL, built
        from the request's ``build_absolute_uri`` when available. Falls back
        to a relative path otherwise.
      properties:
        id:
          type: integer
          readOnly: true
        content_type:
          type: string
          readOnly: true
        object_id:
          type: integer
          readOnly: true
        content_object_summary:
          oneOf:
            - $ref: '#/components/schemas/_DirectShareContentObjectSummary'
            - type: 'null'
          readOnly: true
        token:
          type: string
          readOnly: true
        url:
          type:
            - string
            - 'null'
          readOnly: true
        created_by:
          oneOf:
            - $ref: '#/components/schemas/_DirectShareActor'
            - type: 'null'
          readOnly: true
        created_at:
          type: string
          format: date-time
          readOnly: true
        revoked_at:
          type:
            - string
            - 'null'
          format: date-time
          readOnly: true
        revoked_by:
          oneOf:
            - $ref: '#/components/schemas/_DirectShareActor'
            - type: 'null'
          readOnly: true
        is_revoked:
          type: boolean
          readOnly: true
        note:
          type: string
          readOnly: true
        acceptances:
          type: array
          items:
            $ref: '#/components/schemas/DirectShareAcceptance'
          readOnly: true
      required:
        - acceptances
        - content_object_summary
        - content_type
        - created_at
        - created_by
        - id
        - is_revoked
        - note
        - object_id
        - revoked_at
        - revoked_by
        - token
        - url
    _DirectShareContentObjectSummary:
      type: object
      description: >-
        Tiny shape: just enough to render a share row in the UI.


        Mirrors
        :class:`deckmonkey.api_v2.library.serializers._ContentObjectSummarySerializer`

        so the SPA's orval client gets a stable shape between org-library

        and direct-share surfaces. For ``Struct`` rows: ``{"id", "slug",

        "name", "status", "kind"}``; for ``Batch`` rows: ``{"id", "name",

        "status", "kind"}``.


        Named with a ``_DirectShare`` prefix to avoid a drf-spectacular

        component-name collision with the org-library serializer of the

        same role (same shape, but spectacular keys components by Python

        class name).
      properties:
        id:
          type: integer
        kind:
          type: string
        name:
          type: string
        slug:
          type: string
        status:
          type: string
      required:
        - id
        - kind
        - name
    _DirectShareActor:
      type: object
      description: |-
        Compact user projection for ``created_by`` / ``revoked_by``
        / ``accepted_by``.

        Named with a ``_DirectShare`` prefix to avoid a drf-spectacular
        component-name collision with
        :class:`deckmonkey.api_v2.library.serializers._ActorSerializer`.
      properties:
        id:
          type:
            - integer
            - 'null'
        email:
          type:
            - string
            - 'null'
          format: email
      required:
        - id
    DirectShareAcceptance:
      type: object
      description: |-
        Output projection for a single :class:`DirectShareAcceptance` row.

        Used as a roster element inside :class:`DirectShareLinkSerializer`
        (owner-side roster on the link detail) AND as the response body of
        the recipient-side accept / remove endpoints (so the SPA can update
        its local cache from the response without a follow-up GET).
      properties:
        id:
          type: integer
          readOnly: true
        link_id:
          type: integer
          readOnly: true
        accepted_by:
          oneOf:
            - $ref: '#/components/schemas/_DirectShareActor'
            - type: 'null'
          readOnly: true
        accepted_at:
          type: string
          format: date-time
          readOnly: true
        removed_at:
          type:
            - string
            - 'null'
          format: date-time
          readOnly: true
        is_active:
          type: boolean
          readOnly: true
      required:
        - accepted_at
        - accepted_by
        - id
        - is_active
        - link_id
        - removed_at
  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.

````