Download a file

Download a file.

SecuritySecretApiKey or JWT
Request
path Parameters
id
required
string <= 50 characters ^[@~\-\.\w]+$

The resource identifier string.

query Parameters
imageSize
string^[1-9]{1}[0-9]{1,3}x[1-9]{1}[0-9]{1,3}$

Resize image to specified size. Supports any sizes from 10x10 to 2000x2000 (format {width}x{height}). The image will be returned in the original size if the value is invalid. This parameter will be ignored for non-image files.

Example: imageSize=700x700
Responses
200

The file was retrieved successfully.

Response Headers
Content-Length
integer

The number of bytes in the file.

Example: 48
Content-Type
string

The MIME type of the file.

Example: "image/png"
Response Schema: application/json
string <binary>
302

Resource was moved.

401

Unauthorized access, invalid credentials were used.

403

Access forbidden.

404

Resource was not found.

get/files/{id}/download
Request samples
const file = await api.files.download({id: 'my-file-id'});

// access the file ArrayBuffer to view the content 
console.log(file.data);
Response samples
application/json
"string"