POST /editing/image/process/get
API reference for the "/editing/image/process/get" endpoint.
If an editing extension supports remote image processing, it's not always possible for the extension to process the user's image on the server before the request times out. (The current timeout duration is 30 seconds for China and 15 seconds for the rest of the world.)
In these cases, the /editing/image/process can initiate polling. Canva then repeatedly sends POST requests to the following endpoint for up to 60 seconds:
1
<base_url>/editing/image/process/get
Copied!
The purpose of these requests is to check if the image processing task is complete. Once it is, the remoteProcess method returns the user's processed image.

Notes

When sending this request, Canva replaces <base_url> with the extension's Base URL. You can configure the Base URL via the Developer Portal.

Request

Endpoint

1
POST <base_url>/editing/image/process/get
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.
id
string
Yes
The ID of the processed image.

Example

1
{
2
"user": "<user>",
3
"brand": "<brand>",
4
"id": "<id>"
5
}
Copied!

Responses

200 - Success (image processing is ongoing)

The response an extension provides when the image processing task is ongoing and polling should continue.

Properties

Property
Type
Required
Description
type
"SUCCESS"
Yes
The type of response.

Example

1
{
2
"type": "SUCCESS"
3
}
Copied!

200 - Success (image processing is finished)

The response an extension provides when the image processing task has finished, the extension can provide the user's processed image, and polling can be stopped.

Properties

Property
Type
Required
Description
type
"SUCCESS"
Yes
The type of response.
resource
object
Yes
The processed image.
resource.type
string
Yes
The file type of the processed image. Enum: "JPG", "PNG", "SVG"
resource.url
string
Yes
The URL of the processed image.
resource.width
integer
Yes
The width of the processed image , in pixels.
resource.height
integer
Yes
The height of the processed image , in pixels.
resource.blobs
Array<Blob>
No
Any Blobs the client-side code needs to process the user's image. This array is limited to 3 items.
resource.metadata
string
No
Any metadata the client-side code needs to process the user's image.

Example

1
{
2
"resource": {
3
"width": 0,
4
"height": 0,
5
"type": "<type>",
6
"url": "<url>"
7
},
8
"type": "SUCCESS"
9
}
Copied!

200 - Error

Properties

Property
Type
Required
Description
type
"ERROR"
Yes
The type of response.
errorCode
string
Yes
An error code that describes what went wrong.

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

Blob

Properties

Property
Type
Required
Description
id
string
Yes
A unique ID of the Blob.
type
string
Yes
The file type of the Blob. Enum: "BIN", "JPG", "JSON", "PNG", "SVG"
url
string
Yes
The URL of the Blob.

Example

1
{
2
"id": "<id>",
3
"type": "<type>",
4
"url": "<url>"
5
}
Copied!
Last modified 14d ago