POST /publish/resources/upload
When a user publishes their design via a publish extension, Canva sends a POST
request to the following endpoint:
<base_url>/publish/resources/upload
The purpose of the request is to upload the user's design to the destination platform.
The body of the request includes an array of assets. If a user publishes their design as a JPG or PNG, each page of the design is a separate asset. If the user publishes their design as a PDF or PPTX, the entire design is a single asset.
Each asset has a URL, which the extension must use to download the asset and upload it to the destination platform.
Notes
- Extensions must respond to this request within 8 seconds.
- When sending this request, Canva replaces
<base_url>
with the extension's Base URL. You can configure the Base URL via the Developer Portal. - If a user publishes a design that contains embedded media, such as a YouTube video or Instagram photo, Canva temporarily caches that media. If the user re-publishes their design, any changes to the underlying media (for example, a new thumbnail for a YouTube video) may not be reflected in the published design. The cache duration is approximately 24 hours.
- Extensions should meet the UX guidelines.
Request
Endpoint
POST <base_url>/publish/resources/upload
Headers
Body
Properties
Example
{"assets": [],"user": "<user>","brand": "<brand>","label": "<label>","designId": "<design_id>"}
Responses
200 - Success
The response an extension provides when it successfully uploads the published assets to the destination platform.
Properties
Example
{"type": "SUCCESS"}
200 - Error
Properties
Example
{"type": "ERROR","errorCode": "<error_code>"}
401 - Invalid request signature or timestamp
An extension must verify the request signature and timestamp of all incoming requests. When an extension can't verify either of these values, it must reject the request with a 401
status code.
Schemas
Thumbnail
A thumbnail image.
Properties
Example
{"url": "<url>"}
Asset
Properties
Example
{"name": "<name>","type": "<type>","url": "<url>"}