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

Description

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

Parameters
Name Description Type Example
fileId
sent in url
File ID number 1234
DestTitle
sent in body
Destination file title string some text
DestFolderId
sent in body
Destination folder ID number 1234
EnableExternalExt
sent in body
Specifies whether to allow the creation of external extension files or not Bool value true
Password
sent in body
Password string some text
Example
POST api/2.0/files/file/1234/copyas
Host: yourportal.onlyoffice.com
Content-Type: application/json
Accept: application/json

{
  "DestTitle": "some text",
  "DestFolderId": 1234,
  "EnableExternalExt": true,
  "Password": "some text"
}
Returns

Copied file entry information

Example Response
{
  "status": 0,
  "response": {
    "Title": "some text",
    "Access": "ReadWrite",
    "Shared": true,
    "Created": "2008-04-10T06-30-00.000Z",
    "CreatedBy": {
      "Id": "9924256A-739C-462b-AF15-E652A3B1B6EB",
      "DisplayName": "some text",
      "Title": "some text",
      "AvatarSmall": "some text",
      "ProfileUrl": "some text",
      "HasAvatar": true
    },
    "Updated": "2008-04-10T06-30-00.000Z",
    "AutoDelete": "2008-04-10T06-30-00.000Z",
    "UpdatedBy": {
      "Id": "9924256A-739C-462b-AF15-E652A3B1B6EB",
      "DisplayName": "some text",
      "Title": "some text",
      "AvatarSmall": "some text",
      "ProfileUrl": "some text",
      "HasAvatar": true
    },
    "ProviderKey": "some text"
  }
}