Skip to main content

Create Files

Use this API to create files (via contents of the file) in the drive

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.

parentId string

The id of the parent folder where you want to upload the files. If you want to upload the files in the root directory, send null.

files object[]

List of files to be created in the specified drive.

name string

Name of the file

description string

Description of the file

fileContents string

Contents of the file to be created.

mimeType string

Mime type of the file

Responses
200

Returns the newly created 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