Copy a file

POST /api/2.0/files/file/{fileId}/copyas

Request

Copies (and converts if possible) an existing file to the specified folder.

Headers

Acceptenum of string

Can be one of: application/json.

Content-Typeenum of string

Can be one of: application/json.

Path

fileIdstring

File ID

Body

destFolderIdstring

Destination folder ID

destTitlestring

Destination file title

toFormboolean

Convert to form

Examples

POST /api/2.0/files/file/%7BfileId%7D/copyas HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: example.com
curl --request POST \
  --url https://example.com/api/2.0/files/file/%7BfileId%7D/copyas \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json'

Responses

200

Copied file

Namestring
UpdatedByobject
Idstringformat: uuid
DisplayNamestring
Titlestring
AvatarSmallstring
ProfileUrlstring
Updatedstring
Locationstring

Get Help

  • If you have any questions about ONLYOFFICE Workspace, 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).