Documentation

Templates API

Update existing templates via API for programmatic template management, bulk updates, or CI/CD integration.

Update a template

const response = await fetch('https://yourdomain.com/api/templates/your-template-id', {
  method: 'PUT',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    name: 'Updated Template Name',
    description: 'Updated description',
    jsonData: {
      canvas: { width: 1200, height: 630, background: '#ffffff' },
      layers: [
        // Your updated layer definitions
      ],
      variables: []
    }
  })
});

const updatedTemplate = await response.json();

Updatable fields

name, description, jsonData, and previewUrl.