---
title: "Read sharing settings for an original Library file [read]"
method: GET
path: "/library/links"
---

# Read sharing settings for an original Library file \[read\]

`GET /library/links`

## Request

- Base URL: `https://api.agentsky.dev/v1`
- URL: `https://api.agentsky.dev/v1/library/links`
- Auth: HTTP bearer

Read-only: an unshared file returns id=null and revision=0. Membership and original source access are checked. All file kinds use the same link settings; bytes are never copied into a new artifact. Fixed-workspace credentials receive only their selected audience link, without cross-workspace artifact sharing metadata.

## Query parameters

- `ref` string, required
- `workspace` string

## Response `200`

Current settings and real workspace members

- LibraryLinkResponse
  - `artifact` object: For consumer artifacts: effective sharing across the legacy public link, workspace placement and all original-file grants; public links share one pinned version.
    - `enabled` boolean
    - `sharingRevision` string
    - `revision` integer
    - `publicVersion` integer, nullable
    - `url` string, nullable
    - `workspace` object, nullable
    - `versions` object[]
    - `grants` object[]
  - `link` object, required
    - `ref` union, required
      - object
        - `kind` 'agent_prompt', required
        - `agentId` string, required: The original agent user instruction file (AGENTS.md); never the combined runtime/system prompt.
      - object
        - `kind` 'file', required
        - `fileId` string, required
        - `sessionId` string
      - object
        - `kind` 'task_file', required
        - `taskId` string, required
        - `path` string, required
      - object
        - `kind` 'memory_note', required
        - `storeId` string, required
        - `memoryId` string, required
      - object
        - `kind` 'skill_file', required
        - `skillId` string, required
        - `path` string, required
      - object
        - `kind` 'artifact', required
        - `artifactId` string, required
      - object
        - `kind` 'platform_artifact', required
        - `artifactId` string, required
        - `path` string: Exact full path from the native artifact manifest; DesignSystem files use root plus the relative editable_files path. Omit only for the entire artifact entry.
    - `workspace` string, nullable
    - `revision` integer, required
    - `sharingRevision` string: For consumer artifacts, the whole sharing revision returned by artifact.sharingRevision. Supply it to reject concurrent changes in another workspace or the legacy share API.
    - `workspaceAccess` 'none' | 'view' | 'edit', required
    - `publicEnabled` boolean, required
    - `members` object[], required
      - `userId` string, required
      - `access` 'view' | 'edit', required
    - `id` string, nullable, required
    - `editable` boolean, required
    - `sharedUrl` string, nullable, required
    - `publicUrl` string, nullable, required
  - `availableMembers` object[], required
    - `userId` string, required
    - `name` string, nullable, required
    - `email` string, nullable, required

## Other responses

- `default`: Error — { error: { code, message } }

## Changes

- **2026-11-02** `e5e8f0229a99`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/agentsky/apis/agentsky-developer-api/changes/library/links/get.md)

---

[API](https://skmtc.dev/agentsky/apis/agentsky-developer-api.md) - [All operations](https://skmtc.dev/agentsky/apis/agentsky-developer-api/llms.txt) - [OpenAPI document](https://skmtc.dev/agentsky/apis/agentsky-developer-api/revisions/8280a065ef6a?raw)
