---
title: "Share or unshare a Library artifact"
method: PATCH
path: "/library/artifacts/{id}/share"
---

# Share or unshare a Library artifact

`PATCH /library/artifacts/{id}/share`

## Request

- Base URL: `https://api.agentsky.dev/v1`
- URL: `https://api.agentsky.dev/v1/library/artifacts/{id}/share`
- Auth: HTTP bearer

Turn the public link on or off, as the web share dialog does. `revision` is the current version; `publicVersion` pins the version every public alias serves. Disabling revokes every public alias but keeps authenticated grants. Optional sharingRevision compares the whole access state; revokeAll=true with enabled=false also stops workspace/member grants and placement atomically. A fixed-workspace credential cannot read or change whole-artifact sharing if any audience grant is outside its credential ceiling.

## Path parameters

- `id` string, required

## Request body

- object
  - `enabled` boolean, required
  - `revision` integer, required
  - `publicVersion` integer, nullable
  - `fromPublicVersion` integer, nullable
  - `sharingRevision` string
  - `revokeAll` true

## Response `200`

OK

- object

## Other responses

- `400`: Error — { error: { code, message } }
- `401`: Error — { error: { code, message } }
- `403`: Error — { error: { code, message } }
- `404`: Error — { error: { code, message } }
- `409`: Error — { error: { code, message } }
- `503`: Error — { error: { code, message } }
- `default`: Error — { error: { code, message, request_id } }

## Changes

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

[Operation history](https://skmtc.dev/agentsky/apis/agentsky-developer-api/changes/library/artifacts/:id/share/patch.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/0d435187cd55?raw)
