copyFile
Copy file
POST
/v1/files/{idOrKey}/{destinationKey}Authorization
AuthorizationBearerrequiredBearer authentication header of the form Bearer <token>, where <token> is your auth token.
Header parameters
x-destination-bot-idstringThe bot ID to copy the file to. You must have permission to create files in the destination bot. If the destination bot ID is omitted, the file will be copied to the same bot the source file belongs to.
x-bot-idstringrequiredBot id
x-integration-idstringIntegration id
x-integration-aliasstringIntegration alias
x-integration-namestringIntegration name
x-user-idstringUser Id
x-user-rolestringUser Role
Path parameters
idOrKeystringrequiredFile ID or Key
destinationKeystringrequiredThe new key of the file. The file key must not be in use already in the destination bot.
Request body
Additional options for file copying.
overwritebooleanSet to `true` to overwrite the file if it already exists, otherwise an error will be returned.
When this endpoint is called using bot authentication, the existing file must have been originally created by the same bot making the file copy request in order to overwrite it.
Response
An object containing the file metadata and URL
fileobjectrequired