---
title: "Save a native editable file through the caller's Library grant [write]"
method: PUT
path: "/library/shared/{token}"
---

# Save a native editable file through the caller's Library grant \[write\]

`PUT /library/shared/{token}`

## Request

- Base URL: `https://api.agentsky.dev/v1`
- URL: `https://api.agentsky.dev/v1/library/shared/{token}`
- Auth: HTTP bearer

The same original source writer as the web editor. Requires live edit access and a source revision; stale source versions return 409. Grant revocation or downgrade while reading the request also prevents saving. Public links have no writer.

## Path parameters

- `token` string, required

## Request body

- object
  - `revision` string, required
  - `text` string
  - `html` string
  - `office` string: Native Office bytes as base64.
  - `docx` string: Native Word document bytes as base64.
  - `requestId` string, uuid
  - `restoreRevision` string

## Response `200`

Native document save receipt

- SharedLibrarySaved
  - `url` string, required
  - `revision` string, required: The revision acknowledged by this native write, never a later latest read.
  - `publishedAt` string, date-time, required: Native publication time, or the host's acknowledgement time after the original writer succeeds.
  - `text` string, nullable
  - `historyRevision` string

## 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/shared/:token/put.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)
