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:

<base_url>/editing/image/process/get

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

POST <base_url>/editing/image/process/get

Headers

Property

Type

Required

Description

X-Canva-Signatures

string

Yes

A comma-separated list of request signatures.

X-Canva-Timestamp

string

Yes

The UNIX timestamp (in seconds) of when Canva sent the request.

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

{
"user": "<user>",
"brand": "<brand>",
"id": "<id>"
}

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

{
"type": "SUCCESS"
}

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

{
"resource": {
"width": 0,
"height": 0,
"type": "<type>",
"url": "<url>"
},
"type": "SUCCESS"
}

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

{
"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

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

{
"id": "<id>",
"type": "<type>",
"url": "<url>"
}