> ## 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 org-library shares

> List org-library share rows.

Org Library rows the caller can see. Approve/reject/kick are separate POSTs and require an org admin.


## OpenAPI

````yaml GET /api/v2/library/shares/
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/shares/:
    get:
      tags:
        - v2/library
      summary: List org-library share rows visible to the current user
      description: >-
        Returns share rows scoped to the user's organization. Mods see every row
        (the pending-inbox + every approved/terminal row); rank-and-file members
        see only rows they initiated plus all APPROVED rows in the org (the
        discoverable library). Filter by ``state``, ``content_type``
        (struct/batch), or ``shared_by_me=true`` to restrict to rows the caller
        initiated.
      operationId: v2_library_shares_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: shared_by_me
          schema:
            type: boolean
          description: If true, restricts to shares the caller initiated.
        - in: query
          name: state
          schema:
            type: string
            enum:
              - approved
              - kicked
              - pending
              - rejected
              - revoked
          description: Filter by share lifecycle state.
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedOrgLibraryShareList'
          description: ''
      security:
        - extractApiKey: []
        - bearerAuth: []
        - cookieAuth: []
components:
  schemas:
    PaginatedOrgLibraryShareList:
      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/OrgLibraryShare'
    OrgLibraryShare:
      type: object
      description: |-
        Output projection for an ``OrgLibraryShare`` row.

        Composed for both the list endpoint and as the response body of
        every mutation endpoint, so the SPA can re-render the row from a
        POST response without a follow-up GET. ``content_object_summary``
        is computed via ``SerializerMethodField`` because the underlying
        target is a generic FK — a normal nested serializer doesn't fit.
      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/_ContentObjectSummary'
            - type: 'null'
          readOnly: true
        state:
          allOf:
            - $ref: '#/components/schemas/StateEnum'
          readOnly: true
        shared_by:
          oneOf:
            - $ref: '#/components/schemas/_Actor'
            - type: 'null'
          readOnly: true
        decided_by:
          oneOf:
            - $ref: '#/components/schemas/_Actor'
            - type: 'null'
          readOnly: true
        decided_at:
          type:
            - string
            - 'null'
          format: date-time
          readOnly: true
        note:
          type: string
          readOnly: true
        created_at:
          type: string
          format: date-time
          readOnly: true
        updated_at:
          type: string
          format: date-time
          readOnly: true
      required:
        - content_object_summary
        - content_type
        - created_at
        - decided_at
        - decided_by
        - id
        - note
        - object_id
        - shared_by
        - state
        - updated_at
    _ContentObjectSummary:
      type: object
      description: |-
        Tiny shape: just enough to render a share row in the UI.

        For ``Struct`` rows: ``{"id", "slug", "name", "status"}`` (slug is
        the SPA-routing key). For ``Batch`` rows: ``{"id", "name",
        "status"}``. ``kind`` distinguishes them when the SPA wants a
        single discriminator field; it mirrors ``content_type.model``.
      properties:
        id:
          type: integer
        kind:
          type: string
        name:
          type: string
        slug:
          type: string
        status:
          type: string
      required:
        - id
        - kind
        - name
    StateEnum:
      enum:
        - pending
        - approved
        - rejected
        - revoked
        - kicked
      type: string
      description: |-
        * `pending` - Pending
        * `approved` - Approved
        * `rejected` - Rejected
        * `revoked` - Revoked
        * `kicked` - Kicked
    _Actor:
      type: object
      description: Compact user projection for ``shared_by`` / ``decided_by`` fields.
      properties:
        id:
          type:
            - integer
            - 'null'
        email:
          type:
            - string
            - 'null'
          format: email
      required:
        - id
  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.

````