Get Started
Usage API
More information

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

Description

Saves editing of a file with the ID specified in the request.

Parameters
Name Description Type Example
fileId
sent in url
File ID string some text
fileExtension
sent in body
File extension string some text
downloadUri
sent in body
URI for downloading string some text
stream
sent in body
File stream A stream for uploading files without multipart request N/A
doc
sent in body
Shared token string some text
forcesave
sent in body
Forcibly saves a file or not Bool value true
Example
PUT api/2.0/files/file/some+text/saveediting
Host: yourportal.onlyoffice.com
Content-Type: application/json
Accept: application/json

{
  "fileExtension": "some text",
  "downloadUri": "some text",
  "stream": "N/A",
  "doc": "some text",
  "forcesave": true
}
Returns

Saved file

Example Response

application/json

{
  "status": 0,
  "response": {
    "folderId": 12334,
    "version": 3,
    "versionGroup": 1,
    "contentLength": "12.06 KB",
    "pureContentLength": 12345,
    "fileStatus": 2,
    "viewUrl": "http:\/\/www.onlyoffice.com\/viewfile?fileid=2221",
    "fileType": 7,
    "fileExst": ".txt",
    "comment": null,
    "id": 311186532,
    "title": "Some titile.txt",
    "access": 1,
    "shared": false,
    "rootFolderType": 2,
    "updatedBy": {
      "id": "00000000-0000-0000-0000-000000000000",
      "displayName": "Mike Zanyatski",
      "title": "Manager",
      "avatarSmall": "url to small avatar",
      "profileUrl": ""
    },
    "created": "2021-11-26T04:36:28.8440469Z",
    "createdBy": {
      "id": "00000000-0000-0000-0000-000000000000",
      "displayName": "Mike Zanyatski",
      "title": "Manager",
      "avatarSmall": "url to small avatar",
      "profileUrl": ""
    },
    "updated": "2021-11-26T04:36:28.8440469Z"
  }
}

text/xml

<result>
  <status>0</status>
  <response>
    <folderId>12334</folderId>
    <version>3</version>
    <versionGroup>1</versionGroup>
    <contentLength>12.06 KB</contentLength>
    <pureContentLength>12345</pureContentLength>
    <fileStatus>2</fileStatus>
    <viewUrl>http://www.onlyoffice.com/viewfile?fileid=2221</viewUrl>
    <fileType>7</fileType>
    <fileExst>.txt</fileExst>
    <comment />
    <id>311186532</id>
    <title>Some titile.txt</title>
    <access>1</access>
    <shared>false</shared>
    <rootFolderType>2</rootFolderType>
    <updatedBy>
      <id>00000000-0000-0000-0000-000000000000</id>
      <displayName>Mike Zanyatski</displayName>
      <title>Manager</title>
      <avatarSmall>url to small avatar</avatarSmall>
      <profileUrl></profileUrl>
    </updatedBy>
    <created>2021-11-26T04:36:28.8440469Z</created>
    <createdBy>
      <id>00000000-0000-0000-0000-000000000000</id>
      <displayName>Mike Zanyatski</displayName>
      <title>Manager</title>
      <avatarSmall>url to small avatar</avatarSmall>
      <profileUrl></profileUrl>
    </createdBy>
    <updated>2021-11-26T04:36:28.8440469Z</updated>
  </response>
</result>