Uploads a document file into a space document library, or — when lesson_id is given — attaches it directly to a course lesson.
Files are stored privately and served through a download route rather than a public URL. A space upload is created as draft media that the cleanup cron removes within two hours unless a post adopts it, while a lesson upload is activated immediately and appended to the lesson document list.
Endpoint
Method:
POSTPath:
/documents/uploadEdition: PRO
Controller:
DocumentController@uploadRoute source:
fluent-community-pro/app/Modules/DocumentLibrary/DocumentModule.php:42The space route requires the
can_upload_documentspermission in that space; the lesson route requires course-admin access to the course that owns the lesson.Requires FluentCommunity Pro.
Reconstructed sample
This endpoint belongs to a module that is not active on the reference install (or needs a file upload), so the payload below was reconstructed by reading the controller rather than recorded. Field names and types follow the source; values are illustrative.
POST Upload Document
Uploads a document file into a space document library, or — when lesson_id is given — attaches it directly to a course lesson.
Controller: DocumentController@upload
Route source: fluent-community-pro/app/Modules/DocumentLibrary/DocumentModule.php:42
Authorizations
WordPress Application Passwords — use Basic auth with username:application_password.
Request Body
Responses
Successful response