Create a document
Adds a document from inline text, a public link or a finished upload. The document ID is the SHA-256 of the canonical file, so adding the same bytes again returns the same document. A DOCX returns 202 with an upload resource while it is converted.
AuthorizationBearer <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
application/json- body
source*||name?stringfolderId?string|nullauthor?stringlanguage?stringCanonical document registered. A PDF may still be processing.
application/json- response
id*string^[a-f0-9]{64}$name*stringsize*integerlastModified*numbertype*string"pdf""epub""docx""html"scope?"user""user"folderId?stringrecentlyOpenedAt?numbercontentVersion?stringauthor?stringlanguage?stringreadingProgress?status*stringnot_started: a PDF has not been parsed yet and reading or generating will start it. unknown: the compute worker could not be reached; retry.
"not_started""processing""ready""failed""unknown"operationId*string|nullerror*string|nullwebUrl*stringurifileUrl*stringcurl -X POST 'https://reader.example/api/v1/documents' \ -H 'Content-Type: application/json' \ -d '{ "name": "notes.md", "source": { "type": "text", "text": "# Notes\n\nA document to read." }}'{ "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"}