Documents API
Document library upload, listing, update, delete, and download-related portal endpoints.
PRO
Authentication
Document routes are portal routes and rely on PortalPolicy plus per-document access checks in the Pro module.
Endpoints
| Method | Path | Edition | Operation | What it does |
|---|---|---|---|---|
GET | /documents | PRO | List Documents | Returns the paginated document posts of one space, newest first, each with its author and topics attached. |
POST | /documents/upload | PRO | Upload Document | Uploads a document file into a space document library, or — when `lesson_id` is given — attaches it directly to a course lesson. |
POST | /documents/update | PRO | Update Document | Renames a document, updating both the media record and the entry in the parent post or lesson document list. |
POST | /documents/delete | PRO | Delete Document | Detaches a document from its post or lesson and hands the media record to the media cleanup hook. |