queueDocument

API reference for the queueDocument method.

Exports the user's design as one or more static files.

import { getExport } from "@canva/preview/export";
(async () => {
const api = getExport();
const result = await api.queueDocument({
acceptedFileTypes: ["PNG", "JPG"],
});
console.log(result); // { exportBlobs: [{ url: "https://example.com/image.png" }] }
})();
#optionsobject
Required

The options for configuring the export of a design.

#options.acceptedFileTypesarray
Required

The types of files the user can export their design as. You must provide at least two file types.

#resultobject
Required

The result of calling the queueDocument method.

#result.exportBlobsarray
Required

The exported files.

#result.exportBlobs[0].urlstring
Required

The URL of the exported design.