API ReferenceFiles API
Copy File
Copy file
Path Parameters
idOrKey*string
File ID or Key
destinationKey*string
The new key of the file. The file key must not be in use already in the destination bot.
Header Parameters
x-destination-bot-id?string
The 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.
Request Body
application/json
Additional options for file copying.
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://example.com/v1/files/string/string" \ -H "Content-Type: application/json" \ -d '{}'{ "file": { "id": "string", "botId": "string", "key": "string", "url": "string", "size": 0, "contentType": "string", "tags": { "property1": "string", "property2": "string" }, "metadata": { "property1": null, "property2": null }, "createdAt": "string", "updatedAt": "string", "accessPolicies": [ "integrations" ], "index": true, "status": "upload_pending", "failedStatusReason": "string", "expiresAt": "string", "owner": { "type": "bot", "id": "string", "name": "string", "alias": "string" }, "indexingStack": "v1" }}{ "file": { "id": "string", "botId": "string", "key": "string", "url": "string", "size": 0, "contentType": "string", "tags": { "property1": "string", "property2": "string" }, "metadata": { "property1": null, "property2": null }, "createdAt": "string", "updatedAt": "string", "accessPolicies": [ "integrations" ], "index": true, "status": "upload_pending", "failedStatusReason": "string", "expiresAt": "string", "owner": { "type": "bot", "id": "string", "name": "string", "alias": "string" }, "indexingStack": "v1" }}