perform-editing-operations

Apply one or more edits within an open editing transaction.

Use perform-editing-operations after start-editing-transaction. Edits stay in draft until you commit with commit-editing-transaction.

Example prompt

"Update the headline to 'Introducing Canva AI Editing'."

Pass transaction_id, page_index, and operations (an array of {type, element_id, text}).

Example response

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

{
"richtexts": [
{ "page_index": 1, "regions": [ { "type": "character", "text": "Introducing Canva AI Editing" } ], "containerElement": { "type": "TEXT", "position": { "top": 399.67, "left": 160.92 }, "dimension": { "width": 758.16, "height": 175.35 } }, "element_id": "ELEMENT_EXAMPLE_1" }
],
"fills": [ { "type": "image", "asset_id": "ASSET_EXAMPLE", "page_index": 1, "editable": true, "element_id": "ELEMENT_EXAMPLE_2" } ],
"thumbnails": [ { "width": -1, "height": -1, "url": "https://design-manipulation-download.canva.com/EXAMPLE" } ],
"edit_operation_results": [ { "status": "success", "operation_info": { "type": "replace_text", "element_id": "ELEMENT_EXAMPLE_1" } } ],
"pages": [ { "page_id": "PAGE_EXAMPLE", "page_number": 1, "dimension": { "width": 1080, "height": 1350 }, "is_responsive": false, "is_empty": false, "is_editable": true } ]
}
JSON

operations is an array of operation objects. Check edit_operation_results for a per-operation status of success. On responsive pages, use find_and_replace_text rather than replace_text.

Don't pass a raw image URL into an editing operation. Upload it first with upload-asset-from-url to get an asset_id.

Learn more