The Canva Apps SDK, Connect APIs, and MCP are now unified in the Canva Developers SDK. Learn more⁠(opens in a new tab or window).
Canva Developers SDK
The Canva Apps SDK, Connect APIs, and MCP are now unified in the Canva Developers SDK. Learn more⁠(opens in a new tab or window).

create-upload-url

Get a single-use URL for uploading a file to Canva.

Use create-upload-url to upload a file that your AI application has the bytes for, such as a chat attachment, a local file, or generated content. The tool supports images, videos, PDFs, and other documents. For a small image or video file that's already at a public URL, use upload-asset-from-url instead.

Uploading a file takes two steps:

  1. Call create-upload-url to get an uploadUrl.
  2. Send the file's raw bytes as the body of a single HTTP POST request to the uploadUrl, with the header Content-Type: application/octet-stream. Don't use a multipart form, base64 encoding, or a JSON wrapper.

Example prompt

"Upload this logo to my Canva account."

The tool takes no parameters.

Example responses

IDs, URLs, and tokens below are placeholders; field names and structure are exactly as returned.

The tool returns the upload URL and HTTP method:

{
"uploadUrl": "https://www.canva.com/_blob/upload/ingress/upload/file/agent-tool?_sat=EXAMPLE_TOKEN",
"httpMethod": "POST",
"resultNote": "The upload response contains resource IDs for the uploaded file; pass them to other Canva tools to reference the file."
}
JSON

The response to the POST request contains the ID of the uploaded file. The ID's name depends on the file type: mediaId for images, videoId for videos, and fileId for documents, such as PDFs.

{
"mediaId": "MEDIA_EXAMPLE"
}
JSON

Pass the ID to other tools to reference the file, such as in imageReferences for generate-image.

Each upload URL allows exactly one upload and expires after a short time. If the URL has been used, has expired, or the upload was rejected, call create-upload-url again for a new URL. Never retry a used or expired URL.

Learn more