Edit designs
After a user creates a design, they may want to edit the design later. To enable this, Canva provides a My Designs carousel in the product catalog and an ID for each design.
Partners can enable the My Designs carousel to show and reopen a design from the product catalog. Partners can use the design ID to reopen a design by directly launching the Canva editor.
This page explains how to reopen and edit a design.

Edit a design via the catalog-to-editor path

The catalog-to-editor path lets you show and reopen a design from the My Designs carousel of the product catalog.
A product catalog doesn’t show the My Designs carousel by default. You must enable the carousel.
To enable the carousel, use the onDesignSelect callback in the showCatalog method.
1
(async () => {
2
const api = await Canva.Partnership.initialize({
3
apiKey: "<partner_api_key>",
4
autoAuthToken: "<auto_auth_token>",
5
container: document.getElementById("container"),
6
});
7
8
const onDesignSelect = (opts) => {
9
console.log(opts);
10
};
11
12
api.showCatalog({
13
onDesignSelect,
14
});
15
})();
Copied!
The onDesignSelect callback passes information about the design a user selects, including the design ID.
At this point, users can see their designs in the My Designs carousel, but can’t reopen a design in the Canva editor yet.

Step 2: Reopen a design

When a user selects a design in the My Designs carousel, you must reopen the design in the Canva editor. This lets a user edit their design.
To reopen a design, in the onDesignSelect callback, call the editDesign method and pass the design ID.
1
const onDesignSelect = (opts) => {
2
api.editDesign({
3
...opts,
4
designId: opts.designId,
5
});
6
};
Copied!

Edit a design via the direct-to-editor path

The direct-to-editor path lets you reopen a design by directly launching the Canva editor.

Step 1: Get the design ID

Canva provides the design ID when:
  • A user creates a new design.
  • Canva generates the artworks for a design.
You can save the design ID locally or to a datastore. You can later use the design ID to reopen a design.

Option 1: When a user creates a design

To get the design ID when a user creates a design, use the onDesignOpen callback in the createDesign method.
1
(async () => {
2
const api = await Canva.Partnership.initialize({
3
apiKey: "<partner_api_key>",
4
autoAuthToken: "<auto_auth_token>",
5
});
6
7
const onDesignOpen = (opts) => {
8
console.log(opts);
9
};
10
11
api.createDesign({
12
partnerProductId: "Poster11x17in",
13
designSource: "direct",
14
onDesignOpen
15
});
16
})();
Copied!

Option 2: When Canva generates the artworks

To get the design ID when Canva generates the artworks for a design, use the onMultiArtworkCreate method in the createDesign method.
1
(async () => {
2
const api = await Canva.Partnership.initialize({
3
apiKey: "<partner_api_key>",
4
autoAuthToken: "<auto_auth_token>",
5
});
6
7
const onMultiArtworkCreate = (opts) => {
8
opts.artworks.forEach((artwork) => {
9
console.log(artwork);
10
});
11
};
12
13
api.createDesign({
14
partnerProductId: "Poster11x17in",
15
designSource: "direct",
16
onMultiArtworkCreate
17
});
18
})();
Copied!

Step 2: Reopen a design

To reopen a design, call the editDesign method and pass the design ID.
1
api.editDesign({
2
designId: "DESIGN ID GOES HERE"
3
});
Copied!
Last modified 2mo ago