POST /content/resources/find
API reference for the "/content/resources/find" endpoint.
When a user interacts with a content extension, Canva sends POST requests to the following endpoint:
1
<base_url>/content/resources/find
Copied!
Specifically, Canva sends this request when a user:
  • Opens an extension.
  • Opens a container.
  • Paginates through resources.
  • Searches for content.
The purpose of this request is to retrieve content that Canva can display in the side panel of the editor, such as images, embeds, or containers.
The types property in the request body determines the type of resources the extension can provide in the response. For example, when value of the types includes "IMAGE", the endpoint can respond with image resources.

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.
  • To configure the type of resources that Canva expects the extension to provide, change the extension's Content type via the Developer Portal.

Request

Endpoint

1
POST <base_url>/content/resources/find
Copied!

Headers

Property
Type
Required
Description
X-Canva-Signatures
string
Yes
A comma-separated list of request signatures. The name of this header is sometimes lowercase (e.g. x-canva-signatures).
X-Canva-Timestamp
string
Yes
The UNIX timestamp (in seconds) of when Canva sent the request. The name of this header is sometimes lowercase (e.g. x-canva-timestamp).

Body

Properties

Property
Type
Required
Description
user
string
Yes
The ID of the user.
brand
string
Yes
The ID of the user's team.
label
string
Yes
The type of extension that sent the request.
limit
number
Yes
The maximum number of resources to provide in a response.
locale
string
Yes
The user’s locale as an IETF BCP 47 language tag.
type (deprecated)
string
Yes
The type of resources the extension must provide in the response. Enum: "CONTAINER", "EMBED", "IMAGE", "VIDEO"
types
Array<string>
Yes
The types of resources the extension can provide in the response. Enum: "CONTAINER", "EMBED", "IMAGE", "VIDEO"
continuation
string
No
A token for paginating resources.
containerId
string
No
The ID of the selected container.
query
string
No
A user-provided search query.

Example

1
{
2
"limit": 100,
3
"user": "<user>",
4
"brand": "<brand>",
5
"label": "<label>",
6
"locale": "<locale>",
7
"type": "<type>"
8
}
Copied!

Responses

200 - Success (containers)

The response an extension must provide when the types property in the request body includes "CONTAINER".

Properties

Property
Type
Required
Description
type
"SUCCESS"
Yes
The type of response.
resources
Array<Container>
Yes
The containers to render in the side panel.
continuation
string
No
A token for paginating resources.

Example

1
{
2
"resources": [],
3
"type": "SUCCESS"
4
}
Copied!

200 - Success (embeds)

The response an extension must provide when the types property in the request body includes "EMBED".

Properties

Property
Type
Required
Description
type
"SUCCESS"
Yes
The type of response.
resources
Array<Embed>
Yes
The embeds to render in the side panel.
continuation
string
No
A token for paginating resources.

Example

1
{
2
"resources": [],
3
"type": "SUCCESS"
4
}
Copied!

200 - Success (images)

The response an extension must provide when the types property in the request body includes "IMAGE".

Properties

Property
Type
Required
Description
type
"SUCCESS"
Yes
The type of response.
resources
Array<Image>
Yes
The images to render in the side panel.
continuation
string
No
A token for paginating resources.

Example

1
{
2
"resources": [],
3
"type": "SUCCESS"
4
}
Copied!

200 - Success (videos)

The response an extension must provide when the types property in the request body includes "VIDEO".

Properties

Property
Type
Required
Description
type
"SUCCESS"
Yes
The type of response.
resources
Array<Video>
Yes
The videos to render in the side panel.
continuation
string
No
A token for paginating resources.

Example

1
{
2
"resources": [],
3
"type": "SUCCESS"
4
}
Copied!

200 - Error

The response an extension provides when it can't provide the requested resources.

Properties

Property
Type
Required
Description
type
"ERROR"
Yes
The type of response.
errorCode
string
Yes
An error code that describes what went wrong. Enum: "CONFIGURATION_REQUIRED", "FORBIDDEN", "INTERNAL_ERROR", "INVALID_REQUEST", "NOT_FOUND", "TIMEOUT"

Example

1
{
2
"type": "ERROR",
3
"errorCode": "<error_code>"
4
}
Copied!

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

Container

Represents a container (folder) that Canva renders in the side panel. When a user selects a container, Canva sends a request for resources that belong to the container.

Properties

Property
Type
Required
Description
thumbnail
Thumbnail
No
A thumbnail for the container.
id
string
Yes
A unique ID for the container. The ID must be less than 100 characters.
name
string
Yes
A human readable name for the container. The name must be equal to or less than 200 characters.
type
"CONTAINER"
Yes
The type of resource.

Example

1
{
2
"id": "<id>",
3
"name": "<name>",
4
"type": "CONTAINER"
5
}
Copied!

Embed

Represents embeddable media that Canva renders in the side panel, such as a YouTube video or Instagram photo. When a user selects an embed, Canva adds it to their design.

Properties

Property
Type
Required
Description
id
string
Yes
A unique ID for the embed. The ID must be less than 100 characters.
name
string
Yes
A human readable name for the embed. The name must be equal to or less than 200 characters.
type
"EMBED"
Yes
The type of resource.
url
string
Yes
The URL of the embeddable media. This URL must be HTTPS-enabled, supported by Iframely, and less than 2048 characters.
thumbnail
Thumbnail
Yes
A thumbnail for the embed.

Example

1
{
2
"id": "<id>",
3
"name": "<name>",
4
"type": "EMBED",
5
"url": "<url>"
6
}
Copied!

Image

Represents an image file that Canva renders in the side panel, such as a PNG or SVG.

Properties

Property
Type
Required
Description
id
string
Yes
A unique ID for the image. This ID must always refer to the same image file and be less than 100 characters.
name
string
Yes
A human readable name for the image. The name must be equal to or less than 200 characters.
type
"IMAGE"
Yes
The type of resource.
url
string
Yes
The URL of the full-resolution image. This URL must be HTTPS-enabled, not redirect to a different URL, and be less than 2048 characters. The MIME type of the image must match the type specified in the contentType property. The image must meet Canva's file upload requirements.
contentType
string
Yes
The MIME type of the image. Enum: "image/jpeg", "image/png", "image/svg+xml", "image/heic"
thumbnail
Thumbnail
Yes
A thumbnail for the image. This thumbnail must have the same aspect ratio as the full-resolution image.

Example

1
{
2
"id": "<id>",
3
"name": "<name>",
4
"type": "IMAGE",
5
"url": "<url>",
6
"contentType": "<content_type>"
7
}
Copied!

Video

Represents a video file that Canva renders in the side panel, such as an MP4 or MOV file.

Properties

Property
Type
Required
Description
id
string
Yes
A unique ID for the video. This ID must always refer to the same video file and be less than 100 characters.
name
string
Yes
A human readable name for the video. The name must be less than 100 characters.
type
"VIDEO"
Yes
The type of resource.
url
string
Yes
The URL of the full-resolution video. This URL must be HTTPS-enabled, not redirect to a different URL, and be less than 2048 characters. The MIME type of the video must match the type specified in the contentType property. The video must meet Canva's file upload requirements.
contentType
string
Yes
The MIME type of the video. Enum: "video/mov", "image/gif", "video/mpeg", "video/x-matroska", "video/webm", "video/mp4"
width
number
Yes
The width of the full-resolution video, in pixels.
height
number
Yes
The height of the full-resolution video, in pixels.
durationMs
number
Yes
The duration of the video, in milliseconds.
thumbnail
Thumbnail
Yes
A thumbnail for the video. This thumbnail must have the same aspect ratio as the full-resolution video.

Example

1
{
2
"width": 0,
3
"height": 0,
4
"durationMs": 0,
5
"id": "<id>",
6
"name": "<name>",
7
"type": "VIDEO",
8
"url": "<url>",
9
"contentType": "<content_type>"
10
}
Copied!

Thumbnail

A thumbnail image.

Properties

Property
Type
Required
Description
url
string
Yes
The URL of the thumbnail. This URL must be HTTPS-enabled and less than 2048 characters.
height
number
No
The height of the thumbnail, in pixels. If you provide a height, you must provide a width.
width
number
No
The width of the thumbnail, in pixels. If you provide a width, you must provide a height.

Example

1
{
2
"url": "<url>"
3
}
Copied!
Last modified 1mo ago