POST
/
v1
/
files
/
{idOrKey}
/
{destinationKey}
curl --request POST \
  --url https://api.botpress.cloud/v1/files/{idOrKey}/{destinationKey} \
  --header 'Content-Type: application/json' \
  --data '{
  "overwrite": true
}'
{
  "file": {
    "id": "<string>",
    "botId": "<string>",
    "key": "<string>",
    "url": "<string>",
    "size": 123,
    "contentType": "<string>",
    "tags": {},
    "metadata": {},
    "createdAt": "<string>",
    "updatedAt": "<string>",
    "accessPolicies": [
      "integrations"
    ],
    "index": true,
    "status": "upload_pending",
    "failedStatusReason": "<string>",
    "expiresAt": "<string>",
    "owner": {
      "type": "bot",
      "id": "<string>",
      "name": "<string>"
    }
  }
}

Headers

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.

Path Parameters

idOrKey
string
required

File ID or Key

destinationKey
string
required

The new key of the file. The file key must not be in use already in the destination bot.

Body

application/json

Additional options for file copying.

The body is of type object.

Response

200
application/json

An object containing the file metadata and URL

The response is of type object.