On September 25th, 2024, we released v2 of the Apps SDK. To learn what’s new and how to upgrade, see Migration FAQ and Migration guide.

getDesignMetadata

API reference for the getDesignMetadata method.
This version of the API is a preview. Preview APIs are unstable and may change without warning. You can't release public apps using this API until it's stable.

Retrieves information about the design.

Returns

Information about the design. This is a Promise that resolves with the following object:

pageMetadataIterable<PageContext>

The information associated with each page of the design.

The order of pages is not guaranteed.

dimensionsPageDimensions | undefined

The dimensions of the page, in pixels.

This may be undefined because some types of pages don't have dimensions, such as whiteboards.

widthnumber

The width of the page, in pixels.

heightnumber

The height of the page, in pixels.

durationInSecondsnumber

The duration of the whole design in seconds.

This is the precise value, which differs from what is displayed in the UI as duration in Canva UI is formatted differently.

titlestringOptional

The title of the user's design.

This is optional and will be undefined if the user hasn't set a title.

defaultPageDimensionsPageDimensionsOptional

The default dimensions that a new page will have when it is added to a design. It is possible for a user to resize a page without resizing the entire design, e.g. by clicking "Expand to Whiteboard". However, there will always be a single set of default dimensions for a design that is applied whenever a new page is created.

This is optional and will be undefined if the design is unbounded (e.g. Whiteboard or Doc).

widthnumber

The width of the page, in pixels.

heightnumber

The height of the page, in pixels.