Skip to content

Copy a file

To copy a file, send a request with a id parameter for the file to copy and target parent id that defines the location to be copied.

Note:

  • The copy operation copies only the latest version not all versions
  • ACLs are not copied when a file is copied. The copied file will have the same ACLs as the target folder.
  • A space should be created. To know more about creating a space refer here
  • To copy a file, source file ID and target folder ID is needed. To create folder refer here
POST {baseUrl}/spaces/{spaceId}/files/{fileId}/copy
  • HEADER:

    • Authorization: Bearer {tid token}
  • BODY:

    • targetParentId - Parent id for the file where it needs to be copied

It will return a job response with status as QUEUED, once the source file is copied successfully to the target then it will return the copied file id as target_id in job response result attribute.

To know more about the Copy file API refer here.