POST /publish/resources/find

API reference for the "/publish/resources/find" endpoint.

If a publish extension uses the Flat list or Nested list layout, Canva sends POST requests to the following endpoint:

<base_url>/publish/resources/find
bash

Specifically, Canva sends these requests when a user:

  • Opens an extension that uses the Flat list or Nested list layout.
  • Opens a container in an extension that uses the Nested list layout.

The purpose of these requests is to retrieve a list of resources from the extension and then render those resources in the Publish menu as files or folders.

When a resource is rendered as a folder, a user can select it and publish their design to a specific location on the destination platform (such as a specific folder in Dropbox).

When a resource is rendered as a file, a user can't interact with it.

  • 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.
  • The API refers to files as "IMAGE" resources and folders as "CONTAINER" resources.
  • Extensions should meet the UX guidelines.
POST <base_url>/publish/resources/find
bash
PropertyTypeRequiredDescription
X-Canva-SignaturesstringYesA comma-separated list of request signatures. The name of this header is sometimes lowercase (e.g. x-canva-signatures).
X-Canva-TimestampstringYesThe UNIX timestamp (in seconds) of when Canva sent the request. The name of this header is sometimes lowercase (e.g. x-canva-timestamp).
PropertyTypeRequiredDescription
userstringYesThe ID of the user.
brandstringYesThe ID of the user's team.
labelstringYesThe type of extension that sent the request.
limitnumberYesThe maximum number of resources to provide in a response.
preferredThumbnailHeightintegerYesThe recommended height , in pixels of any thumbnails in the response.
preferredThumbnailWidthintegerYesThe recommended width , in pixels of any thumbnails in the response.
designIdstringYesThe ID of the user's design. This ID does not change if the user republishes their design.
continuationstringNoA token for paginating resources.
containerIdstringNoThe ID of the selected container.
querystringNoA user-provided search query.
{
"limit": 100,
"preferredThumbnailHeight": 500,
"preferredThumbnailWidth": 500,
"user": "<user>",
"brand": "<brand>",
"label": "<label>",
"designId": "<design_id>"
}
json

The response an extension provides when it can return a list of resources to render in the Publish menu.

PropertyTypeRequiredDescription
type"SUCCESS"YesThe type of response.
resourcesArray<Resource>Yes
continuationstringNoA token for paginating resources.
{
"resources": [],
"type": "SUCCESS"
}
json
PropertyTypeRequiredDescription
type"ERROR"YesThe type of response.
errorCodestringYesAn error code that describes what went wrong. Enum: "CONFIGURATION_REQUIRED", "FORBIDDEN", "INTERNAL_ERROR", "INVALID_REQUEST", "NOT_FOUND", "TIMEOUT"
{
"type": "ERROR",
"errorCode": "<error_code>"
}
json

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.

PropertyTypeRequiredDescription
thumbnailThumbnailNoA thumbnail image.
idstringYesA unique ID for the resource.
namestringYesA human readable name for the resource.
typestringYesThe type of resource. Canva renders "CONTAINER" resources as folders and "IMAGE" resources as files. Enum: "CONTAINER", "IMAGE"
isOwnerbooleanYesA value of true indicates that the user is the owner of the resource.
readOnlybooleanYesA value of true indicates that the user has read-only access to the resource.
{
"isOwner": true,
"readOnly": true,
"id": "<id>",
"name": "<name>",
"type": "<type>"
}
json

A thumbnail image.

PropertyTypeRequiredDescription
urlstringYesThe URL of the thumbnail. This URL must be HTTPS-enabled and less than 2048 characters.
heightnumberNoThe height of the thumbnail, in pixels. If you provide a height, you must provide a width.
widthnumberNoThe width of the thumbnail, in pixels. If you provide a width, you must provide a height.
{
"url": "<url>"
}
json