Skip to Content
Documents

Rename or move a document

PATCH
/documents/{id}

Renames a document, moves it, or both. Neither invalidates its generated audio.

Authorization

headerAuthorizationBearer <token>

Authorization code with S256 PKCE. Discover issuer metadata at /.well-known/oauth-authorization-server/api/auth and resource metadata at /.well-known/oauth-protected-resource/api/v1. Request the /api/v1 resource explicitly. The same token endpoint also supports the advertised OAuth device grant.

Scope: documents:write

Path Parameters

id*string
Match^[a-f0-9]{64}$

Request Body

application/json
  1. body
name?string
Length1 <= length
folderId?string|null

Response Body

Updated document.

application/json
  1. response
id*string
Match^[a-f0-9]{64}$
name*string
size*integer
lastModified*number
type*string
Value in"pdf""epub""docx""html"
scope?"user"
Value in"user"
folderId?string
recentlyOpenedAt?number
contentVersion?string
author?string
language?string
readingProgress?
status*string

not_started: a PDF has not been parsed yet and reading or generating will start it. unknown: the compute worker could not be reached; retry.

Value in"not_started""processing""ready""failed""unknown"
operationId*string|null
error*string|null
webUrl*string
Formaturi
fileUrl*string
curl -X PATCH 'https://reader.example/api/v1/documents/string' \  -H 'Content-Type: application/json' \  -d '{  "name": "paper.pdf"}'
Example Response
{  "id": "string",  "name": "string",  "size": 0,  "lastModified": 0,  "type": "pdf",  "scope": "user",  "folderId": "string",  "recentlyOpenedAt": 0,  "contentVersion": "string",  "author": "string",  "language": "string",  "readingProgress": {    "fraction": 0,    "updatedAtMs": 0  },  "status": "not_started",  "operationId": "string",  "error": "string",  "webUrl": "http://example.com",  "fileUrl": "string"}