Exports the user's design as one or more static files.
To learn more, see Exporting designs.
Usage
import { requestExport } from "@canva/design";(async () => {const response = await requestExport({acceptedFileTypes: ["PNG", "JPG"],});if (response.status === "COMPLETED") {console.log(response); // => { status: "COMPLETED", title: "My design", exportBlobs: [{ url: "https://example.com/image.png" }] }} else {console.log("The user exited the export flow.");console.log(response); // => { status: "ABORTED" }}})();
Rate limit
This method has a rate limit of 10 requests every 10 seconds.
Parameters
Required
The options for configuring the export of a design.
Required
The types of files the user can export their design as.
Returns
A Promise
that resolves with the following object:
Required
The result of the successful export of a design.
Required
A value that identifies if the export was successful or not.
Optional
The title of the design, if it had been set by the user.
Required
The exported files.
Required
The URL of the exported file, such as a ZIP or PNG file.