Skip to content

Design Export Automation

Automate design exports and file delivery using the Connect API.

Export Flow

javascript
// 1. Trigger export
const exportRes = await fetch(
  `https://api.canva.com/rest/v1/designs/${designId}/export`,
  {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${accessToken}`,
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({
      format: 'pdf',
      export_quality: 'regular',
    }),
  }
);

const { job_id } = await exportRes.json();

// 2. Poll for completion
let exportJob;
while (!exportJob || exportJob.status !== 'success') {
  await sleep(2000);
  const pollRes = await fetch(
    `https://api.canva.com/rest/v1/designs/export/${job_id}`,
    { headers: { 'Authorization': `Bearer ${accessToken}` } }
  );
  exportJob = await pollRes.json();
}

// 3. Download the file (URL valid for 30 minutes)
const downloadUrl = exportJob.urls[0];
const fileRes = await fetch(downloadUrl);
const buffer = await fileRes.arrayBuffer();
// Save to disk, S3, etc.

Export Formats

FormatUse Case
pdfPrint, sharing
pngWeb images
jpgCompressed images
gifAnimated designs
mp4Video designs
pptxPowerPoint export

Webhook-Based Export

Instead of polling, use webhooks for production systems:

  1. Register design.export.completed webhook
  2. Trigger export as normal
  3. Your webhook receives notification when done
  4. Download the file from the provided URL

Error Handling

javascript
if (exportJob.status === 'failed') {
  console.error('Export failed:', exportJob.error);
  // Retry logic here
}

Canva Developer Documentation SOP Site