forcesave

Forcibly saves the document being edited without closing it. The document editing might be continued after this command, so this will not be the final saved document version.

Request example

{
  "c": "forcesave",
  "key": "Khirz6zTPdfd7",
  "userdata": "sample userdata"
}

Parameters

ParameterTypePresenceDescription
cstringrequiredDefines the command type.
keystringrequiredDefines the document identifier used to unambiguously identify the document file.
userdatastringoptionalDefines some custom identifier which will help distinguish the specific request in case there were more than one.

Response example

{
  "error": 0,
  "key": "Khirz6zTPdfd7"
}

Parameters

ParameterTypePresenceDescription
errorintegerrequiredDefines an error code.
keystringrequiredDefines the document identifier used to unambiguously identify the document file.

Get Help

  • If you have any questions about ONLYOFFICE Docs, try the FAQ section first.
  • You can request a feature or report a bug by posting an issue on GitHub.
  • You can also ask our developers on ONLYOFFICE forum (registration required).