Skip to content

Renames a document, updating both the media record and the entry in the parent post or lesson document list.

Only the display title changes; the stored file and its real extension are untouched, so a rename cannot change the served file type.

Endpoint

  • Method: POST

  • Path: /documents/update

  • Edition: PRO

  • Controller: DocumentController@updateDocument

  • Route source: fluent-community-pro/app/Modules/DocumentLibrary/DocumentModule.php:43

  • Lesson documents require course-admin access; space documents require the can_upload_documents permission in that space, or ownership of the upload where it is not yet attached to a post.

  • Requires FluentCommunity Pro.

Live sample

The request and response below were recorded against a running FluentCommunity install and then anonymised — member names, emails, avatars and post content are fictional, and long collections are trimmed to a few entries.

POST Update Document

POST
/documents/update

Renames a document, updating both the media record and the entry in the parent post or lesson document list.

Controller: DocumentController@updateDocument
Route source: fluent-community-pro/app/Modules/DocumentLibrary/DocumentModule.php:43

Authorizations

ApplicationPasswords

WordPress Application Passwords — use Basic auth with username:application_password.

Type
API Key (header: Authorization)

Request Body

application/json
JSON
{
  
"id": 0,
  
"title": "string"
}

Responses

Successful response

application/json
JSON
{
  
"file": {
  
  
"id": 0,
  
  
"media_key": "string",
  
  
"title": "string",
  
  
"type": "string",
  
  
"url": "string"
  
},
  
"message": "string"
}

Playground

Authorization
Body

Samples

Powered by VitePress OpenAPI

FluentCommunity developer documentation