Skip to main content

Replace Files

Use this API to replace files with a new version of the file

Request Body REQUIRED
askribeKey string

Your secret Askribe key. Can be obtained from your org's settings dashboard

driveId string

The id of your drive. It looks like RLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. This can be found on your drive dashboard.

files object[]

List of files to be uploaded in the specified drive.

itemId string

Id of the textual file whose contents you want to update.

url string

URL of the file to be uploaded. The file will be fetched from this URL and uploaded to the drive.

mimeType string

Mime type of the file

size int64

Size of the file in bytes

Responses
200

Returns the replaced files

Schema OPTIONAL
isSuccess boolean OPTIONAL
data object[] OPTIONAL
name string OPTIONAL

Name of the item

description string OPTIONAL

Description of the item

resourceId string OPTIONAL

The id of the item. It looks like RLIXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

driveId string OPTIONAL

The id of your drive. It looks like RLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

resourceType string OPTIONAL

Possible values: [FILE, FOLDER]

FILE or FOLDER

storageUrl string OPTIONAL

URL of the storage location of the item

size int64 OPTIONAL

Size of the item in bytes

mimeType string OPTIONAL

Mime type of the item, e.g., application/pdf, image/png

parentFolderId string OPTIONAL

Parent folder id.

createdAt int64 OPTIONAL

Timestamp when the item was created

updatedAt int64 OPTIONAL

Timestamp when the item was last updated

isDeleted boolean OPTIONAL

Boolean indicating if the item is present in trash

isExplicitlyDeleted boolean OPTIONAL

Boolean indicating if the item was explicitly deleted by the user. Useful to distinguish whether an item was deleted directly or via its ancestor folder.

tags string[] OPTIONAL

List of tag ids associated with the item

pathById string OPTIONAL

Path of the item in the drive via ids

pathByName string OPTIONAL

Path of the item in the drive via names

fileContents string OPTIONAL

Contents of the file if the file is a text file. This field will only be populated for read files

errorMessage string OPTIONAL
customError object OPTIONAL