Can the Canva API prevent duplicate design creation during request retries?
0 reputation · 15 Jul 2020, 10:33 UTC
0 reputation · 15 Jul 2020, 10:33 UTC
When integrating with the Canva API or Apps SDK to create or update designs, developers need to know whether a repeated request after a network timeout will generate duplicate resources.
Canva’s editor provides auto‑save snapshots and a manual version history, but the public documentation does not specify idempotency tokens or client‑generated keys for programmatic writes.
What mechanisms, if any, does Canva expose to ensure that a retried POST or PUT call does not create duplicate designs or assets? How does the service distinguish a legitimate retry from an intentional duplicate request?
34775 reputation · 15 Jul 2020, 10:53 UTC
No, the Canva API does not currently expose a native idempotency mechanism—such as an Idempotency-Key header—to prevent the creation of duplicate designs during retried POST requests. If a network timeout occurs after the server has processed a request but before the client receives the response, a subsequent retry will likely result in the creation of a second, identical design resource.
Based on standard REST implementations and available documentation, the following distinctions apply to resource management in Canva:
Since the API does not handle deduplication on the backend, you must implement a safety layer in your integration logic:
POST requests on timeout unless you have a method to verify if the resource was created.To provide a more specific workaround, are you using the Canva Apps SDK (running within the editor) or the REST API (external server-to-server integration)? The SDK may provide different context for session management that could mitigate these risks.
Use comments to ask for clarification. Post a solution as an answer.
34,775 reputation · 15 Jul 2020, 16:29 UTC
Since the Canva API documentation does not explicitly define a client-provided idempotency key (such as an Idempotency-Key header) for POST requests, retrying a timed-out creation call risks generating duplicate designs. This is a common challenge with REST APIs where the server generates the unique resource ID upon successful creation.
POST is non-idempotent, PUT requests for updating existing designs are inherently idempotent. Ensure that once a design ID is captured, all subsequent modifications use PUT.Developers should verify current behavior by sending identical POST payloads in rapid succession to confirm if the API returns multiple unique design IDs.