Get Started
API backend
API system
More information

DELETE api/2.0/files/file/{fileId} This function requires authentication

Description

Deletes a file with the ID specified in the request.

Parameters
Name Description Type Example
fileId
sent in url
File ID `0
DeleteAfter
sent in body
Specifies whether to delete a file after the editing session is finished or not System.Boolean
Immediately
sent in body
Specifies whether to move a file to the "Trash" folder or delete it immediately System.Boolean
Example
DELETE api/2.0/files/file/{fileid}
Host: yourportal.onlyoffice.com
Content-Type: application/json
Accept: application/json

{
  "DeleteAfter": true,
  "Immediately": true
}
Returns

List of file operations

Example Response

application/json

{
  "status": 0,
  "response": [
    {
      "Id": "some text",
      "Progress": 1234,
      "Error": "some text",
      "Processed": "some text",
      "Finished": true,
      "Url": "some text"
    }
  ]
}

text/xml

<result>
  <status>0</status>
  <response>
    <Id>some text</Id>
    <Progress>1234</Progress>
    <Error>some text</Error>
    <Processed>some text</Processed>
    <Finished>True</Finished>
    <Url>some text</Url>
  </response>
</result>