This is the full developer documentation for Templated API Documentation # Get Account Information > Learn how to retrieve your account information using the Templated API.

This endpoint allows you to retrieve information about your account, including your email, name, API usage statistics, and quota details.

Sample Request

Section titled “Sample Request”

Here’s a sample request to get your account information:

ENDPOINT
GET /v1/account
fetch('https://api.templated.io/v1/account', {
method: 'GET',
headers: {
'Authorization': `Bearer ${API_KEY}`
}
})

Response

Section titled “Response”

The endpoint returns a JSON object with your account details.

{
"email": "user@example.com",
"name": "John Doe",
"apiUsage": 5400,
"apiQuota": 10000,
"usagePercentage": 54,
"plan": "Scale"
}

Response Fields

Section titled “Response Fields”

email string
The email address associated with your account.

name string
Your account name.

apiUsage integer
The current number of API credits you’ve used.

apiQuota integer
Your total API credits quota (monthly if you have a paid plan).

usagePercentage integer
The percentage of your API quota that has been used.

plan string
Your current plan.

# Authentication

Templated uses API keys to allow access to the API.
To get started, create a free account here.
Once logged in, you can find your API key in the API Key tab of your dashboard.
This API key will give you full access to all API endpoints.

How to find your API key

Section titled “How to find your API key”

Follow these simple steps to locate your API key in the Templated dashboard:

  1. Log in to your Templated account

    Go to app.templated.io and sign in with your credentials.

  2. Click on “API Key” in the sidebar

    In the left sidebar navigation, look for the API Key menu item and click on it.

    Click on API Key in the sidebar
  3. Copy your API Key

    Your API key will be displayed on the page. Click the copy button to copy it to your clipboard.

    Copy your API Key

Authorization Header

Section titled “Authorization Header”

The API expects the API key to be included in all requests in the Authorization header as a Bearer token:

AUTHORIZATION HEADER
Authorization: Bearer API_KEY

Base URL

Section titled “Base URL”

This is the base URL that all requests to the API should be made to:

BASE URL
https://api.templated.io

In the next steps we will see sample code to create, retrieve and list renders and templates usign the API.

# Advanced Features > Learn advanced techniques for customizing and enhancing your embedded editor integration.

Take your embedded editor integration to the next level with these advanced features and customization options.

URL Parameters for Customization

Section titled “URL Parameters for Customization”

The embedded editor supports numerous URL parameters to customize behavior and appearance. These parameters can be added to your embed URL to control the editor’s functionality.

Basic Configuration

Section titled “Basic Configuration”

embed string (required)
Your embed configuration ID from the dashboard.

preview boolean
Launch in preview mode (canvas-only). Default: false.

zoom number
Initial zoom level (10-100). 50 equals 100% scale. Auto-calculated if not set.

clone boolean
Create a clone instead of editing the original template. Default: false.

copy boolean
Alternative to clone parameter. Default: false.

Permission Controls

Section titled “Permission Controls”

allow-rename boolean
Allow users to rename templates. Default: true.

allow-save boolean
Enable the save functionality. Default: true.

allow-download boolean
Enable template download. Default: true.

allow-resize boolean
Allow users to resize the template dimensions. Default: false.

allow-create-template boolean
Enable creating new templates from the editor. Default: true.

Layer Controls

Section titled “Layer Controls”

allow-layer-move boolean
Allow moving layers around the canvas. Default: false.

allow-layer-resize boolean
Enable resizing of individual layers. Default: false.

allow-layer-select boolean
Allow selecting layers. Default: false.

allow-layer-unlock boolean
Allow users to unlock locked layers. Default: false.

allow-layer-rename boolean
Enable renaming of layers. Default: false.

allow-text-edition boolean
Allow double-click text editing. Default: false.

UI Customization

Section titled “UI Customization”

hide-sidebar boolean
Hide the left sidebar panel. Default: false.

hide-header boolean
Hide the top header bar. Default: false.

hide-layers-panel boolean
Hide the layers panel. Default: false.

hide-language-toggle boolean
Hide the language switcher. Default: false.

Data and Content

Section titled “Data and Content”

metadata string
Base64-encoded JSON with custom metadata for webhooks.

layers string
Base64-encoded JSON with initial layer data.

folder string
Limit template selection to a specific folder ID.

image-url string
URL of an image to load as background or layer.

w number
Custom template width in pixels.

h number
Custom template height in pixels.

Integration Options

Section titled “Integration Options”

webhook-url string
Override the default webhook URL for this session.

external-id string
Session identifier that tags all created content (templates, uploads, fonts, renders) and enables persistent sessions.

move-to-folder string
Automatically move saved templates to this folder ID.

load-uploads boolean
Load user uploads in the assets panel. Default: false.

launch-mode string
Control how the editor launches. Options: ‘account’, ‘gallery’, ‘blank’.

Example URL with Multiple Parameters

Section titled “Example URL with Multiple Parameters”
Fully Customized Embed
<embed
src="https://app.templated.io/editor/TEMPLATE_ID?embed=CONFIG_ID
&preview=true
&zoom=75
&allow-layer-move=true
&allow-layer-resize=true
&allow-text-edition=true
&hide-sidebar=true
&clone=true
&metadata=ENCODED_METADATA
&layers=ENCODED_LAYERS"
width="100%"
height="100%"
/>

Custom Metadata

Section titled “Custom Metadata”

Pass custom data through the embed that will be sent to your webhooks, enabling you to track user context and trigger specific workflows.

Encoding Metadata

Section titled “Encoding Metadata”

Metadata must be base64-encoded JSON and passed as a URL parameter:

Encoding Metadata
// Your custom metadata
const metadata = {
userId: "user-123",
projectId: "project-456",
clientId: "client-789",
workflowType: "marketing_campaign",
campaignId: "campaign-001"
};
// Encode as base64
const encodedMetadata = btoa(JSON.stringify(metadata));
// Create embed URL with metadata
const embedUrl = `https://app.templated.io/editor?embed=${configId}&metadata=${encodedMetadata}`;
// Update embed element
document.getElementById('editor-embed').src = embedUrl;

Dynamic Metadata Generation

Section titled “Dynamic Metadata Generation”

Generate metadata dynamically based on user context:

Dynamic Metadata with External ID Example
function generateEmbedWithMetadata(user, project) {
const metadata = {
userId: user.id,
userName: user.name,
userEmail: user.email,
projectId: project.id,
projectName: project.name,
timestamp: new Date().toISOString(),
source: 'project_dashboard',
permissions: user.permissions,
subscription: user.subscription.plan
};
const encodedMetadata = btoa(JSON.stringify(metadata));
// Use external ID to maintain session continuity
const externalId = `user-${user.id}-project-${project.id}`;
return `https://app.templated.io/editor?embed=${EMBED_CONFIG_ID}&metadata=${encodedMetadata}&external-id=${externalId}`;
}
// Usage
const embedUrl = generateEmbedWithMetadata(currentUser, currentProject);
document.getElementById('template-editor').src = embedUrl;

Pre-populate Template Data

Section titled “Pre-populate Template Data”

Launch the editor with custom layer data to pre-populate templates with user-specific content.

Layer Data Structure

Section titled “Layer Data Structure”
Layer Data Format
const layerData = {
"text-layer-name": {
text: "Custom text content",
color: "#FF0000",
font_size: "24px"
},
"image-layer-name": {
image_url: "https://example.com/user-photo.jpg"
},
"shape-layer-name": {
fill: "#0066CC",
stroke: "#003366"
}
};
// Encode layer data
const encodedLayers = btoa(JSON.stringify(layerData));

Template with Custom Data

Section titled “Template with Custom Data”
Pre-populated Template Launch
<embed
src="https://app.templated.io/editor/TEMPLATE_ID?embed=CONFIG_ID&layers=ENCODED_LAYER_DATA"
width="100%"
height="100%"
/>

Dynamic Layer Population Examples

Section titled “Dynamic Layer Population Examples”
User Profile Template
function createUserProfileTemplate(user) {
const layers = {
"user-name": {
text: user.fullName,
color: "#333333"
},
"user-title": {
text: user.jobTitle,
color: "#666666"
},
"profile-photo": {
image_url: user.profilePicture
},
"company-logo": {
image_url: user.company.logo
},
"background-color": {
fill: user.company.brandColor
}
};
const encodedLayers = btoa(JSON.stringify(layers));
return `https://app.templated.io/editor/${USER_PROFILE_TEMPLATE_ID}?embed=${EMBED_CONFIG_ID}&layers=${encodedLayers}`;
}

Render Editing

Section titled “Render Editing”

Allow users to edit existing renders, automatically creating template clones for safe editing.

Edit Existing Render

Section titled “Edit Existing Render”
Render Editor Launch
<embed
src="https://app.templated.io/editor?embed=CONFIG_ID&render=RENDER_ID"
width="100%"
height="100%"
/>

Integration Example

Section titled “Integration Example”
Render Edit Integration
function editRender(renderId, userId) {
const metadata = {
userId: userId,
action: 'edit_render',
originalRenderId: renderId,
editMode: true
};
const encodedMetadata = btoa(JSON.stringify(metadata));
const embedUrl = `https://app.templated.io/editor?embed=${EMBED_CONFIG_ID}&render=${renderId}&metadata=${encodedMetadata}`;
// Open in modal or new window
openEditorModal(embedUrl);
}
// Usage in your UI
document.querySelectorAll('.edit-render-btn').forEach(btn => {
btn.addEventListener('click', (e) => {
const renderId = e.target.dataset.renderId;
editRender(renderId, currentUser.id);
});
});

Template Filtering by Folder

Section titled “Template Filtering by Folder”

Limit template selection to specific folders:

Folder-filtered Templates
<!-- Show only templates from specific folder -->
<embed
src="https://app.templated.io/editor?embed=CONFIG_ID&folder=FOLDER_ID"
width="100%"
height="100%"
/>

Editor Event Monitoring

Section titled “Editor Event Monitoring”
Monitor Editor Events
class EditorMonitor {
constructor(embedElement) {
this.embed = embedElement;
this.setupEventListeners();
}
setupEventListeners() {
// Monitor load events
this.embed.addEventListener('load', () => {
console.log('Editor loaded successfully');
this.trackEvent('editor_loaded');
});
// Monitor errors
this.embed.addEventListener('error', (e) => {
console.error('Editor failed to load:', e);
this.trackEvent('editor_error', { error: e.message });
this.showFallback();
});
}
trackEvent(eventName, data = {}) {
// Send to your analytics
analytics.track(eventName, {
...data,
timestamp: new Date().toISOString(),
embedConfigId: this.getConfigId()
});
}
showFallback() {
// Show fallback UI when editor fails to load
const fallback = document.createElement('div');
fallback.className = 'editor-fallback';
fallback.innerHTML = `
<div class="fallback-message">
<h3>Editor temporarily unavailable</h3>
<p>Please try refreshing the page or contact support.</p>
<button onclick="location.reload()">Refresh Page</button>
</div>
`;
this.embed.parentNode.replaceChild(fallback, this.embed);
}
getConfigId() {
const url = new URL(this.embed.src);
return url.searchParams.get('embed');
}
}
// Usage
const editorEmbed = document.getElementById('template-editor');
const monitor = new EditorMonitor(editorEmbed);

Best Practices for Advanced Features

Security:

Performance:

User Experience:

# Embed Configuration > Learn how to configure your embed settings for the Templated Editor.

Configure your embedded editor settings to match your brand and control user permissions. Access these settings in your Templated dashboard under Embed Setup.

Basic Configuration

Section titled “Basic Configuration”

Domain Settings

Section titled “Domain Settings”

Control which domains are allowed to embed the editor.

Domain Settings configuration

Domain
The domain where your embed will be displayed. Must include protocol (https:// or http://).

Allow Development Environment boolean
Enable this to test the embed on localhost or local development environments.

Example Domain Configuration
https://yourdomain.com

Branding

Section titled “Branding”

Customize the look and feel of the editor with your branding.

Appearance and branding configuration

Logo URL
Your company logo displayed in the top-left corner. Ideal size: 100x100px. Supports PNG, JPG, and GIF.

Logo Link
Optional URL where users are redirected when clicking your logo. Must start with https:// or http://.

Accent Color
Hex color code for buttons, links, and interface elements. Default: #1677ff.

Custom Loader
Custom loading animation while the editor loads. Ideal size: 128x128px. Supports GIF animations. Default: Templated’s default loader.

Example Branding Setup
Logo URL: https://yourdomain.com/logo.png
Logo Link: https://yourdomain.com/dashboard
Accent Color: #FF6B35

User Permissions

Section titled “User Permissions”

Control what actions users can perform in the embedded editor.

User permissions configuration

Basic Actions

Section titled “Basic Actions”

Allow Rename
Let users change template names. Default: true.

Allow Save
Enable the save button for users. Default: true.

Allow Resize
Allow users to resize templates. Default: false.

Download Options

Section titled “Download Options”

Allow Download
Enable download functionality. Default: true.

Download Formats
Available formats when download is enabled. Options: JPG, PNG, PDF, MP4.

Layer Permissions

Section titled “Layer Permissions”

Allow Layer Move
Let users move layers around the canvas. Default: false.

Allow Layer Resize
Enable resizing of individual layers. Default: false.

Allow Layer Select
Allow selecting layers. Default: false.

Allow Layer Unlock
Allow users to unlock locked layers. Default: false.

Allow Layer Rename
Enable renaming of layers. Default: false.

Allow Text Edition
Allow double-click text editing. Default: false.

Template Management

Section titled “Template Management”

Allow Create Template
Enable creating new templates from the editor. Default: true.

Launch Modes

Section titled “Launch Modes”

Webhook Integration

Section titled “Webhook Integration”

Testing Your Configuration

Section titled “Testing Your Configuration”
  1. Enable development mode to test on localhost

  2. Copy your embed code from the dashboard

  3. Test all permissions you’ve configured

  4. Verify webhook delivery if configured

  5. Check branding appearance matches your design

# Implementation Examples > Practical examples for integrating the Templated Editor.

Here you can find some examples of the most common use cases for integrating the Templated Editor in your application.

Basic Modal Integration

Section titled “Basic Modal Integration”
Simple Editor Modal
function openTemplateEditor(userId) {
const metadata = {
userId: userId,
timestamp: new Date().toISOString()
};
const encodedMetadata = btoa(JSON.stringify(metadata));
const embedUrl = `https://app.templated.io/editor?embed=YOUR_CONFIG_ID&metadata=${encodedMetadata}`;
const modal = document.createElement('div');
modal.innerHTML = `
<div class="modal">
<embed src="${embedUrl}" width="100%" height="700px" />
<button onclick="this.parentElement.remove()">Close</button>
</div>
`;
document.body.appendChild(modal);
}

Webhook Handler

Section titled “Webhook Handler”
Basic Webhook
app.post('/webhook', (req, res) => {
const { event, template, metadata } = req.body;
if (event === 'save') {
console.log(`Template ${template.id} saved by user ${metadata.userId}`);
}
res.status(200).json({ received: true });
});

Launch Editor with Template and Custom Layer Data

Section titled “Launch Editor with Template and Custom Layer Data”

Pre-populate template layers with custom data when the editor loads.

Custom Layer Data
function openEditorWithCustomData(templateId, userData) {
const layerData = {
"user-name": {
text: userData.name,
color: "#333333",
font_size: "24px"
},
"user-company": {
text: userData.company,
color: "#666666",
font_size: "18px"
},
"profile-image": {
image_url: userData.profileImage
},
"background-shape": {
fill: userData.brandColor || "#0066CC"
}
};
const encodedLayers = btoa(JSON.stringify(layerData));
const embedUrl = `https://app.templated.io/editor/${templateId}?embed=YOUR_CONFIG_ID&layers=${encodedLayers}`;
window.open(embedUrl, '_blank');
}
// Usage example
const userData = {
id: 'user123',
name: 'John Smith',
company: 'Acme Corp',
profileImage: 'https://example.com/profile.jpg',
brandColor: '#FF6B35'
};
openEditorWithCustomData('template_abc123', userData);

Launch Editor with Render Data

Section titled “Launch Editor with Render Data”

Edit an existing render by loading it into the editor.

Edit Existing Render
function editExistingRender(renderId, userId) {
const metadata = {
userId: userId,
renderId: renderId,
mode: 'edit_render'
};
const encodedMetadata = btoa(JSON.stringify(metadata));
const embedUrl = `https://app.templated.io/editor?embed=YOUR_CONFIG_ID&metadata=${encodedMetadata}`;
// Open in modal
const modal = document.createElement('div');
modal.className = 'render-editor-modal';
modal.innerHTML = `
<div class="modal-backdrop">
<div class="modal-content">
<div class="modal-header">
<h3>Edit Design</h3>
<button class="close-btn" onclick="this.closest('.render-editor-modal').remove()">×</button>
</div>
<iframe src="${embedUrl}" width="100%" height="800px" frameborder="0"></iframe>
</div>
</div>
`;
document.body.appendChild(modal);
}
// Alternative: Edit render with custom callback
function editRenderWithCallback(renderId, onSave) {
const metadata = {
renderId: renderId,
callback: 'custom',
onSave: onSave.toString() // Pass callback function
};
const encodedMetadata = btoa(JSON.stringify(metadata));
const embedUrl = `https://app.templated.io/editor?embed=YOUR_CONFIG_ID&metadata=${encodedMetadata}`;
return embedUrl;
}

Launch Editor with Template Clone

Section titled “Launch Editor with Template Clone”

Create a clone of a template that doesn’t appear in your dashboard.

Template Clone Mode
function cloneTemplate(templateId, userId, customizations = {}) {
const metadata = {
userId: userId,
mode: 'clone',
templateId: templateId,
customizations: customizations
};
const encodedMetadata = btoa(JSON.stringify(metadata));
const embedUrl = `https://app.templated.io/editor/${templateId}?embed=YOUR_CONFIG_ID&metadata=${encodedMetadata}`;
// Open in new tab
const newWindow = window.open(embedUrl, '_blank');
// Optional: Listen for completion
const checkClosed = setInterval(() => {
if (newWindow.closed) {
clearInterval(checkClosed);
console.log('Template clone editor closed');
// Handle post-clone actions
}
}, 1000);
}
// Example with product customization
function customizeProduct(productId, templateId) {
const customizations = {
productId: productId,
allowedElements: ['text', 'image'], // Restrict editing
hiddenLayers: ['background', 'logo'], // Lock certain layers
requiredFields: ['customer_name', 'order_number']
};
cloneTemplate(templateId, 'customer_123', customizations);
}
// Usage examples
const templateId = 'template_xyz789';
const userId = 'user_456';
// Basic clone
cloneTemplate(templateId, userId);
// Clone with restrictions
cloneTemplate(templateId, userId, {
allowedElements: ['text'],
maxTemplates: 5
});

Implementation Tips

Start Simple: Begin with a basic modal implementation and gradually add features.

Test Thoroughly: Always test your webhook endpoints and metadata encoding.

Security First: Validate all metadata on your server before processing.

User Experience: Provide clear feedback and loading states for users.

# Form Mode > Canvas + auto-generated form panel for end-users to customize template layers without the full editor.

Form Mode displays a canvas alongside an auto-generated form panel. End-users fill in text, images, and colors through the form; the canvas updates in real-time. Designed for embedding via iframe when you want users to customize templates without the full editor UI.

Check out how it looks like:

Form Mode — canvas with auto-generated form panel

Enable Form Mode

Section titled “Enable Form Mode”

Use the form base path: /editor/form/{TEMPLATE_ID}?embed={CONFIG_ID}.

Basic Form Embed
<iframe
id="template-embed"
src="https://app.templated.io/editor/form/{$TEMPLATE_ID}?embed={$CONFIG_ID}"
width="100%"
height="600"
frameborder="0"
></iframe>

URL parameters

Section titled “URL parameters”

Form Configuration

Section titled “Form Configuration”

Example with flags:

<iframe
src="https://app.templated.io/editor/form/{$TEMPLATE_ID}?embed={$CONFIG_ID}
&form-panel-position=left&allow-download=true"
width="100%" height="600" frameborder="0"
></iframe>

Layer visibility

Section titled “Layer visibility”

Lock layers in the editor to hide them from the form.
Unlocked layers automatically appear as form fields.
This lets you control exactly which layers end-users can customize.

Layer types

Section titled “Layer types”

Each layer type renders a different set of form controls:

Layer typeForm controls
TextText input + color picker
ImageURL input
ShapeFill color picker + stroke color picker
QR CodeText input for data
BarcodeText input for data
RatingNumber input

Runtime control (postMessage)

Section titled “Runtime control (postMessage)”

After the iframe loads, you can control Form Mode at runtime using postMessage. The editor will also send events back.

Messages you can send to the editor

Section titled “Messages you can send to the editor”
Parent → Editor
// Toggle form mode on or off
iframe.contentWindow.postMessage({
type: 'SET_FORM_MODE',
enabled: true
}, '*');
// Change the form panel position
iframe.contentWindow.postMessage({
type: 'SET_FORM_PANEL_POSITION',
position: 'left' // 'left' | 'right'
}, '*');

Events the editor sends back

Section titled “Events the editor sends back”
Editor → Parent
window.addEventListener('message', (event) => {
// Optional: verify origin: if (event.origin !== 'https://app.templated.io') return;
const msg = event.data;
switch (msg?.type) {
// Form mode toggled
case 'FORM_MODE_UPDATED':
console.log('Form mode:', msg.enabled, 'Success:', msg.success);
break;
// Panel position changed
case 'FORM_PANEL_POSITION_UPDATED':
console.log('Panel position:', msg.position, 'Success:', msg.success);
break;
// A form field value changed
case 'FORM_VALUES_CHANGED':
// msg.data contains { layerName: { prop: value } }
console.log('Form values changed:', msg.data);
break;
// User clicked the render button in the form
case 'FORM_RENDER_REQUESTED':
console.log('Render requested:', msg.format, msg.templateId);
break;
}
});

Mobile

Section titled “Mobile”

On screens narrower than 1024px, the form panel automatically stacks below the canvas for a mobile-friendly layout.

Complete example

Section titled “Complete example”
Comprehensive working example
<iframe id="template-embed" width="100%" height="700" frameborder="0"></iframe>
<div>
<button onclick="toggleFormMode()">Toggle Form Mode</button>
<button onclick="switchPanelPosition()">Switch Panel Position</button>
</div>
<script>
const iframe = document.getElementById('template-embed');
const CONFIG_ID = 'YOUR_EMBED_CONFIG_ID';
const TEMPLATE_ID = 'tpl_ABC123';
let formEnabled = true;
let panelPosition = 'right';
// 1) Initial URL-based load
const url = new URL(`https://app.templated.io/editor/form/${TEMPLATE_ID}`);
url.searchParams.set('embed', CONFIG_ID);
url.searchParams.set('form-panel-position', 'right');
iframe.src = url.toString();
// 2) Listen for editor events
window.addEventListener('message', (event) => {
const msg = event.data;
console.log('Received message:', msg);
switch (msg?.type) {
case 'EDITOR_READY':
console.log('Editor ready for interactions');
break;
case 'FORM_MODE_UPDATED':
formEnabled = msg.enabled;
console.log('Form mode:', formEnabled ? 'enabled' : 'disabled');
break;
case 'FORM_PANEL_POSITION_UPDATED':
panelPosition = msg.position;
console.log('Panel position:', panelPosition);
break;
case 'FORM_VALUES_CHANGED':
console.log('Form values changed:', msg.data);
break;
case 'FORM_RENDER_REQUESTED':
console.log('Render requested:', msg.format, msg.templateId);
break;
}
});
// 3) Control functions
function toggleFormMode() {
formEnabled = !formEnabled;
iframe.contentWindow.postMessage({
type: 'SET_FORM_MODE',
enabled: formEnabled
}, '*');
}
function switchPanelPosition() {
panelPosition = panelPosition === 'right' ? 'left' : 'right';
iframe.contentWindow.postMessage({
type: 'SET_FORM_PANEL_POSITION',
position: panelPosition
}, '*');
}
</script>

See also

Section titled “See also”
# The Embedded Editor > Learn how to integrate Templated's editor directly into your website or application.

The Embedded Editor allows you to integrate Templated’s powerful template editing capabilities directly into your website or application.
Your users can create, edit, and customize templates without leaving your platform.
You can check a demo here

Key Features

Section titled “Key Features”

Simple Integration

Embed the editor with a simple HTML embed tag. No complex setup required.

Customizable

Customize colors, logos, permissions, and behavior to match your brand.

Launch Modes

Start with your templates, template gallery, or blank canvas.

Webhook

Receive real-time notifications when users save or download templates.

How to Embed the Editor

Section titled “How to Embed the Editor”
  1. Navigate to the Embedded Editor settings

    Log in to your Templated dashboard and click on Embedded Editor in the sidebar.

    Click on Embedded Editor in the sidebar
  2. Configure your embed settings

    Set up your domain, branding, permissions, and launch behavior using the configuration panels.

    Configure your embed settings
  3. Copy the embed code

    Click the Copy code button to copy the HTML <embed> tag customized for your configuration.

    Copy the embed code
  4. Add to your website or app

    Paste the embed code wherever you want the editor to appear.

  5. Users start editing

    Your users can now create and edit templates directly in your platform.

Basic Integration

Section titled “Basic Integration”

The simplest way to embed the editor is with an HTML embed tag:

<embed
src="https://app.templated.io/editor?embed=YOUR_EMBED_CONFIG_ID"
width="100%"
height="100%"
/>

Advanced Options

Section titled “Advanced Options”

The embedded editor supports many advanced features through URL parameters:

Use Cases

Section titled “Use Cases”

SaaS Platforms

Offer template editing as a feature in your software platform.

Marketing Agencies

Let clients edit templates directly from your client portal.

E-commerce

Allow customers to customize product designs and marketing materials.

Education

Enable students to create presentations and educational materials.

News publishers

Allow users to create, edit and automate your news images.

Automation software

Create software that allows users to create, edit and automate their content.

Getting Started

Section titled “Getting Started”

Ready to integrate the Embedded Editor? Follow these steps:

  1. Set up your embed configuration
  2. Learn about launch modes
  3. Explore URL parameters
  4. Use Preview Mode
  5. Implement webhook integration
  6. Explore advanced features

Requirements

Section titled “Requirements”

Need Help?

Section titled “Need Help?”

We’re glad to assist you integrating the editor to your website or application.
If you need assistance or have questions, please contact our support team through the chat widget in your dashboard or via email at support@templated.io

# Launch Modes > Learn about different ways to initialize the embedded editor for your users.

Launch modes determine how the embedded editor initializes when your users first access it. Choose the mode that best fits your use case and user workflow.

1. Account Templates

Section titled “1. Account Templates”

Launch with your account templates, giving users access to your professionally designed templates.
When using account templates, choose how users interact with your templates:

→ Create Copy (Default)

Section titled “→ Create Copy (Default)”

Creates a new template from the selected one. Changes are saved as a new template in your account.

→ Create Clone

Section titled “→ Create Clone”

Creates a clone that doesn’t appear in your dashboard. Perfect for temporary edits or user-specific variations.

→ Edit Original

Section titled “→ Edit Original”

Directly edit the selected template. Changes are saved to the original template. This is the default mode.

Section titled “2. Template Gallery”

Launch with Templated’s public template gallery, giving users access to hundreds of professionally designed templates.

3. User Renders

Section titled “3. User Renders”

Launch with the user’s previously rendered designs, giving users access to their previously rendered designs.

4. Blank Template

Section titled “4. Blank Template”

Start with a completely blank canvas for custom designs.

Other ways to launch the editor

Section titled “Other ways to launch the editor”

Launch directly into editing a specific template or render, bypassing the selection modal entirely.

Edit specific template

Section titled “Edit specific template”

Launch directly into editing a specific template, bypassing the selection modal entirely.

Launch Specific Template
// Pass the template ID as a parameter to the editor
<embed
src="https://app.templated.io/editor/${TEMPLATE_ID}?embed=${YOUR_CONFIG_ID}"
width="100%"
height="100%"
/>

Clone specific template

Section titled “Clone specific template”

Create a clone of a specific template:

Clone Specific Template
// Pass the template ID as a parameter to the editor and add the clone parameter as true
<embed
src="https://app.templated.io/editor/${TEMPLATE_ID}?embed=${YOUR_CONFIG_ID}&clone=true"
width="100%"
height="100%"
/>

Edit specific render

Section titled “Edit specific render”

Allow users to edit an existing render, automatically creating a clone template:

Edit Existing Render
// Pass the render ID as a parameter to the editor
<embed
src="https://app.templated.io/editor?embed=${YOUR_CONFIG_ID}&render=${RENDER_ID}"
width="100%"
height="100%"
/>

Dynamic Launch Modes

Section titled “Dynamic Launch Modes”

Choose launch modes dynamically based on user context:

Dynamic launch mode selection
function generateEmbedUrl(embedId, templateId) {
const baseUrl = `https://app.templated.io/editor?embed=${embedId}`;
// Specific use cases
if (templateId) {
return `https://app.templated.io/editor/${templateId}?embed=${embedId}`;
}
return baseUrl;
}
// Update embed src dynamically
const embedElement = document.querySelector('#template-editor');
embedElement.src = generateEmbedUrl(currentEmbedId, currentTemplateId);
# Preview Mode > Canvas-only embedded editor with URL flags and runtime control via postMessage.

The Preview Mode is a canvas-only version of the editor designed for fast, distraction-free embedding. It hides the editor UI and focuses on rendering and manipulating template content. You can configure the initial state via URL parameters and control behavior at runtime with postMessage.

You can try a demo implementation here.

Enable Preview Mode

Section titled “Enable Preview Mode”

Use the preview base path: /editor/preview/{TEMPLATE_ID}?embed={CONFIG_ID}.

Basic Preview Embed
<iframe
id="template-embed"
src="https://app.templated.io/editor/preview/{$TEMPLATE_ID}?embed={$CONFIG_ID}"
width="100%"
height="600"
frameborder="0"
></iframe>

Optional URL parameters

Section titled “Optional URL parameters”

Basic Configuration

Section titled “Basic Configuration”

Layer Permissions

Section titled “Layer Permissions”

Template Permissions

Section titled “Template Permissions”

UI Customization

Section titled “UI Customization”

Integration Options

Section titled “Integration Options”

Example with flags:

<iframe
src="https://app.templated.io/editor/preview/{$TEMPLATE_ID}?embed={$CONFIG_ID}
&zoom=50&allow-layer-move=true&allow-layer-resize=true"
width="100%" height="600" frameborder="0"
></iframe>

Runtime control (postMessage)

Section titled “Runtime control (postMessage)”

After the iframe loads, you can control Preview Mode without reloading using postMessage. The editor will also send status events back.

Messages you can send to the editor

Section titled “Messages you can send to the editor”
Parent → Editor
// Update layer values
iframe.contentWindow.postMessage({
type: 'UPDATE_LAYERS',
data: {
'headline': { text: 'New title', color: '#FF0000' },
'hero-image': { image_url: 'https://example.com/image.jpg' }
}
}, '*');
// Update layer values with template background
iframe.contentWindow.postMessage({
type: 'UPDATE_LAYERS',
data: {
background: '#0066CC', // Template-level background color
layers: {
'headline': { text: 'New title', color: '#FF0000' },
'hero-image': { image_url: 'https://example.com/image.jpg' }
}
}
}, '*');
// Set zoom (10–100; 50 = 100% scale)
iframe.contentWindow.postMessage({ type: 'SET_ZOOM', zoom: 60 }, '*');
// Toggle layer capabilities
iframe.contentWindow.postMessage({ type: 'SET_ALLOW_LAYER_MOVE', allowLayerMove: true }, '*');
iframe.contentWindow.postMessage({ type: 'SET_ALLOW_LAYER_RESIZE', allowLayerResize: true }, '*');
iframe.contentWindow.postMessage({ type: 'SET_ALLOW_LAYER_UNLOCK', allowLayerUnlock: true }, '*');
iframe.contentWindow.postMessage({ type: 'SET_ALLOW_LAYER_RENAME', allowLayerRename: true }, '*');
iframe.contentWindow.postMessage({ type: 'SET_ALLOW_TEXT_EDITION', allowTextEdition: true }, '*');
// Toggle template capabilities
iframe.contentWindow.postMessage({ type: 'SET_ALLOW_RENAME', allowRename: true }, '*');
iframe.contentWindow.postMessage({ type: 'SET_ALLOW_SAVE', allowSave: true }, '*');
iframe.contentWindow.postMessage({ type: 'SET_ALLOW_DOWNLOAD', allowDownload: true }, '*');
iframe.contentWindow.postMessage({ type: 'SET_ALLOW_RESIZE', allowResize: true }, '*');
iframe.contentWindow.postMessage({ type: 'SET_ALLOW_CREATE_TEMPLATE', allowCreateTemplate: true }, '*');
// Load a different template without reloading the iframe
iframe.contentWindow.postMessage({ type: 'LOAD_TEMPLATE', templateId: 'tpl_123', clone: false }, '*');
// Save the current template
iframe.contentWindow.postMessage({ type: 'SAVE' }, '*');
// Download the template (uses the format currently selected in the editor)
iframe.contentWindow.postMessage({ type: 'DOWNLOAD' }, '*');
// Download with explicit format and page selection
iframe.contentWindow.postMessage({
type: 'DOWNLOAD',
format: 'pdf', // optional: 'jpg' | 'png' | 'pdf' | 'mp4'
pages: 'all' // optional: 'all' (default) or comma-separated page ids e.g. '1,3'
}, '*');
// Add a new layer
iframe.contentWindow.postMessage({
type: 'ADD_LAYER',
layer: {
type: 'text', // required: 'text' | 'image' | 'video' | 'shape' | 'qr-code'
name: 'my-text-layer', // optional, auto-generated if omitted
x: 100, // optional, default: 0
y: 50, // optional, default: 0
width: 200, // optional, default: 100
height: 50, // optional, default: 100
text: 'Hello World', // for text layers
fontSize: 24, // for text layers
color: '#333333', // for text layers
fontFamily: 'Arial', // for text layers
page: 'page-1' // optional, defaults to current page
}
}, '*');
// Add an image layer
iframe.contentWindow.postMessage({
type: 'ADD_LAYER',
layer: {
type: 'image',
name: 'hero-image',
src: 'https://example.com/image.jpg',
x: 0,
y: 0,
width: 400,
height: 300
}
}, '*');
// Add a shape layer
iframe.contentWindow.postMessage({
type: 'ADD_LAYER',
layer: {
type: 'shape',
name: 'background-box',
shapeType: 'rect', // 'rect' | 'circle' | 'ellipse' | 'line'
fillColor: 'rgb(200,200,200)',
strokeColor: 'rgb(0,0,0)',
strokeWidth: 2,
x: 50,
y: 50,
width: 300,
height: 200
}
}, '*');
// Remove a layer by name
iframe.contentWindow.postMessage({
type: 'REMOVE_LAYER',
name: 'my-text-layer', // layer name (required)
page: 'page-1' // optional, limits search to specific page
}, '*');
// Show only a specific page (hides all others)
iframe.contentWindow.postMessage({
type: 'SET_PAGE',
pageId: 'page-1' // page name or ID
}, '*');
// Show all pages (restore multi-page view)
iframe.contentWindow.postMessage({ type: 'SHOW_ALL_PAGES' }, '*');
// Get all layers (name and type only)
iframe.contentWindow.postMessage({ type: 'GET_LAYERS' }, '*');
// Get all pages with their layers
iframe.contentWindow.postMessage({ type: 'GET_PAGES' }, '*');

Events the editor sends back

Section titled “Events the editor sends back”
Editor → Parent
window.addEventListener('message', (event) => {
// Optional: verify origin: if (event.origin !== 'https://app.templated.io') return;
const msg = event.data;
switch (msg?.type) {
// Editor lifecycle
case 'EDITOR_READY':
// Editor initialized; safe to send UPDATE_LAYERS / SET_* messages
break;
// Template events
case 'TEMPLATE_LOADED':
// URL-based initial load completed; contains template details
console.log('Loaded via URL:', msg.template);
break;
case 'TEMPLATE_LOADED_SUCCESS':
// Successful LOAD_TEMPLATE postMessage
console.log('Template switched:', msg.templateId);
break;
case 'TEMPLATE_LOAD_ERROR':
console.error('Template load failed:', msg.error);
break;
case 'TEMPLATE_SAVED_SUCCESS':
console.log('Template saved:', msg.templateId);
break;
case 'TEMPLATE_SAVE_ERROR':
console.error('Template save failed:', msg.error);
break;
case 'TEMPLATE_DOWNLOADED_SUCCESS':
// Successful DOWNLOAD postMessage
console.log('Template downloaded:', msg.templateId, msg.format, msg.renderUrl);
break;
case 'TEMPLATE_DOWNLOAD_ERROR':
console.error('Template download failed:', msg.error);
break;
// Layer events
case 'LAYERS_UPDATED':
// Acknowledges UPDATE_LAYERS
break;
case 'LAYER_UPDATE_ERROR':
console.error('Layer update failed:', msg.error);
break;
case 'LAYER_ADDED':
// Layer successfully added
console.log('Layer added:', msg.layerId, msg.layerName);
break;
case 'ADD_LAYER_ERROR':
console.error('Add layer failed:', msg.error);
break;
case 'LAYER_REMOVED':
// Layer successfully removed
console.log('Layer removed:', msg.layerName);
break;
case 'REMOVE_LAYER_ERROR':
console.error('Remove layer failed:', msg.error);
break;
// Page events
case 'PAGE_UPDATED':
// Page visibility changed via SET_PAGE
console.log('Page changed to:', msg.pageId, 'Success:', msg.success);
break;
case 'ALL_PAGES_SHOWN':
// All pages are now visible via SHOW_ALL_PAGES
console.log('All pages are now visible');
break;
// Layer and page data retrieval
case 'LAYERS_DATA':
// Response to GET_LAYERS — flat list of { name, type }
console.log('Layers:', msg.layers);
break;
case 'GET_LAYERS_ERROR':
console.error('Failed to get layers:', msg.error);
break;
case 'PAGES_DATA':
// Response to GET_PAGES — array of { page, layers: [{ name, type }] }
console.log('Pages:', msg.pages);
break;
case 'GET_PAGES_ERROR':
console.error('Failed to get pages:', msg.error);
break;
// Zoom events
case 'ZOOM_UPDATED':
console.log('Zoom now:', msg.zoom); // same 10–100 scale where 50 = 100%
break;
case 'ZOOM_UPDATE_ERROR':
console.error('Zoom update failed:', msg.error);
break;
// Layer capability events
case 'ALLOW_LAYER_MOVE_UPDATED':
console.log('Layer move permission:', msg.allowLayerMove);
break;
case 'ALLOW_LAYER_RESIZE_UPDATED':
console.log('Layer resize permission:', msg.allowLayerResize);
break;
case 'ALLOW_LAYER_UNLOCK_UPDATED':
console.log('Layer unlock permission:', msg.allowLayerUnlock);
break;
case 'ALLOW_LAYER_RENAME_UPDATED':
console.log('Layer rename permission:', msg.allowLayerRename);
break;
case 'ALLOW_TEXT_EDITION_UPDATED':
console.log('Text edition permission:', msg.allowTextEdition);
break;
// Template capability events
case 'ALLOW_RENAME_UPDATED':
console.log('Rename permission:', msg.allowRename);
break;
case 'ALLOW_SAVE_UPDATED':
console.log('Save permission:', msg.allowSave);
break;
case 'ALLOW_DOWNLOAD_UPDATED':
console.log('Download permission:', msg.allowDownload);
break;
case 'ALLOW_RESIZE_UPDATED':
console.log('Resize permission:', msg.allowResize);
break;
case 'ALLOW_CREATE_TEMPLATE_UPDATED':
console.log('Create template permission:', msg.allowCreateTemplate);
break;
// Error events
case 'ALLOW_LAYER_MOVE_UPDATE_ERROR':
case 'ALLOW_LAYER_RESIZE_UPDATE_ERROR':
case 'ALLOW_LAYER_UNLOCK_UPDATE_ERROR':
case 'ALLOW_LAYER_RENAME_UPDATE_ERROR':
case 'ALLOW_TEXT_EDITION_UPDATE_ERROR':
case 'ALLOW_RENAME_UPDATE_ERROR':
case 'ALLOW_SAVE_UPDATE_ERROR':
case 'ALLOW_DOWNLOAD_UPDATE_ERROR':
case 'ALLOW_RESIZE_UPDATE_ERROR':
case 'ALLOW_CREATE_TEMPLATE_UPDATE_ERROR':
case 'ADD_LAYER_ERROR':
case 'REMOVE_LAYER_ERROR':
console.error('Permission update failed:', msg.error);
break;
}
});
Section titled “Recommended template switching strategy”

For best performance and reliable initialization:

  1. Load the first template using the URL (/editor/preview/{templateId}?embed=...) so the editor initializes correctly.
  2. Switch to other templates using the LOAD_TEMPLATE message to avoid iframe reloads and keep caches warm.

Complete example

Section titled “Complete example”
Comprehensive working example
<iframe id="template-embed" width="100%" height="700" frameborder="0"></iframe>
<div>
<button onclick="toggleLayerMove()">Toggle Layer Move</button>
<button onclick="toggleLayerResize()">Toggle Layer Resize</button>
<button onclick="toggleTextEditing()">Toggle Text Editing</button>
<button onclick="updateContent()">Update Content</button>
<button onclick="saveTemplate()">Save Template</button>
</div>
<script>
const iframe = document.getElementById('template-embed');
const CONFIG_ID = 'YOUR_EMBED_CONFIG_ID';
const FIRST_TEMPLATE = 'tpl_ABC123';
let layerMoveEnabled = false;
let layerResizeEnabled = false;
let textEditingEnabled = false;
// 1) Initial URL-based load with multiple flags
const url = new URL(`https://app.templated.io/editor/preview/${FIRST_TEMPLATE}`);
url.searchParams.set('embed', CONFIG_ID);
url.searchParams.set('zoom', '50'); // 50 = 100% scale
url.searchParams.set('allow-layer-move', 'true');
url.searchParams.set('allow-text-edition', 'true');
url.searchParams.set('hide-sidebar', 'true');
url.searchParams.set('clone', 'true'); // Work with a clone
url.searchParams.set('external-id', 'user-demo-session'); // Persistent session
iframe.src = url.toString();
// 2) Listen for editor events
window.addEventListener('message', (event) => {
const msg = event.data;
console.log('Received message:', msg);
switch (msg?.type) {
case 'EDITOR_READY':
console.log('✅ Editor ready for interactions');
// Initialize with some content
updateContent();
break;
case 'TEMPLATE_LOADED':
console.log('📄 Template loaded:', msg.template);
break;
case 'TEMPLATE_SAVED_SUCCESS':
console.log('💾 Template saved successfully:', msg.templateId);
alert('Template saved successfully!');
break;
case 'TEMPLATE_SAVE_ERROR':
console.error('❌ Save failed:', msg.error);
alert('Failed to save template: ' + msg.error);
break;
case 'LAYERS_UPDATED':
console.log('✅ Layers updated successfully');
break;
case 'ALLOW_LAYER_MOVE_UPDATED':
layerMoveEnabled = msg.allowLayerMove;
console.log('🚀 Layer move:', layerMoveEnabled ? 'enabled' : 'disabled');
break;
case 'ALLOW_LAYER_RESIZE_UPDATED':
layerResizeEnabled = msg.allowLayerResize;
console.log('🔄 Layer resize:', layerResizeEnabled ? 'enabled' : 'disabled');
break;
case 'ALLOW_TEXT_EDITION_UPDATED':
textEditingEnabled = msg.allowTextEdition;
console.log('✏️ Text editing:', textEditingEnabled ? 'enabled' : 'disabled');
break;
}
});
// 3) Control functions
function toggleLayerMove() {
layerMoveEnabled = !layerMoveEnabled;
iframe.contentWindow.postMessage({
type: 'SET_ALLOW_LAYER_MOVE',
allowLayerMove: layerMoveEnabled
}, '*');
}
function toggleLayerResize() {
layerResizeEnabled = !layerResizeEnabled;
iframe.contentWindow.postMessage({
type: 'SET_ALLOW_LAYER_RESIZE',
allowLayerResize: layerResizeEnabled
}, '*');
}
function toggleTextEditing() {
textEditingEnabled = !textEditingEnabled;
iframe.contentWindow.postMessage({
type: 'SET_ALLOW_TEXT_EDITION',
allowTextEdition: textEditingEnabled
}, '*');
}
function updateContent() {
iframe.contentWindow.postMessage({
type: 'UPDATE_LAYERS',
data: {
'headline': {
text: 'Updated at ' + new Date().toLocaleTimeString(),
color: '#FF6B35'
},
'description': {
text: 'This content was updated via postMessage API',
color: '#333333'
},
'background': {
fill: '#F0F8FF'
}
}
}, '*');
}
function saveTemplate() {
iframe.contentWindow.postMessage({ type: 'SAVE' }, '*');
}
</script>

See also

Section titled “See also”
# URL Parameters Reference > Complete reference of all URL parameters available for customizing the embedded editor.

This page provides a comprehensive reference of all URL parameters you can use to customize the embedded editor’s behavior and appearance.

Required Parameters

Section titled “Required Parameters”

embed string
Your embed configuration ID from the dashboard. This parameter is required for all embeds.

Basic Embed with Required Parameter
<embed
src="https://app.templated.io/editor?embed=YOUR_EMBED_CONFIG_ID"
width="100%"
height="100%"
/>

Basic Configuration

Section titled “Basic Configuration”

clone boolean
Create a clone instead of editing the original template. Default: false

launch-mode string
Control how the editor launches. Options: 'template-gallery', 'user-templates', 'user-renders', 'blank'

auto-save boolean
Enable automatic saving of the template at regular intervals (every 15 seconds). Default: false

Template and Content

Section titled “Template and Content”

render string
Load a specific render ID for editing (creates a template clone automatically)

folder string
Limit template selection to a specific folder ID

image-url string
URL of an image to load as background or layer

w number
Custom template width in pixels

h number
Custom template height in pixels

layers string
Base64-encoded JSON with initial layer data

metadata string
Base64-encoded JSON with custom metadata for webhooks

Permission Controls

Section titled “Permission Controls”

Template Permissions

Section titled “Template Permissions”

allow-rename boolean
Allow users to rename templates. Default: true

allow-save boolean
Enable the save functionality. Default: true

allow-download boolean
Enable template download. Default: true

allow-resize boolean
Allow users to resize the template dimensions. Default: false

allow-create-template boolean
Enable creating new templates from the editor. Default: true

allow-template-selection boolean
Show a Templates tab in the sidebar that opens a template selection modal, allowing users to browse and switch to a different template. Default: false

allow-video boolean
Enable video controls, including the timeline with play/pause and video settings (autoplay, loop, muted, show controls). Default: false

Layer Permissions

Section titled “Layer Permissions”

allow-layer-move boolean
Allow moving layers around the canvas. Default: false

allow-layer-resize boolean
Enable resizing of individual layers. Default: false

allow-layer-select boolean
Allow selecting layers. Default: false

allow-layer-unlock boolean
Allow users to unlock locked layers. Default: false

allow-layer-rename boolean
Enable renaming of layers. Default: false

allow-text-edition boolean
Allow double-click text editing. Default: false

allow-edit-text-only boolean
When enabled, only text layers are interactive (select, move, resize, edit text).
All other layers (images, shapes, videos, etc.) are locked and cannot be selected or modified.
Useful when you want end users to customize text content without affecting the template’s visual layout. Default: false

UI Customization

Section titled “UI Customization”

hide-sidebar boolean
Hide the left sidebar panel. Default: false

hide-header boolean
Hide the top header bar. Default: false

hide-layers-panel boolean
Hide the layers panel. Default: false

hide-language-toggle boolean
Hide the language switcher. Default: false

language string
Set the default language for the editor. Options: 'en', 'pt', 'es', 'fr', 'zh', 'cs', 'nl', 'de', 'ja'. Default: 'en'

hide-canvas-background boolean
Hide the dotted background pattern behind the canvas. Default: false
The canvas background will be transparent and will have the same color as your parent page background color.

page-layout-mode string
Set the default layout mode for multi-page templates. Options: 'vertical', 'horizontal'. Default: 'vertical'

page string
Show only a specific page by its name or ID. Other pages will be hidden. Useful for displaying a single page from a multi-page template.

hide-tabs string
Comma-separated list of sidebar tab identifiers to hide. Available tabs: text, images, videos, shapes, vectors, uploads, qr-code, barcode, rating.
Example: &hide-tabs=barcode,qr-code,rating will hide the Barcode, QR Code, and Rating tabs.

zoom number (10-100)
Initial zoom level. 50 equals 100% scale. Auto-calculated if not set.

Integration Options

Section titled “Integration Options”

webhook-url string
Override the default webhook URL for this session

external-id string
Session identifier that tags templates, uploads, fonts, and renders. Acts as a persistent session - when the editor is launched again with the same ID, previously uploaded assets and fonts will be available

include-account-templates boolean
When used with external-id, includes both templates matching the external ID and account templates (templates without an external ID) in the initial template selection modal. Default: false

move-to-folder string
Automatically move saved templates to this folder ID

load-uploads boolean
Load user uploads in the assets panel. Default: false

preview-on-download boolean
When enabled, JPG and PNG downloads open a modal showing the rendered image with instructions for the user to press and hold to save it to their device, instead of triggering a file download. Useful for mobile WebViews where direct downloads are blocked or unreliable. Default: false

Usage Examples

Section titled “Usage Examples”

Preview Mode with Layer Controls

Section titled “Preview Mode with Layer Controls”
Preview Mode with Interactive Layers
<embed
src="https://app.templated.io/editor/preview/TEMPLATE_ID?embed=CONFIG_ID
&zoom=60
&allow-layer-move=true
&allow-layer-resize=true
&allow-text-edition=true
&hide-sidebar=true"
width="100%"
height="600"
/>

Clean Canvas without Background Pattern

Section titled “Clean Canvas without Background Pattern”
Editor with Transparent Canvas Background
<embed
src="https://app.templated.io/editor/TEMPLATE_ID?embed=CONFIG_ID
&hide-canvas-background=true
&hide-sidebar=true"
width="100%"
height="600"
/>
Alternative using canvas-background parameter
<embed
src="https://app.templated.io/editor/TEMPLATE_ID?embed=CONFIG_ID
&canvas-background=transparent"
width="100%"
height="600"
/>
Section titled “Template Gallery with Restrictions”
Gallery Mode with Limited Permissions
<embed
src="https://app.templated.io/editor?embed=CONFIG_ID
&launch-mode=gallery
&allow-download=false
&allow-resize=false
&hide-language-toggle=true"
width="100%"
height="700"
/>

Folder-Specific Templates

Section titled “Folder-Specific Templates”
Templates from Specific Folder
<embed
src="https://app.templated.io/editor?embed=CONFIG_ID
&folder=FOLDER_ID
&clone=true
&allow-create-template=false"
width="100%"
height="700"
/>

Custom Dimensions and Image

Section titled “Custom Dimensions and Image”
Custom Template with Background Image
<embed
src="https://app.templated.io/editor?embed=CONFIG_ID
&w=1200
&h=800
&image-url=https://example.com/background.jpg
&zoom=40"
width="100%"
height="700"
/>

Render Editing with Session

Section titled “Render Editing with Session”
Edit Existing Render with User Session
<embed
src="https://app.templated.io/editor?embed=CONFIG_ID
&render=RENDER_ID
&allow-save=true
&move-to-folder=EDITED_RENDERS_FOLDER
&external-id=user-456-editing-session"
width="100%"
height="700"
/>

Single Page from Multi-Page Template

Section titled “Single Page from Multi-Page Template”
Display Only One Page
<embed
src="https://app.templated.io/editor/preview/TEMPLATE_ID?embed=CONFIG_ID
&page=Cover
&hide-sidebar=true
&hide-header=true"
width="100%"
height="600"
/>

Multi-User Environment

Section titled “Multi-User Environment”
Agency Portal with Client Sessions
<!-- Each client gets their own persistent session -->
<embed
src="https://app.templated.io/editor?embed=CONFIG_ID
&folder=CLIENT_TEMPLATES_FOLDER
&external-id=client-acme-corp-2024
&clone=true
&allow-create-template=false"
width="100%"
height="700"
/>

Combined Account and External ID Templates

Section titled “Combined Account and External ID Templates”
Show Both Account Templates and User-Specific Templates
<!-- User sees both shared account templates and their own templates -->
<embed
src="https://app.templated.io/editor?embed=CONFIG_ID
&launch-mode=user-templates
&external-id=user-456
&include-account-templates=true"
width="100%"
height="700"
/>

Mobile-Friendly Download (Press and Hold to Save)

Section titled “Mobile-Friendly Download (Press and Hold to Save)”
Show Image Preview Instead of Downloading
<embed
src="https://app.templated.io/editor/TEMPLATE_ID?embed=CONFIG_ID
&preview-on-download=true"
width="100%"
height="700"
/>

Use this when embedding the editor inside a mobile app’s WebView. After the user clicks Download, the rendered JPG or PNG is shown in a modal so they can press and hold the image to save it to their gallery — bypassing the native download trigger that mobile WebViews often block.

Hiding Specific Sidebar Tabs

Section titled “Hiding Specific Sidebar Tabs”
Editor with Hidden Barcode and Rating Tabs
<embed
src="https://app.templated.io/editor/TEMPLATE_ID?embed=CONFIG_ID
&hide-tabs=barcode,rating"
width="100%"
height="700"
/>
Minimal Editor with Only Text and Images Tabs
<embed
src="https://app.templated.io/editor/TEMPLATE_ID?embed=CONFIG_ID
&hide-tabs=videos,shapes,vectors,uploads,qr-code,barcode,rating"
width="100%"
height="700"
/>

Parameter Combinations

Section titled “Parameter Combinations”

Common Parameter Combinations

Preview Mode for Interactive Demos:

?embed=CONFIG&preview=true&allow-layer-move=true&allow-text-edition=true&zoom=50

Restricted Editor for End Users:

?embed=CONFIG&clone=true&allow-download=false&allow-resize=false&hide-sidebar=true

Agency Client Portal:

?embed=CONFIG&folder=CLIENT_FOLDER&clone=true&allow-create-template=false&external-id=client-acme-corp

Hybrid Template Access (Account + User Templates):

?embed=CONFIG&launch-mode=user-templates&external-id=user-123&include-account-templates=true

Educational Platform:

?embed=CONFIG&launch-mode=gallery&allow-layer-unlock=true&load-uploads=true

Single Page from Multi-Page Template:

?embed=CONFIG&page=Cover&hide-sidebar=true&hide-header=true

Text-Only Editing (Lock Non-Text Layers):

?embed=CONFIG&allow-edit-text-only=true&hide-sidebar=true

Simplified Sidebar (Hide Advanced Tabs):

?embed=CONFIG&hide-tabs=qr-code,barcode,rating

External ID Sessions

Section titled “External ID Sessions”

The external-id parameter creates persistent sessions for your embedded editor instances. This is particularly useful for maintaining user context and asset continuity across multiple editor sessions.

How External ID Works

Section titled “How External ID Works”

When you provide an external-id, the editor:

  1. Tags all created content with this identifier
  2. Persists user uploads and custom fonts for future sessions
  3. Makes tagged entities accessible via the API using the same ID
  4. Maintains session continuity when users return to the editor

What Gets Tagged

Section titled “What Gets Tagged”

All content created during the session is tagged with the external ID:

Templates
Any templates created or saved during the session

Renders
All renders generated from templates in this session

Uploads
Images and assets uploaded by the user

Fonts
Custom fonts added during the session

Usage Examples

Section titled “Usage Examples”
User-Specific Session
<!-- Each user gets their own persistent session -->
<embed
src="https://app.templated.io/editor?embed=CONFIG_ID&external-id=user-123"
width="100%"
height="700"
/>

When user-123 returns to the editor, all their previous uploads and fonts will be available.

API Integration

Section titled “API Integration”

All entities tagged with an external ID can be retrieved via the Templated API:

Fetch Templates by External ID
// Get all templates for a specific external ID
const response = await fetch('https://api.templated.io/v1/templates?external_id=user-123', {
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
});
const templates = await response.json();
Fetch Uploads by External ID
// Get all uploads for a specific external ID
const response = await fetch('https://api.templated.io/v1/uploads?external_id=project-abc-campaign', {
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
});
const uploads = await response.json();

Best Practices

Section titled “Best Practices”

External ID Best Practices

Naming Convention:

Session Management:

API Integration:

Data Encoding

Section titled “Data Encoding”

For parameters that accept JSON data (layers, metadata), you must base64-encode the JSON string:

Encoding Layer Data
const layerData = {
"headline": { text: "Custom Title", color: "#FF0000" },
"description": { text: "Custom description text" }
};
const encodedLayers = btoa(JSON.stringify(layerData));
const embedUrl = `https://app.templated.io/editor/TEMPLATE_ID?embed=CONFIG_ID&layers=${encodedLayers}`;

See Also

Section titled “See Also”
# Webhook Integration > Learn how to receive real-time notifications when users interact with your embedded editor.

Webhooks allow you to receive real-time notifications when users save or download templates in your embedded editor. This enables you to track user activity, sync data, and trigger workflows in your application.

How Webhooks Work

Section titled “How Webhooks Work”

When a user performs an action in the embedded editor, Templated sends a POST request to your webhook URL with details about the action.

  1. User performs action (create, save or download) in the embedded editor

  2. Templated processes the action and captures relevant data

  3. HTTP POST request sent to your configured webhook URL

  4. Your server receives and processes the webhook data

  5. Your application responds with appropriate actions or data storage

Webhook Configuration

Section titled “Webhook Configuration”

Set up your webhook URL in the embed configuration:

  1. Go to your Embed Setup page

  2. Expand Advanced Settings

  3. Enter your webhook URL in the Webhook URL field

  4. Save your configuration

Webhook Events

Section titled “Webhook Events”

Webhooks are triggered for the following actions:

Create Event

Section titled “Create Event”

Triggered when a user creates a new template in the embedded editor.

Create Event Payload
{
"action": "create",
"templateId": "tpl_456def",
"metadata": {
// Custom metadata passed from your application
}
}

Save Event

Section titled “Save Event”

Triggered when a user saves a template in the embedded editor.

Save Event Payload
{
"action": "save",
"templateId": "tpl_456def",
"metadata": {
// Custom metadata passed from your application
}
}

Download Event

Section titled “Download Event”

Triggered when a user downloads a template from the embedded editor.

Download Event Payload
{
"action": "download",
"templateId": "tpl_456def",
"metadata": {
// Custom metadata passed from your application
}
}

Frontend Event Listening

Section titled “Frontend Event Listening”

You can also listen for events directly in the frontend using the postMessage API. This is useful for immediate UI updates or client-side tracking.

Frontend Event Listener
window.addEventListener('message', (event) => {
// Verify origin for security
if (event.origin !== 'https://app.templated.io') {
return;
}
const { action, templateId, metadata } = event.data;
switch (action) {
case 'create':
console.log('Template created:', templateId);
console.log('Metadata:', metadata);
// Update UI, show success message, etc.
break;
case 'save':
console.log('Template saved:', templateId);
console.log('Metadata:', metadata);
// Track analytics, update download count, etc.
break;
case 'download':
console.log('Template downloaded:', templateId);
console.log('Metadata:', metadata);
// Handle cleanup, redirect, etc.
break;
}
});

Frontend vs Backend Events

Frontend Events: Immediate UI updates, client-side tracking, user feedback
Backend Webhooks: Data persistence, server-side processing, integrations with other systems

Use both for a complete integration experience.

How to implement a basic webhook handler in your application?

Section titled “How to implement a basic webhook handler in your application?”
Express Webhook Handler
const express = require('express');
const app = express();
// Middleware to parse JSON
app.use(express.json());
app.post('/api/templated-webhook', (req, res) => {
const { action, templateId, metadata } = req.body;
console.log(`Received ${action} action for template ${templateId}`);
switch (action) {
case 'create':
handleCreateEvent(templateId, metadata);
break;
case 'save':
handleSaveEvent(templateId, metadata);
break;
case 'download':
handleDownloadEvent(templateId, metadata);
break;
default:
console.log('Unknown action type:', action);
}
// Respond with 200 to acknowledge receipt
res.status(200).json({ received: true });
});
function handleCreateEvent(templateId, metadata) {
// Your create logic here
console.log(`Template ${templateId} created`);
if (metadata && Object.keys(metadata).length > 0) {
console.log('Metadata:', metadata);
}
}
function handleSaveEvent(templateId, metadata) {
// Update user's project with new template
// Log activity
// Send notifications
console.log(`Template ${templateId} saved`);
if (metadata && Object.keys(metadata).length > 0) {
console.log('Metadata:', metadata);
}
}
function handleDownloadEvent(templateId, metadata) {
// Track download metrics
// Update user quotas
// Trigger follow-up workflows
console.log(`Template ${templateId} downloaded`);
if (metadata && Object.keys(metadata).length > 0) {
console.log('Metadata:', metadata);
}
}

Troubleshooting common issues

Section titled “Troubleshooting common issues”

Webhook not receiving data

→ Verify your webhook URL is publicly accessible
→ Check that your server responds with 200 status code
→ If you’re passing metadata, ensure you’re parsing JSON correctly

Missing metadata

→ Verify metadata is being passed in the embed URL in the correct format
→ Check that metadata is properly base64 encoded

Timeout errors

→ Ensure your webhook handler responds quickly (< 10 seconds)
→ Consider processing heavy operations asynchronously

# Create a folder > Learn how to create a new folder using the Templated API.

Create a new folder to organize your templates.

Sample Request

Section titled “Sample Request”

Here’s a sample request to create a new folder:

ENDPOINT
POST /v1/folder
REQUEST
fetch('https://api.templated.io/v1/folder', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': Bearer ${API_KEY}
},
body: JSON.stringify({
name: "My New Folder"
})
})

Request Body

Section titled “Request Body”

name string REQUIRED
The name of the folder you want to create.

Response

Section titled “Response”

The API returns a JSON object with the folder details.

{
"id": "fld_123abc",
"name": "My New Folder",
"createdAt": "2024-03-20T10:30:00Z",
"updatedAt": "2024-03-20T10:30:00Z"
}
# Delete a folder > Learn how to delete a folder using the Templated API.

Delete an existing folder and remove folder references from all templates within it.
Templates themselves are not deleted, only their association with the folder.

Sample Request

Section titled “Sample Request”

Here’s a sample request to delete a folder:

ENDPOINT
DELETE /v1/folder/{id}
REQUEST
fetch(`https://api.templated.io/v1/folder/${folderId}`, {
method: 'DELETE',
headers: {
'Authorization': Bearer ${API_KEY}
}
})

Path Parameters

Section titled “Path Parameters”

id string REQUIRED
The unique identifier of the folder you want to delete.

Response

Section titled “Response”

A successful deletion returns an empty response with a 204 status code. When deleting a folder:

# The folder object > Learn the properties of a folder object in the Templated API.

These attributes define the properties of a folder.
The folder object is used to store templates and renders in an organized way.

Attributes

Section titled “Attributes”

id string
The unique UUID for the folder.

name string
The name of the folder.

createdAt string
The timestamp when the folder was created.

updatedAt string
The timestamp when the folder was last updated.

Sample Object

Section titled “Sample Object”

Here’s a sample object of a folder:

{
"id": "3c435c83-6682-4468-939f-6af175caacex",
"name": "Marketing Folder",
"createdAt": "2024-03-20T10:30:00Z",
"updatedAt": "2024-03-20T10:30:00Z"
}
# List all folders > Learn the list all folders of an user using the Templated API.

Lists all folders of an user.
You can filter and customize the results using query parameters.

Query Parameters

Section titled “Query Parameters”
ParameterTypeDefaultDescription
querystring-Filter folders by name
pageinteger0Page number for pagination
limitinteger25Number of results per page

Sample Request

Section titled “Sample Request”

Here’s a sample request to list all user’s folders:

ENDPOINT
GET /v1/folders
fetch(`https://api.templated.io/v1/folders`, {
method: 'GET',
headers: {
'Authorization': `Bearer ${API_KEY}`
},
// Example with all query parameters
params: {
query: 'Folder 1',
page: 0,
limit: 25
}
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));

Response

Section titled “Response”

The API returns an array of JSON objects with the folder details.

[
{
"id": "fld_123abc",
"name": "My Templates",
"templateCount": 12,
"createdAt": "2024-03-20T10:30:00Z",
"updatedAt": "2024-03-20T10:30:00Z"
},
{
"id": "fld_456def",
"name": "Brand Assets",
"templateCount": 5,
"createdAt": "2024-03-19T15:45:00Z",
"updatedAt": "2024-03-20T09:15:00Z"
}
]

Each folder object contains the following properties:

id string
The unique identifier of the folder.

name string
The name of the folder.

templateCount integer
The number of templates in the folder.

createdAt string
The timestamp when the folder was created.

updatedAt string
The timestamp when the folder was last updated.

# Move render to folder > Learn how to move a render to a folder using the Templated API.

Move an existing render into a folder.

Sample Request

Section titled “Sample Request”

Here’s a sample request to move a render to a folder:

ENDPOINT
PUT /v1/folder/{folderId}/render/{renderId}
REQUEST
fetch(`https://api.templated.io/v1/folder/${folderId}/render/${renderId}`, {
method: 'PUT',
headers: {
'Authorization': `Bearer ${API_KEY}`
}
})

Path Parameters

Section titled “Path Parameters”

folderId string REQUIRED
The ID of the folder where you want to move the render.

renderId string REQUIRED
The ID of the render you want to move.

Response

Section titled “Response”

A successful request returns an empty response with a 200 OK status code.

# List folder renders > Learn how to list all renders of a folder using the Templated API.

Lists all renders of a folder.

Parameters

Section titled “Parameters”

folderId string REQUIRED
The folder ID that you want to retrieve the renders from.

page number
The page number for pagination. Defaults to 0.

limit number
The number of renders per page. Defaults to 25.

Sample Request

Section titled “Sample Request”

Here’s a sample request to list all renders of a folder:

ENDPOINT
GET /v1/folder/:folderId/renders
REQUEST
fetch(`https://api.templated.io/v1/folder/${folderId}/renders?page=0&limit=25`, {
method: 'GET',
headers: {
'Authorization': `Bearer ${API_KEY}`
}
})

Response

Section titled “Response”

The API returns an array of JSON objects with the render details.

[
{
"id": "rnd_123abc",
"url": "renders/2024/03/my-render.png",
"status": "completed",
"width": 1080,
"height": 1080,
"folderId": "fld_456def",
"templateId": "tpl_789ghi",
"createdAt": "2024-03-20T10:30:00Z",
"updatedAt": "2024-03-20T10:30:00Z"
}
]
# Move template to folder > Learn how to move a template to a folder using the Templated API.

Move an existing template into a folder.

Sample Request

Section titled “Sample Request”

Here’s a sample request to move a template to a folder:

ENDPOINT
PUT /v1/folder/{folderId}/template/{templateId}
REQUEST
fetch(`https://api.templated.io/v1/folder/${folderId}/template/${templateId}`, {
method: 'PUT',
headers: {
'Authorization': `Bearer ${API_KEY}`
}
})

Path Parameters

Section titled “Path Parameters”

folderId string REQUIRED
The ID of the folder where you want to move the template.

templateId string REQUIRED
The ID of the template you want to move.

Response

Section titled “Response”

A successful request returns an empty response with a 200 OK status code.

# List folder templates > Learn the list all templates of a folder using the Templated API.

Lists all templates of a folder.
You can filter and customize the results using various query parameters.

Parameters

Section titled “Parameters”

id string REQUIRED The folder id that you want to retrieve the templates.

Query Parameters

Section titled “Query Parameters”
ParameterTypeDefaultDescription
querystring-Filter templates by name
pageinteger0Page number for pagination
limitinteger25Number of results per page
widthinteger-Filter templates by width
heightinteger-Filter templates by height
tagsstring-Filter templates by tags
includeLayersbooleanfalseInclude template layers in response

Sample Request

Section titled “Sample Request”

Here’s a sample request to list all templates of a folder:

ENDPOINT
GET /v1/folder/:id/templates
fetch(`https://api.templated.io/v1/folder/${id}/templates`, {
method: 'GET',
headers: {
'Authorization': `Bearer ${API_KEY}`
},
// Example with all query parameters
params: {
query: 'Template Name',
page: 0,
limit: 25,
width: 1920,
height: 1080,
tags: 'tag1,tag2',
includeLayers: true
}
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));

Response

Section titled “Response”

The API returns an array of JSON objects with the template details.

[
{
"id": "tpl_123abc",
"name": "Instagram Post",
"width": 1080,
"height": 1080,
"thumbnail": "https://templated-assets.s3.amazonaws.com/thumbnail-123.png",
"folderId": "fld_456def",
"layersCount": 5,
"createdAt": "2024-03-20T10:30:00Z",
"updatedAt": "2024-03-20T10:30:00Z",
}
]
# Update a folder > Learn how to update a folder using the Templated API.

Update a folder to change its name.

Sample Request

Section titled “Sample Request”

Here’s a sample request to update a folder:

ENDPOINT
PUT /v1/folder/{id}
REQUEST
fetch(`https://api.templated.io/v1/folder/${folderId}`, {
method: 'PUT',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${API_KEY}`
},
body: JSON.stringify({
name: "My Updated Folder"
})
})

Request Body

Section titled “Request Body”

name string REQUIRED
The new name for the folder.

Response

Section titled “Response”

The API returns a JSON object with the updated folder details.

{
"id": "fld_123abc",
"name": "My Updated Folder",
"createdAt": "2024-03-20T10:30:00Z",
"updatedAt": "2024-03-20T10:35:00Z"
}
# Delete fonts > Learn how to delete one or multiple fonts by name using the Templated API.

Delete one or multiple fonts by their names. All fonts with the specified names will be deleted for your account. If you have multiple fonts with the same name, all of them will be deleted.

Sample Request

Section titled “Sample Request”

Here’s a sample request to delete fonts:

ENDPOINT
DELETE /v1/fonts?fonts=FONT_NAME_1&fonts=FONT_NAME_2
// Delete single font
fetch(`https://api.templated.io/v1/fonts?fonts=${encodeURIComponent('My Custom Font')}`, {
method: 'DELETE',
headers: {
'Authorization': `Bearer ${API_KEY}`
}
})
.then(response => response.json())
.then(data => console.log('Response:', data))
.catch(error => console.error('Error:', error));
// Delete multiple fonts
const fontNames = ['My Custom Font', 'Another Font'];
const params = fontNames.map(name => `fonts=${encodeURIComponent(name)}`).join('&');
fetch(`https://api.templated.io/v1/fonts?${params}`, {
method: 'DELETE',
headers: {
'Authorization': `Bearer ${API_KEY}`
}
})
.then(response => response.json())
.then(data => console.log('Response:', data))
.catch(error => console.error('Error:', error));

Response

Section titled “Response”

Success Response

Section titled “Success Response”

A successful deletion will return a 200 OK response with details about the deleted fonts:

{
"deleted": ["font-id-1", "font-id-2", "font-id-3"],
"deleted_by_name": {
"My Custom Font": 2,
"Another Font": 1
},
"message": "Successfully deleted 3 font(s)"
}

The deleted_by_name object shows how many fonts were deleted for each font name. This is useful when you have multiple fonts with the same name.

Error Responses

Section titled “Error Responses”
Status CodeDescriptionResponse Body
400Bad Request - Font name(s) not found{"not_found": ["Font Name"], "error": "Cannot delete fonts: no fonts found with the specified name(s) for this user"}
400Bad Request - No font names provided{"error": "At least one font name must be provided"}
401Not authorized - Invalid or missing API key{"error": "Not authorized"}
404Not Found - User not found{"error": "User not found"}
500Internal Server Error - An unexpected error occurred{"error": "An unexpected error occurred"}

Important Notes

Section titled “Important Notes”

Query Parameters

Section titled “Query Parameters”
ParameterTypeRequiredDescription
fontsstring[]YesOne or more font names to delete. Pass multiple fonts parameters for bulk deletion. All fonts with matching names will be deleted.
# List gallery fonts > Retrieve all base fonts available in the Templated editor using the API.

Lists all base fonts available in the Templated editor.
Unlike /v1/fonts, this endpoint does not include team-uploaded fonts — it only returns the fonts built into the editor.

Query Parameters

Section titled “Query Parameters”
ParameterTypeDefaultDescription
querystring-Filter fonts by name (case-insensitive)
pageinteger0Page number for pagination
limitinteger50Number of results per page

Response

Section titled “Response”

Returns an array of font objects. Each object includes the following field:

FieldTypeDescription
namestringThe font name (use directly as a CSS font-family value)

Sample Request

Section titled “Sample Request”
ENDPOINT
GET /v1/fonts/gallery
fetch('https://api.templated.io/v1/fonts/gallery', {
method: 'GET',
headers: {
'Authorization': `Bearer ${API_KEY}`
}
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));

Sample Response

Section titled “Sample Response”
[
{ "name": "ABeeZee" },
{ "name": "Abel" },
{ "name": "Bai Jamjuree" },
{ "name": "Dancing Script" },
{ "name": "IBM Plex Sans" },
{ "name": "JetBrains Mono" },
{ "name": "Poppins" },
{ "name": "proxima-nova" },
{ "name": "Raleway" },
{ "name": "Ubuntu" }
]

Filtering Examples

Section titled “Filtering Examples”

Search by Name

Section titled “Search by Name”
fetch('https://api.templated.io/v1/fonts/gallery?query=noto', {
method: 'GET',
headers: {
'Authorization': `Bearer ${API_KEY}`
}
})

Available Fonts

Section titled “Available Fonts”

Below is the complete list of fonts available in the gallery.

FontFontFont
ABeeZeeIM Fell DW PicaQuando
AbelJacques FrancoisQuantico
Abhaya LibreJacques Francois ShadowQuattrocento
Abril FatfaceJaldiQuattrocento Sans
AclonicaJetBrains MonoQuestrial
Agenda-BoldJim NightshadeRacing Sans One
Bad ScriptK2DRadley
BahianaKadwaRajdhani
BahianitaKalamRakkas
Bai JamjureeKameronRaleway
Baloo 2KanitSacramento
CabinLacquerSahitya
Cabin CondensedLailaSail
Cabin SketchLakki ReddySaira
Caesar DressingLalezarSaira Condensed
CagliostroLancelotTajawal
Co Headline Corp RegularLexendTangerine
DamionM PLUS 1pTaprom
Dancing ScriptM PLUS Rounded 1cTauri
DangrekMa Shan ZhengTaviraj
Darker GrotesqueMacondoUbuntu
David LibreMacondo Swash CapsUbuntu Condensed
Eagle LakeNanum Brush ScriptUbuntu Mono
East Sea DokdoNanum GothicUltra
EconomicaNanum Gothic CodingUncial Antiqua
EczarNanum MyeongjoVampiro One
El MessiriNanum Pen ScriptVarela
Fanwood TextNoto Color EmojiVarela Round
FarroNoto SansVarta
FascinateNoto Sans ArabicVast Shadow
Fascinate InlineNoto Sans BengaliWalter Turncoat
Faster OneNoto Sans GurmukhiWarnes
GabrielaNoto Sans JPWellfleet
GaeguNoto Sans KRWendy One
GafataNoto Sans ThaiWire One
GeistOdibee SansXanh Mono
GFS DidotOdor Mean CheyYanone Kaffeesatz
GFS NeohellenicOffsideYantramanav
HabibiOld Standard TTYatra One
Hachi Maru PopOldenburgYellowtail
HalantPadaukYeon Sung
Hammersmith OnePalanquinZCOOL KuaiLe
IBM Plex MonoPalanquin DarkZCOOL QingKe HuangYou
IBM Plex SansPangolinZCOOL XiaoWei
IBM Plex Sans ArabicPaprikaZeyada
IBM Plex Sans CondensedPoppinsZilla Slab
IBM Plex Serifproxima-nova
# The font object > Learn the properties of a font object in the Templated API.

These attributes define the properties of a font object.
The font object represents both Google Fonts and user-uploaded custom fonts.

Attributes

Section titled “Attributes”

name string
The name of the font.

isGoogleFont boolean
Indicates if the font is from Google Fonts.

isUploadedFont boolean
Indicates if the font is a user-uploaded custom font.

Sample Objects

Section titled “Sample Objects”

Here’s a sample object of a Google Font:

{
"name": "Roboto",
"isGoogleFont": true,
"isUploadedFont": false,
}
# List all fonts > Learn how to retrieve both Google Fonts and user-uploaded fonts using the Templated API.

Lists all available fonts, including both Google Fonts and user-uploaded custom fonts.

Sample Request

Section titled “Sample Request”

Here’s a sample request to list all available fonts:

ENDPOINT
GET /v1/fonts
REQUEST
fetch('https://api.templated.io/v1/fonts', {
method: 'GET',
headers: {
'Authorization': `Bearer ${API_KEY}`
}
})

Response

Section titled “Response”

The response will be an array of font objects. Each object will follow either the Google Font or user-uploaded font structure.

[
{
"name": "Roboto",
"isGoogleFont": true,
"isUploadedFont": false,
},
{
"name": "My Custom Font",
"isGoogleFont": false,
"isUploadedFont": true,
}
// ... more fonts
]
# Upload a font > Learn to upload custom fonts using the Templated API.

Upload a custom font to your account for use in your templates.

Requirements

Section titled “Requirements”

Note

Custom font uploads are only available for paid plans.

Sample Request

Section titled “Sample Request”

Here’s a sample request to upload a font:

ENDPOINT
POST /v1/font
Content-Type: multipart/form-data
// Create form data
const fileInput = document.getElementById('fontFileInput');
const formData = new FormData();
formData.append('file', fileInput.files[0]);
fetch('https://api.templated.io/v1/font', {
method: 'POST',
body: formData,
headers: {
'Authorization' : `Bearer ${API_KEY}`
}
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error uploading font:', error));
# Templated API Documentation > The documentation of the Templated API for automating the generation of images, videos, and PDFs.

With the Templated API you can automate the generation of images, videos, and PDFs.
This guide will help you get started integrating with our simple API.

Getting Started

Section titled “Getting Started”
  1. Sign up for an account.

  2. Create your template in our editor, import from Canva or select one from our Template Gallery.

  3. Get your API key in your dashboard in the API Key tab.

  4. Make a call to generate a render (image, video, or PDF).

    SAMPLE REQUEST
    fetch('https://api.templated.io/v1/render', {
    method: 'POST',
    body: JSON.stringify({
    template: TEMPLATE_ID,
    layers: {
    'text-1': {
    text: 'This is my text to be rendered',
    color: '#FF0000',
    background: '#0000FF',
    },
    'image-1': {
    image_url: 'https://picsum.photos/200/300.jpg',
    },
    },
    }),
    headers: {
    'Content-Type': 'application/json',
    'Authorization' : `Bearer ${API_KEY}`
    },
    });
  5. Integrate our API to your workflow.
    Check the Create a render endpoint documentation for more details.

Try it in Postman

Section titled “Try it in Postman”

Want to explore our API quickly? Check out our complete API collection in Postman where you can test all endpoints, see request examples, and get started faster.

Run in Postman
# MCP Examples > Real-world examples and use cases for the Templated MCP integration.

This page provides practical examples of how to use the Templated MCP server with your AI assistant.

Basic Examples

Section titled “Basic Examples”

List Your Templates

Section titled “List Your Templates”

Start by exploring what templates you have available:

Prompt:

“Show me all my Templated templates”

The AI will call list_templates and display your templates with their IDs, names, and dimensions.

Create a Simple Render

Section titled “Create a Simple Render”

Generate an image from an existing template:

Prompt:

“Create a render from template [ID] with the title set to ‘Welcome to Our Store’”

Replace [ID] with your actual template ID.

View Template Layers

Section titled “View Template Layers”

Before customizing a template, see what layers are available:

Prompt:

“What layers does template [ID] have?”

Customization Examples

Section titled “Customization Examples”

Change Multiple Layers

Section titled “Change Multiple Layers”

Customize several layers in a single render:

Prompt:

“Create a render from template [ID] with these changes:

Create Transparent PNG

Section titled “Create Transparent PNG”

Generate an image with a transparent background:

Prompt:

“Generate a transparent PNG from my logo template”

Generate a PDF

Section titled “Generate a PDF”

Create a PDF document:

Prompt:

“Create a PDF from template [ID] with the name ‘Invoice-001’ and set the customer name to ‘John Smith‘“

Template Creation Examples

Section titled “Template Creation Examples”

Create a Simple Template

Section titled “Create a Simple Template”

Build a new template from scratch:

Prompt:

“Create a new template called ‘Instagram Post’ with dimensions 1080x1080, a white background, and a centered text layer for the headline”

Create a Multi-Layer Template

Section titled “Create a Multi-Layer Template”

Build a more complex template:

Prompt:

“Create a template for a product announcement with:

Clone and Modify

Section titled “Clone and Modify”

Create variations of existing templates:

Prompt:

“Clone my Instagram template, rename it to ‘Twitter Post’, and change the dimensions to 1200x675”

Batch Operations

Section titled “Batch Operations”

Multiple Renders

Section titled “Multiple Renders”

Generate several variations:

Prompt:

“Create 3 renders from template [ID]:

  1. Title: ‘Spring Collection’ with green background
  2. Title: ‘Summer Vibes’ with yellow background
  3. Title: ‘Fall Fashion’ with orange background”

Merge into PDF

Section titled “Merge into PDF”

Combine multiple renders:

Prompt:

“Merge my last 5 renders into a single PDF called ‘Product Catalog‘“

Asset Management

Section titled “Asset Management”

Upload an Image

Section titled “Upload an Image”

Add an image to your library:

Prompt:

“Upload this image to Templated: logo.png”

Organize with Folders

Section titled “Organize with Folders”

Create organization structure:

Prompt:

“Create a folder called ‘Q1 Marketing’ and move my Instagram and Facebook templates into it”

Upload Custom Font

Section titled “Upload Custom Font”

Add a custom font:

Prompt:

“Upload this font file: https://example.com/fonts/MyBrandFont.ttf

Video Rendering

Section titled “Video Rendering”

Create a Video

Section titled “Create a Video”

Generate an MP4 video:

Prompt:

“Create a 10-second video from my animated template at 30fps”

Account Information

Section titled “Account Information”

Check Usage

Section titled “Check Usage”

Monitor your API usage:

Prompt:

“Show my Templated account info and how many credits I have left”

Real-World Workflows

Section titled “Real-World Workflows”

Social Media Manager

Section titled “Social Media Manager”

E-commerce Product Images

Section titled “E-commerce Product Images”

Certificate Generation

Section titled “Certificate Generation”

Tips for Better Results

Section titled “Tips for Better Results”

Be Specific

Include exact values for colors (hex codes), dimensions (pixels), and text content.

Reference Layers by Name

Use get_template_layers first to see layer names, then reference them accurately.

Chain Operations

You can ask for multiple operations in one prompt—the AI will execute them in sequence.

Use Template IDs

Keep your template IDs handy. The AI can look them up, but providing them is faster.

# MCP Integration > Use Templated directly from AI assistants like Claude, Cursor, and ChatGPT using the Model Context Protocol.

Overview

Section titled “Overview”

The Templated MCP server enables you to:

Instead of writing code or using the dashboard, simply tell your AI assistant what you want:

“Create a render from my Instagram template with the title set to ‘Summer Sale’ and change the background to blue”

Build Apps with AI Coding Tools

Section titled “Build Apps with AI Coding Tools”

The Templated MCP works with AI-powered app builders and coding assistants. Simply prompt these tools to use Templated for image generation, and they’ll integrate it into your app automatically.

LovableLovableReplitReplitv0v0 by VercelBase44Base44

Example prompt for AI app builders:

“Build me a social media post generator app that uses Templated MCP to create images. Users should be able to enter a headline and select a template, then generate and download the image. See the Templated MCP documentation at https://templated.io/docs/integrations/mcp/ for setup instructions.”

These AI tools can automatically set up the MCP connection, create the UI, and handle the image generation workflow—all from a simple prompt.

Connection Modes

Section titled “Connection Modes”

The Templated MCP server supports two connection modes:

Remote Server (Recommended)

Connect directly to our hosted MCP server at mcp.templated.io. No installation required—just add the URL to your AI assistant’s configuration.

Best for: ChatGPT, Cursor, quick setup

Local Server

Run the MCP server locally using npx. The server runs on your machine and connects to our API.

Best for: Claude Desktop, offline development

Quick Start

Section titled “Quick Start”

Add this configuration to your AI assistant:

{
"mcpServers": {
"templated": {
"url": "https://mcp.templated.io/mcp?apiKey=YOUR_API_KEY"
}
}
}

Replace YOUR_API_KEY with your API key.

Supported AI Assistants

Section titled “Supported AI Assistants”
AssistantRemote ServerLocal Server
Claude Desktop
Cursor
ChatGPT
Claude.ai (web)

What You Can Do

Section titled “What You Can Do”

Generate Content

Section titled “Generate Content”

Manage Templates

Section titled “Manage Templates”

Organize Assets

Section titled “Organize Assets”

Multi-Tenant Access

Section titled “Multi-Tenant Access”

Learn more about scoping access →

Example Prompts

Section titled “Example Prompts”

Try these prompts with your AI assistant:

“List all my Templated templates"

"Create a render from template [ID] with the headline ‘New Product Launch’"

"Generate a transparent PNG from my logo template"

"Create a new template called ‘Social Post’ with dimensions 1080x1080"

"Clone my Instagram template and rename it to ‘TikTok Post’"

"Show my API usage and account information”

Resources

Section titled “Resources”

Setup Guide

Step-by-step instructions for each AI assistant.

View Setup Guide →

Available Tools

Complete reference of all 25+ MCP tools.

View Tools Reference →

GitHub Repository

Source code, issues, and contributions.

View on GitHub →

npm Package

Install the local server via npm.

View on npm →
# MCP Setup Guide > Step-by-step instructions to set up the Templated MCP server with Claude Desktop, Cursor, ChatGPT, and other AI assistants.

This guide walks you through setting up the Templated MCP server with different AI assistants.

Prerequisites

Section titled “Prerequisites”

Before you begin, make sure you have:

  1. A Templated account — Sign up for free
  2. Your API key — Find it in your dashboard

For local server mode, you’ll also need:

Claude Desktop

Section titled “Claude Desktop”

Claude Desktop supports both remote and local MCP servers.

Section titled “Option 1: Local Server (Recommended for Claude Desktop)”
  1. Locate your config file

    The Claude Desktop configuration file is located at:

  2. Edit the configuration

    Open the file and add the Templated MCP server:

    claude_desktop_config.json
    {
    "mcpServers": {
    "templated": {
    "command": "npx",
    "args": ["mcp-server-templated"],
    "env": {
    "TEMPLATED_API_KEY": "YOUR_API_KEY"
    }
    }
    }
    }

    Replace YOUR_API_KEY with your actual API key.

  3. Restart Claude Desktop

    Completely quit and reopen Claude Desktop for the changes to take effect.

  4. Verify the connection

    Look for a tools icon (hammer) in the chat input area. Click it to see available Templated tools.

Option 2: Remote Server

Section titled “Option 2: Remote Server”
  1. Locate your config file

    Same location as above.

  2. Edit the configuration

    claude_desktop_config.json
    {
    "mcpServers": {
    "templated": {
    "url": "https://mcp.templated.io/mcp?apiKey=YOUR_API_KEY"
    }
    }
    }
  3. Restart Claude Desktop

    Completely quit and reopen Claude Desktop.

Cursor IDE

Section titled “Cursor IDE”

Cursor supports MCP servers through its configuration file.

Section titled “Remote Server (Recommended)”
  1. Locate your config file

    The Cursor MCP configuration file is located at:

  2. Create or edit the configuration

    mcp.json
    {
    "mcpServers": {
    "templated": {
    "url": "https://mcp.templated.io/mcp?apiKey=YOUR_API_KEY"
    }
    }
    }
  3. Restart Cursor

    Close and reopen Cursor for the changes to take effect.

  4. Start using Templated

    In the Composer or Chat panel, you can now ask Cursor to use Templated tools.

Local Server

Section titled “Local Server”
  1. Locate your config file

    Same location as above.

  2. Edit the configuration

    mcp.json
    {
    "mcpServers": {
    "templated": {
    "command": "npx",
    "args": ["mcp-server-templated"],
    "env": {
    "TEMPLATED_API_KEY": "YOUR_API_KEY"
    }
    }
    }
    }
  3. Restart Cursor

ChatGPT

Section titled “ChatGPT”

ChatGPT supports MCP servers through Connected Apps in the settings.

  1. Open ChatGPT Settings

    Go to SettingsConnected AppsAdd MCP Server

  2. Enter the server URL

    https://mcp.templated.io/mcp?apiKey=YOUR_API_KEY

    Replace YOUR_API_KEY with your actual API key.

  3. Set authentication to “No Auth”

    Since the API key is included in the URL, select “No Auth” for authentication type.

  4. Click Create

    ChatGPT will verify the connection and add Templated to your connected apps.

  5. Start using Templated

    In any conversation, you can now ask ChatGPT to use Templated tools to generate images, manage templates, and more.

Claude.ai (Web)

Section titled “Claude.ai (Web)”

Claude.ai web interface also supports MCP servers.

  1. Go to Settings

    Click on your profile icon and navigate to SettingsDeveloperMCP Servers

  2. Add a new server

    Click Add Server and enter:

  3. Save and start chatting

    The Templated tools will now be available in your conversations.

Scoping Access

Section titled “Scoping Access”

When building multi-tenant applications (e.g. a chat interface where each customer edits their own templates), you can scope the MCP server so that each session only has access to a specific subset of resources. This is enforced at the server level, making it immune to prompt injection.

You can scope by folder ID, external ID, or both.

External ID Scoping

Section titled “External ID Scoping”

If you already use externalId to link templates to your own customers (e.g. via the Embedded Editor), you can use the same identifier to scope MCP access.

When set, the MCP server will:

Add the externalId query parameter to the URL:

https://mcp.templated.io/mcp?apiKey=YOUR_API_KEY&externalId=CUSTOMER_123

Folder ID Scoping

Section titled “Folder ID Scoping”

You can also restrict access to a specific folder. When set, the MCP server will:

Add the folderId query parameter to the URL:

https://mcp.templated.io/mcp?apiKey=YOUR_API_KEY&folderId=FOLDER_ID

Combining Both

Section titled “Combining Both”

You can use both scoping parameters together for stricter isolation. For example, to restrict access to a specific folder AND external ID:

https://mcp.templated.io/mcp?apiKey=YOUR_API_KEY&folderId=FOLDER_ID&externalId=CUSTOMER_123

Troubleshooting

Section titled “Troubleshooting”

Server not connecting

Section titled “Server not connecting”

Tools not appearing

Section titled “Tools not appearing”

If the tools don’t appear after configuration:

  1. Completely restart the AI assistant (not just close the window)
  2. Check the config file location — it must be in the exact path specified
  3. Verify JSON syntax — use a JSON validator to check for errors
  4. Check for existing configs — you may need to merge with existing mcpServers

Local server errors

Section titled “Local server errors”

If using local server mode:

Terminal window
# Verify Node.js version
node --version # Should be 18.0.0 or higher
# Test the MCP server directly
TEMPLATED_API_KEY=your_key npx mcp-server-templated

Getting help

Section titled “Getting help”

If you’re still having issues:

# MCP Tools Reference > Complete reference of all available tools in the Templated MCP server.

The Templated MCP server provides 25+ tools that cover the full Templated API. This page documents all available tools and their parameters.

Render Tools

Section titled “Render Tools”

Tools for creating and managing renders (generated images, videos, and PDFs).

create_render

Section titled “create_render”

Creates a new render from a template.

ParameterTypeRequiredDescription
templatestringTemplate ID to render
layersobjectLayer modifications (key: layer name, value: properties). Supports animation object for video renders.
formatstringOutput format: jpg, png, webp, pdf, mp4 (default: jpg)
transparentbooleanMake background transparent (PNG only)
widthnumberCustom width in pixels
heightnumberCustom height in pixels
namestringCustom name for the render
webhook_urlstringURL to POST render result to
durationnumberVideo duration in milliseconds (MP4 only, max 90000)
fpsnumberFrames per second (MP4 only, 1-60)

Example prompt:

“Create a render from template abc123 with the title layer set to ‘Hello World’ and format as PNG”

get_render

Section titled “get_render”

Retrieves details of a specific render.

ParameterTypeRequiredDescription
idstringRender ID

list_renders

Section titled “list_renders”

Lists all renders, optionally filtered.

ParameterTypeRequiredDescription
limitnumberMaximum number to return (default: 20)
templateIdstringFilter by template ID
folderIdstringFilter by folder ID

delete_render

Section titled “delete_render”

Deletes a render.

ParameterTypeRequiredDescription
idstringRender ID to delete

merge_renders

Section titled “merge_renders”

Merges multiple renders into a single PDF.

ParameterTypeRequiredDescription
renderIdsarrayArray of render IDs to merge
namestringName for the merged PDF

Template Tools

Section titled “Template Tools”

Tools for managing templates.

list_templates

Section titled “list_templates”

Lists all templates in your account.

ParameterTypeRequiredDescription
limitnumberMaximum number to return (default: 20)
folderIdstringFilter by folder ID
tagsarrayFilter by tags

get_template

Section titled “get_template”

Retrieves details of a specific template.

ParameterTypeRequiredDescription
idstringTemplate ID

get_template_layers

Section titled “get_template_layers”

Gets all layers in a template with their properties.

ParameterTypeRequiredDescription
idstringTemplate ID

Example prompt:

“Show me all the layers in template abc123”

get_template_pages

Section titled “get_template_pages”

Gets all pages in a multi-page template.

ParameterTypeRequiredDescription
idstringTemplate ID

create_template

Section titled “create_template”

Creates a new template programmatically.

ParameterTypeRequiredDescription
namestringTemplate name
widthnumberWidth in pixels
heightnumberHeight in pixels
backgroundstringBackground color (hex)
durationnumberDefault video duration in milliseconds (MP4 renders)
layersarrayArray of layer objects
folderIdstringFolder to create template in

Layer object properties:

PropertyTypeDescription
layerstringUnique layer name (required)
typestringLayer type: text, image, shape (required)
xnumberX position
ynumberY position
widthnumberLayer width
heightnumberLayer height
textstringText content (for text layers)
colorstringText color (hex)
font_familystringFont family name
font_sizestringFont size (e.g., “24px”)
image_urlstringImage URL (for image layers)
backgroundstringBackground color (hex)
border_radiusstringBorder radius (e.g., “10px”)
animationobjectAnimation config for video renders (see below)

Animation object properties (MP4 only):

PropertyTypeDescription
inobjectEntrance animation: type (slide, fade, zoom, rotate), direction, duration (ms), writingStyle
loopobjectLooping animation: type (spin, pulse), duration (ms)
outobjectExit animation: type (slide, fade, zoom), direction, duration (ms)
startintegerTime in milliseconds when layer becomes visible (default: 0)
endintegerTime in milliseconds when layer disappears (default: video duration)

Example prompt:

“Create a new template called ‘Social Post’ that’s 1080x1080 with a blue background and a white text layer for the title”

update_template

Section titled “update_template”

Updates an existing template.

ParameterTypeRequiredDescription
idstringTemplate ID
namestringNew template name
widthnumberNew width
heightnumberNew height
backgroundstringNew background color
durationnumberDefault video duration in milliseconds
layersarrayUpdated layers

clone_template

Section titled “clone_template”

Creates a copy of a template.

ParameterTypeRequiredDescription
idstringTemplate ID to clone
namestringName for the cloned template

Example prompt:

“Clone my Instagram template and name it ‘TikTok Version‘“

delete_template

Section titled “delete_template”

Deletes a template.

ParameterTypeRequiredDescription
idstringTemplate ID to delete

list_template_renders

Section titled “list_template_renders”

Lists all renders created from a specific template.

ParameterTypeRequiredDescription
idstringTemplate ID
limitnumberMaximum number to return

Folder Tools

Section titled “Folder Tools”

Tools for organizing templates and renders into folders.

list_folders

Section titled “list_folders”

Lists all folders.

ParameterTypeRequiredDescription
limitnumberMaximum number to return

create_folder

Section titled “create_folder”

Creates a new folder.

ParameterTypeRequiredDescription
namestringFolder name
colorstringFolder color (hex)

update_folder

Section titled “update_folder”

Updates a folder’s name or color.

ParameterTypeRequiredDescription
idstringFolder ID
namestringNew folder name
colorstringNew folder color

delete_folder

Section titled “delete_folder”

Deletes a folder.

ParameterTypeRequiredDescription
idstringFolder ID to delete

Upload Tools

Section titled “Upload Tools”

Tools for managing uploaded images.

list_uploads

Section titled “list_uploads”

Lists all uploaded images.

ParameterTypeRequiredDescription
limitnumberMaximum number to return

create_upload

Section titled “create_upload”

Uploads an image from a URL.

ParameterTypeRequiredDescription
urlstringURL of the image to upload
namestringName for the upload

Example prompt:

“Upload this image logo.png to my Templated account”

delete_upload

Section titled “delete_upload”

Deletes an uploaded image.

ParameterTypeRequiredDescription
idstringUpload ID to delete

Font Tools

Section titled “Font Tools”

Tools for managing custom fonts.

list_fonts

Section titled “list_fonts”

Lists all uploaded custom fonts.

ParameterTypeRequiredDescription
limitnumberMaximum number to return

upload_font

Section titled “upload_font”

Uploads a custom font from a URL.

ParameterTypeRequiredDescription
urlstringURL of the font file (.ttf, .otf, .woff, .woff2)
namestringName for the font

delete_font

Section titled “delete_font”

Deletes a custom font.

ParameterTypeRequiredDescription
idstringFont ID to delete

Account Tools

Section titled “Account Tools”

get_account

Section titled “get_account”

Retrieves account information including usage statistics.

No parameters required.

Returns:

Example prompt:

“Show me my Templated account information and usage”

Tool Categories Summary

Section titled “Tool Categories Summary”
CategoryToolsDescription
Renders5Create, view, list, delete, and merge renders
Templates9Full template lifecycle management
Folders4Organize content into folders
Uploads3Manage uploaded images
Fonts3Manage custom fonts
Account1View account information
# Create a render > Learn to create a render (image, PDF, or video) using the Templated API.

This is the endpoint to create a render.

It responds with 200 OK and returns the render data including the render URL.
By default, renders are generated synchronously and take around 2 seconds to complete (videos may take longer depending on duration and complexity).

Once generated, the image/PDF/video file is immediately available at the returned URL.

Sample Request

Section titled “Sample Request”

Here’s a sample request to create a render:

ENDPOINT
POST /v1/render;
fetch('https://api.templated.io/v1/render', {
method: 'POST',
body: JSON.stringify(
{
"template" : TEMPLATE_ID,
"layers" : {
"text-1" : {
"text" : "This is my text to be rendered",
"color" : "#FF0000",
"background" : "#0000FF"
},
"image-1": {
"image_url" : "https://picsum.photos/200/300.jpg"
}
}
}
),
headers: {
'Content-Type' : 'application/json',
'Authorization' : `Bearer ${API_KEY}`
}
})

Parameters

Section titled “Parameters”

template string REQUIRED
The template id that you want to render.

templates array
This is only used for batch rendering from a list of templates.
If it’s provided, the template parameter will be ignored and will not be required.
Example: "templates": ["template-id-1", "template-id-2"]

format string
Render format (jpg, png, webp, pdf, or mp4). Default is jpg.

transparent boolean
Make the background transparent when the render format is png. Default is false.

duration number
Duration of the video in milliseconds when the render format is mp4.
Maximum is 90000 (90 seconds). Default is 5000 (5 seconds).

fps number
Frames per second when the render format is mp4.
Minimum is 1. Maximum is 60. Default is 30.

flatten boolean
Flatten the PDF when the render format is pdf.
This is recommended for print-ready documents. Default is false.

cmyk boolean
Use CMYK color mode when the render format is pdf.
This is recommended for print-ready documents. Default is false.

name string
A custom name for the render.

background string
Background color in hex format e.g. “#FF0000”.

width number
A custom width for the render in pixels (minimum 100, maximum 5000).

height number
A custom height for the render in pixels (minimum 100, maximum 5000).

scale number
Scale factor to resize the final render (minimum 0.1, maximum 2.0).
For example, 0.5 will render at 50% size, 2.0 will render at 200% size. Default is 1.0.

external_id string
An external identifier to associate the render with a specific user or entity in your system.

async boolean
If set to false, the render will be created synchronously. Default is false.

webhook_url string
A url to POST the full Render object to upon rendering completed.

merge boolean
When set to true and multiple renders are generated (multi-page templates), automatically merge all renders into a single PDF. Default is false.

pages array
For multi-page templates, use this to specify different layer modifications for each page.
Each object in the array should have a page (page identifier) and layers (layer modifications for that page).
You can optionally include width and height to override the dimensions of individual pages.
When using pages, the layers parameter is ignored.

layers object
An object of layers that will be updated in the template.
The object key is the layer name and the value is an object with the layer properties to override.
Use this for single-page templates or to apply the same changes to all pages in multi-page templates.

These are the parameters that can be used to override the template layers attributes.

text string
Replacement text you want to use.
If the layer is a QR Code or a Barcode this will be the value used.

image_url string
Replacement image src for an image layer.

color string
Color in hex format e.g. “#FF0000”.

color_2 string
Secondary color in hex format. It will be applied to text surrounded by * in the text layer.

background string
Background color in hex format e.g. “#FF0000”.

font_family string
Change the font family.

font_family_2 string
Secondary font family. It will be applied to text surrounded by * in the text layer.

font_size string
Change the font size. Use a CSS value like (“24px” or “12pt”)

font_weight string
Change the font weight (normal, bold, 100, 200, 300, 400, 500, 600, 700, 800, 900).

letter_spacing string
Change the letter spacing of the text. Accepts CSS values like “2.5px”, “0.5em”, or “-1px”. Can be negative.

line_height string
Change the line height of the text. Accepts CSS values like “1.5” (unitless multiplier), “24px”, or “2em”.

text_stroke_width double
Width of the text stroke (outline) in pixels. Use this to add an outline to your text.

text_stroke_color string
Color of the text stroke (outline) in hex format e.g. “#000000”.

text_highlight_color string
Background color of the text highlight in hex format e.g. “#FFFF00”.
Only applies to text layers that have text highlight enabled.

padding_x integer
Horizontal padding in pixels.

padding_y integer
Vertical padding in pixels.

horizontal_align string
Change the horizontal alignment of the text (left, center, right).

vertical_align string
Change the vertical alignment of the text (top, center, bottom).

autofit string
Set to “width” or “height” to automatically fit the layer to the width or height of the box defined in the Editor.

border_width integer
Width of the object border.

border_color string
Border color in hex format e.g. “#FF0000”.

border_radius string
Border radius in px or percentage (e.g. “10px” or “10%”).

border_style string
Border style for shapes and lines (solid, dashed, dotted). Default is “solid”.

dash_length double
Custom dash/dot length for dashed or dotted border styles. If not provided, defaults are calculated based on stroke width.

dash_gap double
Custom gap length between dashes or dots for dashed or dotted border styles. If not provided, defaults are calculated based on stroke width.

fill string
Fill color for shapes and uploaded SVG components.
Supports hex colors (e.g. “#FF0000”) and CSS linear gradients (e.g. “linear-gradient(90deg, #FF0000 0%, #0000FF 100%)”).

stroke string
Stroke (border) color for shapes and uploaded SVG components in hex format e.g. “#FF0000”.

preserve_ratio boolean
Set to false to allow free scaling of SVG shapes and vectors without preserving the aspect ratio.
When false, the SVG content will stretch to fill the layer dimensions. Default is true.

hide boolean
Set to true to hide the layer.

opacity double
Set the opacity of the layer. Value should be between 0 (fully transparent) and 1 (fully visible).

link string
Add a link to the layer. It must start with http:// or https://.
Links will only work on PDF renders.

x integer
Horizontal position of the layer (top left corner).

y integer
Vertical position of the layer (top left corner).

rotation integer
Rotation of the layer in degrees.

width integer
Width of the layer.

height integer
Height of the layer.

flip_x boolean
Flip the layer horizontally. Set to true to mirror the layer along the Y-axis.

flip_y boolean
Flip the layer vertically. Set to true to mirror the layer along the X-axis.

object_fit string
Change the object fit of an image (cover, contain, fill, none).

object_position string
Change the alignment of an image within its container when using object_fit: "cover" or "contain".
Accepts CSS object-position values like "center", "top", "bottom left", "25% 75%", etc.

crop_x double
The X position of the crop area as a percentage (0–100). Use together with crop_width and crop_height to crop an image layer.

crop_y double
The Y position of the crop area as a percentage (0–100).

crop_width double
The width of the crop area as a percentage (0–100). For example, 50 means the crop area covers 50% of the image width.

crop_height double
The height of the crop area as a percentage (0–100). For example, 50 means the crop area covers 50% of the image height.

filter string
Change the filter of an image layer.
Example: "blur(4px) brightness(68%) hue-rotate(27deg) contrast(70%) saturate(125%) sepia(53%) grayscale(27%) invert(25%)"

barcode_format string
The format of the barcode.
Supported formats: CODE128, CODE39, EAN13, EAN8, ITF14, UPC.

rating double
The rating of the star rating layer.

html string
Set the layer content to a custom HTML content.
Value example: "<ul><li>Item 1</li><li>Item 2</li><li>Item 3</li></ul>"

animation object
Animation configuration for video (MP4) renders. Contains the following properties:

Response

Section titled “Response”

The API returns a JSON object with the render details.

{
"id": "ce424057-6b54-41bb-afec-adc35a2b9175",
"url": "https://templated-assets.s3.amazonaws.com/renders/ce424057-6b54-41bb-afec-adc35a2b9175.jpg",
"width": 1920,
"height": 1080,
"format": "jpg",
"templateId": "1f1231-dasd123-fsdf12312-fds4123-asdas23",
"templateName": "Sample Template",
"createdAt": "2025-04-22 08:30:58",
"externalId": null
}

Multi-Page Template

Section titled “Multi-Page Template”

If you are using a multi-page template, you can use the pages parameter to specify different layer modifications for each page.
Multi-page templates are ideal for creating carousels or PDF documents with multiple pages.

Same Content Across All Pages

Section titled “Same Content Across All Pages”

Similarly to the single-page template, you can use the layers parameter to apply the same modifications to all pages:

fetch('https://api.templated.io/v1/render', {
method: 'POST',
body: JSON.stringify({
"template": TEMPLATE_ID,
"layers": {
"company_name": { "text": "ACME Corporation" },
"logo": { "image_url": "https://example.com/logo.png" }
}
}),
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${API_KEY}`
}
})

Different Content Per Page

Section titled “Different Content Per Page”

Use the pages parameter to specify different layer modifications for each page.
You can even duplicate the same page multiple times to create a carousel.

fetch('https://api.templated.io/v1/render', {
method: 'POST',
body: JSON.stringify({
"template": TEMPLATE_ID,
"pages": [
{
"page": "page-1",
"layers": {
"title": { "text": "Welcome to Our Company" },
"subtitle": { "text": "Page 1 Content" }
}
},
{
"page": "page-2",
"layers": {
"title": { "text": "Our Services" },
"content": { "text": "We offer amazing services..." }
}
},
{
"page": "page-3",
"layers": {
"title": { "text": "Contact Us" },
"contact": { "text": "support@company.com" }
}
}
]
}),
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${API_KEY}`
}
})

Different Dimensions Per Page

Section titled “Different Dimensions Per Page”

You can set different dimensions for each page using the width and height parameters inside each page object. This is useful for creating collections with mixed formats (e.g. a cover at 1920×1080, content at 1080×1080, and stories at 1080×1920).

{
"template": "TEMPLATE_ID",
"pages": [
{
"page": "cover",
"width": 1920,
"height": 1080,
"layers": {
"title": { "text": "Welcome" }
}
},
{
"page": "content",
"width": 1080,
"height": 1080,
"layers": {
"title": { "text": "Our Services" }
}
},
{
"page": "story",
"width": 1080,
"height": 1920,
"layers": {
"title": { "text": "Follow Us" }
}
}
]
}

If width or height is not specified for a page, it falls back to the dimensions set in the page’s HTML style, then to the global width/height parameters, and finally to the template’s default dimensions.

Response for Multi-Page Templates

Section titled “Response for Multi-Page Templates”

When multiple pages are rendered (using pages parameter or multi-page templates with layers), you will receive an array of render objects in the response:

[
{
"id": "render-page1-id",
"url": "https://templated-assets.s3.amazonaws.com/renders/render-page1-id.jpg",
"page": "page-1",
"width": 1920,
"height": 1080,
"format": "jpg",
"templateId": "template-id",
"templateName": "Multi-Page Template",
"createdAt": "2025-04-22 08:30:58"
},
{
"id": "render-page2-id",
"url": "https://templated-assets.s3.amazonaws.com/renders/render-page2-id.jpg",
"page": "page-2",
"width": 1920,
"height": 1080,
"format": "jpg",
"templateId": "template-id",
"templateName": "Multi-Page Template",
"createdAt": "2025-04-22 08:30:58"
}
]

Video Rendering

Section titled “Video Rendering”

Templated supports rendering templates as MP4 videos. This is ideal for templates with animations, video layers, or when you want to create dynamic video content from your designs.

Video Parameters

Section titled “Video Parameters”

When rendering videos, you can control the following parameters:

ParameterTypeDescriptionDefault
formatstringSet to "mp4" for video output"jpg"
durationnumberVideo duration in milliseconds (max 90000). Falls back to the template’s default duration if not specified.5000
fpsnumberFrames per second (10, 30, or 60)30

Sample Video Request

Section titled “Sample Video Request”
fetch('https://api.templated.io/v1/render', {
method: 'POST',
body: JSON.stringify({
"template": TEMPLATE_ID,
"format": "mp4",
"duration": 10000, // 10 seconds
"fps": 30,
"layers": {
"title": { "text": "Welcome to my video!" },
"background-video": { "video_url": "https://example.com/video.mp4" }
}
}),
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${API_KEY}`
}
})

Layer Animations

Section titled “Layer Animations”

You can add entrance, looping, and exit animations to any layer via the animation property. Animations only apply to video (MP4) renders.

{
"template": "TEMPLATE_ID",
"format": "mp4",
"duration": 6000,
"layers": {
"title": {
"text": "Breaking News",
"animation": {
"in": { "type": "slide", "direction": "left", "duration": 500 },
"loop": { "type": "pulse", "duration": 1000 },
"out": { "type": "fade", "duration": 500 },
"start": 1000,
"end": 5000
}
}
}
}

All time values in the animation object are in milliseconds, consistent with the top-level duration parameter.

Animation Types

Section titled “Animation Types”
CategoryTypesProperties
in (entrance)slide, fade, zoom, rotatetype, direction, duration, writingStyle
loop (repeating)spin, pulsetype, duration
out (exit)slide, fade, zoomtype, direction, duration

Direction values: left, right, up, down (for slide) — in, out (for zoom)

Writing style (text layers only): block (default), word, character — controls how text animates with slide/fade

Timeline

Section titled “Timeline”

The start and end properties control when a layer appears and disappears in the video:

Video Credits Cost

Section titled “Video Credits Cost”

Video rendering uses a credit system based on the template size, duration, and FPS.
The formula is:

Width × Height × FPS × Duration in seconds
50,000,000

Example: A 1920×1080 video at 30 FPS for 10 seconds would cost:

Video Credit Usage Calculator

Section titled “Video Credit Usage Calculator”

Use this calculator to estimate the number of credits required for a video render.

Estimated Cost
13 credits
(1920 × 1080 × 30 × 10) / 50M
= 6.22 → rounded up

Limitations

Section titled “Limitations”

Best Practices for Video Rendering

Section titled “Best Practices for Video Rendering”
  1. Start with shorter durations - Test with 5-10 second videos before creating longer content
  2. Use appropriate FPS - 30 FPS is suitable for most content; use 60 FPS only for smooth motion graphics
  3. Optimize template animations - Ensure your animations are designed to loop or complete within the specified duration
  4. Consider async rendering - For longer videos, set "async": true and use webhooks to be notified when rendering completes
# Delete a render > Learn how to delete a render using the Templated API.

Delete a specific render by its ID.

Sample Request

Section titled “Sample Request”

Here’s a sample request to delete a render:

ENDPOINT
DELETE /v1/render/{id}
fetch(`https://api.templated.io/v1/render/${RENDER_ID}`, {
method: 'DELETE',
headers: {
'Authorization': `Bearer ${API_KEY}`
}
})
.then(response => {
if (response.status === 204) {
console.log('Render deleted successfully');
}
})
.catch(error => console.error('Error:', error));

Response

Section titled “Response”

A successful deletion will return a 204 No Content response with no body.

Error Responses

Section titled “Error Responses”
Status CodeDescription
401Not authorized - Invalid or missing API key
403Forbidden - You don’t have permission to delete this render
404Not Found - Render or user not found
500Internal Server Error - An unexpected error occurred
# Duplicate a render > Learn how to duplicate a render using the Templated API.

Creates a duplicate of an existing render.
The duplicated render will use the same template and payload as the original render and can be customized independently.
Duplicating a render counts towards your API quota.

Parameters

Section titled “Parameters”

id string REQUIRED
The render id of the render that you want to duplicate.

Sample Request

Section titled “Sample Request”

Here’s a sample request to duplicate a render:

ENDPOINT
POST /v1/render/:id/duplicate
REQUEST
fetch(`https://api.templated.io/v1/render/${id}/duplicate`, {
method: 'POST',
headers: {
'Authorization' : `Bearer ${API_KEY}`
}
})

Response

Section titled “Response”

The API returns a JSON object with the duplicated render details.

{
"id": "new-render-id-456",
"url": "https://templated-assets.s3.amazonaws.com/renders/new-render-id-456.jpg",
"width": 1920,
"height": 1080,
"format": "jpg",
"status": "COMPLETED",
"templateId": "template-id-123",
"templateName": "Sample Template",
"createdAt": "2024-01-15T10:30:00Z",
}
# The render object > Learn the properties of a render object in the Templated API.

A Render is what is generated when you render an image, PDF, or video from a template.
On the next step you will learn how to create a render.

Bellow are the basic attributes of a Render.
All other attributes of the object are set by the user at the time of creation.

Attributes

Section titled “Attributes”

id string
The unique ID for this object.

width number
The width of the rendered image in pixels.

height number
The height of the rendered image in pixels.

url string
The URL of the render.

name string
The name of the render.

status string
The current status of the render: PENDING, COMPLETED or FAILED. Initially the status is PENDING.

format string
The output format of the render.

templateId string
The ID of the template used to generate the render.

templateName string
The name of the template used to generate the render.

createdAt string
The date and time the render was created.

Sample Object

Section titled “Sample Object”

Here’s a sample object of a render:

{
"id": "ce424057-6b54-41bb-afec-adc35a2b9175",
"url": "https://templated-assets.s3.amazonaws.com/renders/ce424057-6b54-41bb-afec-adc35a2b9175.jpg",
"width": 1920,
"height": 1080,
"status": "PENDING",
"format": "jpg",
"templateId": "1f1231-dasd123-fsdf12312-fds4123-asdas23",
"templateName": "Sample Template",
"createdAt": "2023-10-02T10:00:00.077Z",
}
# List all renders > Learn the list all renders of an user using the Templated API.

Lists all renders of an user.

Sample Request

Section titled “Sample Request”

Here’s a sample request to list all user’s renders:

ENDPOINT
GET /v1/renders
fetch(`https://api.templated.io/v1/renders`, {
method: 'GET',
headers: {
'Authorization': `Bearer ${API_KEY}`
}
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
# Merge renders > Learn to merge renders using the Templated API.

Merges multiple renders into a single PDF.
You can also include external PDF URLs to merge with your renders.
A merge uses 1 API credit.

By default, the merged PDF will be returned directly in the response.
But if you pass the host parameter, the merged PDF will be uploaded to our servers and you will receive a URL in the response.

Parameters

Section titled “Parameters”

ids array REQUIRED
The render ids of the renders that will be merged.

urls array
Optional array of PDF URLs to merge with the renders. The external PDFs will be downloaded and merged after the renders in the order provided.

name string
Optional name for the merged PDF file. When host is true, the hosted URL will include this name. When downloading directly, it will be used as the filename. Defaults to merged_renders for downloads.

host boolean
If true, the merged PDF will be hosted in our servers and you will receive a URL in the response. Defaults to false.

Sample Requests

Section titled “Sample Requests”
ENDPOINT
POST /v1/render/merge

Merge renders only

Section titled “Merge renders only”
REQUEST
fetch("https://api.templated.io/v1/render/merge", {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${API_KEY}`
},
body: JSON.stringify({
"ids": [
"render_id_1",
"render_id_2",
"render_id_3"
],
"name": "my-document",
"host": true
})
})
.then(response => response.json())
.then(data => {
// Handling the response
const url = data.url;
const link = document.createElement('a');
link.href = url;
link.download = 'merged_renders.pdf';
// Trigger the download
document.body.appendChild(link);
link.click();
});

Merge renders with external PDFs

Section titled “Merge renders with external PDFs”
REQUEST
fetch("https://api.templated.io/v1/render/merge", {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${API_KEY}`
},
body: JSON.stringify({
"ids": [
"render_id_1",
"render_id_2"
],
"urls": [
"https://example.com/document1.pdf",
"https://example.com/document2.pdf"
],
"host": true
})
})
.then(response => response.json())
.then(data => {
console.log('Merged PDF URL:', data.url);
});

Response

Section titled “Response”

The response format depends on the host parameter:

When host: true (hosted response)

Section titled “When host: true (hosted response)”

Returns a JSON object with the URL of the hosted merged PDF:

{
"url": "https://assets.templated.io/renders/merged/merged-abc123.pdf"
}

When host: false (direct download)

Section titled “When host: false (direct download)”

Returns the merged PDF file directly in the response body with the following headers:

The PDF file can be downloaded and saved directly from the response.

Merge Order

Section titled “Merge Order”

The final PDF will contain pages in this order:

  1. Renders: In the order specified by the ids array
  2. External PDFs: In the order specified by the urls array (if provided)

For example, if you provide ids: ["render1", "render2"] and urls: ["doc1.pdf", "doc2.pdf"], the final PDF will contain: render1 → render2 → doc1.pdf → doc2.pdf

# Retrieve a render > Learn to retrieve a render using the Templated API.

Retrieves a single Render object referenced by its unique ID.

Parameters

Section titled “Parameters”

id string REQUIRED The render id of the render that will be retrieved.

Sample Request

Section titled “Sample Request”

Here’s a sample request to retrieve a render:

ENDPOINT
GET /v1/render/:id
REQUEST
fetch(`https://api.templated.io/v1/render/${id}`, {
method: 'GET',
headers: {
'Authorization' : `Bearer ${API_KEY}`
}
})
# Add tags to template > Learn how to add tags to an existing template using the Templated API.

Add tags to an existing template.
This endpoint allows you to append new tags to a template without removing existing ones.

Request Body

Section titled “Request Body”

The request body should be an array of strings containing the tags you want to add.

Sample Request

Section titled “Sample Request”

Here’s a sample request to add tags to a template:

ENDPOINT
POST /v1/template/{templateId}/tags
fetch(`https://api.templated.io/v1/template/${template_id}/tags`, {
method: 'POST',
headers: {
'Authorization': `Bearer ${API_KEY}`,
'Content-Type': 'application/json'
},
body: JSON.stringify([
"social-media",
"instagram",
"story"
])
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
# Clone a template > Learn how to clone a template using the Templated API.

Creates a clone of an existing template.
The cloned template will belong to the same user and can be customized independently.
The clone maintains a reference to the source template through the sourceTemplateId field.

Parameters

Section titled “Parameters”

id string REQUIRED
The template id of the template that you want to clone.

Sample Request

Section titled “Sample Request”

Here’s a sample request to clone a template:

ENDPOINT
POST /v1/template/:id/clone
REQUEST
fetch(`https://api.templated.io/v1/template/${id}/clone`, {
method: 'POST',
headers: {
'Authorization' : `Bearer ${API_KEY}`
}
})

Response

Section titled “Response”

The API returns a JSON object with the cloned template details.

{
"id": "new-template-id-123",
"name": "My Template",
"width": 1200,
"height": 800,
"sourceTemplateId": "original-template-id-456",
"isClone": true,
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:30:00Z",
}
# List template clones > Learn how to list all clone templates using the Templated API.

Parameters

Section titled “Parameters”

sourceTemplateId string
Filter clones by their source template ID.
If not provided, returns all clone templates of the account.

externalId string
Filter clones by their external ID.
This is useful for retrieving clones associated with specific records in your system.

page integer
The page of the results you would like to retrieve. The initial page is 0.

limit integer
The API returns 25 items per page by default but you can request up to 100 using this parameter.

Sample Request

Section titled “Sample Request”

Here’s a sample request to list clone templates:

ENDPOINT
GET /v1/templates/clones
REQUEST
fetch('https://api.templated.io/v1/templates/clones?sourceTemplateId=123&page=0&limit=25', {
method: 'GET',
headers: {
'Authorization' : `Bearer ${API_KEY}`
}
})

Count template clones

Section titled “Count template clones”

You can also get a count of all clone templates for a given source template ID. Here’s a sample request to count clone templates:

ENDPOINT
GET /v1/templates/clones/count
REQUEST
fetch('https://api.templated.io/v1/templates/clones/count?sourceTemplateId=123', {
method: 'GET',
headers: {
'Authorization' : `Bearer ${API_KEY}`
}
})

Response

Section titled “Response”

The response will be a JSON object with the count of clone templates.

RESPONSE
{
"count": 100
}
# Create a template > Learn to create a template using the Templated API.

This endpoint is used for more complex integrations where you need to create templates programmatically.
It allows you to create a new template by composing multiple layers into a single design.
Each layer can be text, images, or shapes, with specific positioning, dimensions, and styling properties.

This endpoint allows you to:

After creating the template, you can open and modify the template in our Editor or use it to generate renders with the render endpoint.

Parameters

Section titled “Parameters”

name string REQUIRED
The name of the template.

width number REQUIRED
The width of the template in pixels (max 5000).

height number REQUIRED
The height of the template in pixels (max 5000).

layers array
An array of layer objects that make up the template. Use this for single-page templates.
On each layer you must specify the layer property, which will be the name identifier of the layer in the template and the layer type (image, text, shape).

pages array
An array of page objects for multi-page templates. Use this instead of layers when you need multiple pages.
See Multi-Page Templates below for details.

duration number
Default video duration in milliseconds for MP4 renders (e.g., 5000 for 5 seconds). When rendering a video without specifying a duration, this value is used as the default.

For all the available layer properties, see the Layer Parameters section.

Grouping Layers

Section titled “Grouping Layers”

You can group layers together by setting the same group property on multiple layers. Grouped layers are treated as a single unit in the Editor and can be identified programmatically via the API.

group string
An optional group name. Layers that share the same group value will be wrapped in a group container. The group’s position and dimensions are automatically calculated from the bounding box of its child layers.

GROUPED LAYERS EXAMPLE
{
"layers": [
{
"layer": "title",
"type": "text",
"group": "header",
"text": "Hello World",
"x": 100,
"y": 100,
"width": 400,
"height": 90
},
{
"layer": "logo",
"type": "image",
"group": "header",
"image_url": "https://example.com/logo.png",
"x": 100,
"y": 220,
"width": 200,
"height": 200
},
{
"layer": "footer",
"type": "text",
"text": "This layer is not grouped",
"x": 100,
"y": 900,
"width": 500,
"height": 50
}
]
}

In this example, title and logo are grouped under "header", while footer remains independent.

Multi-Page Templates

Section titled “Multi-Page Templates”

You can create templates with multiple pages by using the pages field instead of layers. Each page is an object with its own set of layers and optional dimension overrides.

Page Parameters

Section titled “Page Parameters”

page string REQUIRED
A unique identifier for the page (e.g., "page-1", "cover", "back").

layers object REQUIRED
An object containing the layers for this page. Each key is the layer name and the value is a layer object with its properties (type, text, x, y, etc.).

width number
Optional width override for this page in pixels. If not provided, the template-level width is used.

height number
Optional height override for this page in pixels. If not provided, the template-level height is used.

MULTI-PAGE EXAMPLE
{
"name": "Product Brochure",
"width": 1080,
"height": 1080,
"pages": [
{
"page": "cover",
"layers": {
"background": {
"type": "image",
"x": 0,
"y": 0,
"width": 1080,
"height": 1080,
"image_url": "https://example.com/cover-bg.jpg"
},
"title": {
"type": "text",
"x": 100,
"y": 400,
"width": 880,
"height": 200,
"text": "Product Brochure",
"color": "#ffffff",
"font_size": "64px",
"font_family": "Inter"
}
}
},
{
"page": "details",
"layers": {
"heading": {
"type": "text",
"x": 80,
"y": 60,
"width": 920,
"height": 80,
"text": "Key Features",
"color": "#333333",
"font_size": "48px"
},
"body": {
"type": "text",
"x": 80,
"y": 180,
"width": 920,
"height": 600,
"text": "Feature descriptions go here...",
"color": "#666666",
"font_size": "24px"
}
}
}
]
}

After creating a multi-page template, you can retrieve its pages using the List Template Pages endpoint.

Sample Request

Section titled “Sample Request”

Here’s a sample request to create a single-page template:

ENDPOINT
POST /v1/template
REQUEST
fetch('https://api.templated.io/v1/template', {
method: 'POST',
headers: {
'Authorization': `Bearer ${API_KEY}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
"name": "Summer Music Festival Post",
"width": 1200,
"height": 630,
"layers": [
{
"layer": "background-image",
"type": "image",
"width": 1200,
"height": 630,
"x": 0,
"y": 0,
"image_url": "https://images.unsplash.com/photo-1533174072545-7a4b6ad7a6c3"
},
{
"layer": "event-name",
"type": "text",
"width": 1000,
"height": 120,
"x": 100,
"y": 80,
"text": "SUMMER BEATS\nFESTIVAL 2024",
"color": "#ffffff",
"font_family": "ArchivoBlack-Regularttf",
"font_size": "72px",
"autofit": "height"
},
{
"layer": "details-box",
"type": "shape",
"width": 800,
"height": 180,
"x": 330,
"y": 240,
"html": "<rect width='100%' height='100%' rx='12' fill='#4B56D2' opacity='0.85'/>"
}
]
})
})
# Delete a template > Learn how to delete a template using the Templated API.

Delete a specific template by its ID.

Sample Request

Section titled “Sample Request”

Here’s a sample request to delete a template:

ENDPOINT
DELETE /v1/template/{id}
fetch(`https://api.templated.io/v1/template/${TEMPLATE_ID}`, {
method: 'DELETE',
headers: {
'Authorization': `Bearer ${API_KEY}`
}
})
.then(response => {
if (response.status === 204) {
console.log('Template deleted successfully');
}
})
.catch(error => console.error('Error:', error));

Response

Section titled “Response”

A successful deletion will return a 204 No Content response with no body.

Error Responses

Section titled “Error Responses”
Status CodeDescription
401Not authorized - Invalid or missing API key
403Forbidden - You don’t have permission to delete this template
404Not Found - Template or user not found
500Internal Server Error - An unexpected error occurred
# Duplicate a template > Learn how to duplicate a template using the Templated API.

Creates a duplicate of an existing template.
The duplicated template will belong to the same user and can be customized independently.
Duplicating a template counts towards the template limit of your plan.

Parameters

Section titled “Parameters”

id string REQUIRED
The template id of the template that you want to duplicate.

name string OPTIONAL
The name for the duplicated template.
If not provided, defaults to “Copy of {original_template_name}”.

Sample Request

Section titled “Sample Request”

Here’s a sample request to duplicate a template:

ENDPOINT
POST /v1/template/:id/duplicate
REQUEST WITH CUSTOM NAME
fetch(`https://api.templated.io/v1/template/${id}/duplicate?name=My Custom Template`, {
method: 'POST',
headers: {
'Authorization' : `Bearer ${API_KEY}`
}
})
REQUEST WITH DEFAULT NAME
fetch(`https://api.templated.io/v1/template/${id}/duplicate`, {
method: 'POST',
headers: {
'Authorization' : `Bearer ${API_KEY}`
}
})

Response

Section titled “Response”

The API returns a JSON object with the duplicated template details.

{
"id": "new-template-id-123",
"name": "My Custom Template",
"width": 1200,
"height": 800,
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:30:00Z",
}
# List gallery templates > Retrieve all templates from the Templated gallery using the API.

Lists all templates available in the public Template Gallery.
Gallery templates are professionally designed templates that you can use as a starting point for your projects**.**

Query Parameters

Section titled “Query Parameters”
ParameterTypeDefaultDescription
querystring-Filter templates by name or description
categorystring-Filter templates by category name
tagsstring-Filter templates by tags (comma-separated)
pageinteger0Page number for pagination
limitinteger25Number of results per page
widthinteger-Filter templates by exact width
heightinteger-Filter templates by exact height
includeLayersbooleanfalseInclude template layers in response

Response

Section titled “Response”

Returns an array of template objects. Each template includes the following notable fields:

FieldTypeDescription
idstringUnique identifier of the template
namestringName of the template
descriptionstringDescription of the template
widthintegerWidth of the template in pixels
heightintegerHeight of the template in pixels
thumbnailstringURL of the template thumbnail image
categoryobjectCategory information (name, description)
tagsarrayList of tags associated with the template
backgroundstringThe background color of the template
layersarrayList of template layers (only when includeLayers=true)

Sample Request

Section titled “Sample Request”

Here’s a sample request to list all gallery templates:

ENDPOINT
GET /v1/templates/gallery
fetch('https://api.templated.io/v1/templates/gallery', {
method: 'GET',
headers: {
'Authorization': `Bearer ${API_KEY}`
}
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));

Filtering Examples

Section titled “Filtering Examples”

Filter by Category

Section titled “Filter by Category”
fetch('https://api.templated.io/v1/templates/gallery?category=Certificate', {
method: 'GET',
headers: {
'Authorization': `Bearer ${API_KEY}`
}
})

Filter by Dimensions

Section titled “Filter by Dimensions”
// Get Instagram post templates (1080x1080)
fetch('https://api.templated.io/v1/templates/gallery?width=1080&height=1080', {
method: 'GET',
headers: {
'Authorization': `Bearer ${API_KEY}`
}
})

Search by Name

Section titled “Search by Name”
fetch('https://api.templated.io/v1/templates/gallery?query=certificate', {
method: 'GET',
headers: {
'Authorization': `Bearer ${API_KEY}`
}
})
Section titled “Opening a Gallery Template in the Editor”

You can launch the Templated editor with a gallery template pre-loaded using the gallery URL parameter:

https://app.templated.io/editor?gallery={galleryTemplateId}

This will automatically create a copy of the gallery template in the user’s account and open it for editing.

For embedded editor integrations, you can use:

https://app.templated.io/editor?embed={embedConfigId}&gallery={galleryTemplateId}
# The template object > Learn the properties of a template object in the Templated API.

These attributes define the properties of a template.
The template object is used to store template data, including dimensions, user information, and category details.

Attributes

Section titled “Attributes”

id string
The unique UUID for the template.

name string
The name of the template.

description string
A brief description of the template.

width integer
The width of the template in pixels.

height integer
The height of the template in pixels.

thumbnail string
URL of the template’s thumbnail image.

layersCount integer
The number of layers (not locked) of the template.

user User object
The user who created or owns the template.

folderId string
The folder ID of folder the template belongs to.

Sample Object

Section titled “Sample Object”

Here’s a sample object of a template:

{
"id": "306c724a-d138-486a-a601-0b2a9ced52be",
"name": "Twitter Bubble Square Template",
"description": "This is a sample template for demonstration.",
"width": 1024,
"height": 1024,
"thumbnail": "https://templated-assets.s3.us-east-1.amazonaws.com/public/thumbnail/306c724a-d138-486a-a601-0b2a9ced52be.webp",
"user": {
"id": "872s0atn-l4o5-09g9-gth2-oy7f79df6tuw",
"name": "Mark Doe"
}
}
# List template layers > Learn the list all layers of a template using the Templated API.

Lists all layers of a template.
By default, locked layers are not returned. Set includeLockedLayers=true to include them.

Parameters

Section titled “Parameters”

id string REQUIRED
The template id of the template that you want to retrieve the layers.

includeLockedLayers boolean
Defaults to false. When true, returns layers even if they are marked as locked in the template.

Sample Request

Section titled “Sample Request”

Here’s a sample request to list all layers of a template:

ENDPOINT
GET /v1/template/:id/layers
ENDPOINT (Include locked layers)
GET /v1/template/:id/layers?includeLockedLayers=true
REQUEST
fetch(`https://api.templated.io/v1/template/${id}/layers`, {
method: 'GET',
headers: {
'Authorization' : `Bearer ${API_KEY}`
}
})

Response

Section titled “Response”

The API returns an array of JSON objects with the layer details.

[
{
"layer": "text-1",
"type": "text",
"description": "",
"group": "header"
},
{
"layer": "image-1",
"type": "image",
"description": "Profile image layer",
"group": "header"
},
{
"layer": "footer",
"type": "text",
"description": ""
}
...
]

Each layer object contains the following properties:

layer string
The unique identifier of the layer.

type string
The type of layer (e.g., “text”, “image”, “shape”, etc.).

description string
Optional description of the layer.
The description can be added in the Editor.

group string
The name of the group this layer belongs to.
Layers that share the same group value are grouped together in the Editor.
This property is only present for layers that belong to a group.

# List all templates > Learn the list all templates of an user using the Templated API.

Lists all templates of an user.
You can filter and customize the results using various query parameters.

Query Parameters

Section titled “Query Parameters”
ParameterTypeDefaultDescription
querystring-Filter templates by name
pageinteger0Page number for pagination
limitinteger25Number of results per page
widthinteger-Filter templates by width
heightinteger-Filter templates by height
tagsstring-Filter templates by tags (comma-separated)
externalIdstring-Filter templates by external ID
includeLayersbooleanfalseInclude template layers in response
includePagesbooleanfalseInclude template pages and layers in response

Response

Section titled “Response”

Each template in the response includes the following notable fields:

FieldTypeDescription
backgroundstringThe background color of the template (e.g., #ffffff or rgb(255, 255, 255))
layersarrayList of template layers (only included when includeLayers=true)
pagesarrayList of template pages with their layers (only included when includePages=true)

Sample Request

Section titled “Sample Request”

Here’s a sample request to list all user’s templates:

ENDPOINT
GET /v1/templates
fetch(`https://api.templated.io/v1/templates`, {
method: 'GET',
headers: {
'Authorization': `Bearer ${API_KEY}`
},
// Example with all query parameters
params: {
query: 'Template Name',
page: 0,
limit: 25,
width: 1920,
height: 1080,
tags: 'tag1,tag2',
externalId: 'my-external-id',
includeLayers: true
}
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
# List template pages > Learn to list all pages of a template using the Templated API.

Lists all pages of a template.
This endpoint returns all pages defined in a multi-page template.

Parameters

Section titled “Parameters”

id string REQUIRED
The template id of the template that you want to retrieve the pages.

Sample Request

Section titled “Sample Request”

Here’s a sample request to list all pages of a template:

ENDPOINT
GET /v1/template/:id/pages
REQUEST
fetch(`https://api.templated.io/v1/template/${id}/pages`, {
method: 'GET',
headers: {
'Authorization' : `Bearer ${API_KEY}`
}
})

Response

Section titled “Response”

The API returns an array of JSON objects with the page details.

[
{
"page": "page-1",
"layers": {
"text-1": {
"layer": "text-1",
"type": "text",
"description": "Title text",
"group": "header"
},
"image-1": {
"layer": "image-1",
"type": "image",
"description": "Cover image",
"group": "header"
},
"footer": {
"layer": "footer",
"type": "text",
"description": "Footer text"
}
}
},
{
"page": "page-2",
"layers": {
"text-2": {
"layer": "text-2",
"type": "text",
"description": "Body text"
}
}
}
...
]

Each page object contains the following properties:

page string
The unique identifier of the page.

layers object
An object containing all layers within this page, where each key is the layer ID and the value is the layer object with its properties (layer, type, description, group, etc.).

# Remove tags from template > Learn how to remove tags from an existing template using the Templated API.

Remove tags from an existing template.
This endpoint allows you to remove specific tags from a template.

Request Body

Section titled “Request Body”

The request body should be an array of strings containing the tags you want to remove.

Sample Request

Section titled “Sample Request”

Here’s a sample request to remove tags from a template:

DELETE /v1/template/{templateId}/tags
fetch(`https://api.templated.io/v1/template/${template_id}/tags`, {
method: 'DELETE',
headers: {
'Authorization': `Bearer ${API_KEY}`,
'Content-Type': 'application/json'
},
body: JSON.stringify([
"social-media",
"instagram"
])
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
# List template renders > Learn the list all renders of a template using the Templated API.

Lists all renders of a template.

Parameters

Section titled “Parameters”

id string REQUIRED
The template id that you want to retrieve the renders.

page integer
The page of the results you would like to retrieve. The initial page is 0.

limit integer
The API returns 25 items per page by default but you can request up to 100 using this parameter.

externalId string
Filter renders by external ID.

Sample Request

Section titled “Sample Request”

Here’s a sample request to list all renders of a template:

ENDPOINT
GET /v1/template/:id/renders
REQUEST
fetch(`https://api.templated.io/v1/template/${id}/renders?page=2&limit=50&externalId=my-external-id`, {
method: 'GET',
headers: {
'Authorization' : `Bearer ${API_KEY}`
}
})
# Retrieve a template > Learn to retrieve a template using the Templated API.

Retrieves a single Template object referenced by its unique ID.

Path Parameters

Section titled “Path Parameters”

id string REQUIRED
The template id of the template that will be retrieved.

Query Parameters

Section titled “Query Parameters”
ParameterTypeDefaultDescription
includeLayersbooleanfalseInclude template layers in response
includePagesbooleanfalseInclude template pages and layers in response

Sample Request

Section titled “Sample Request”

Here’s a sample request to retrieve a template:

ENDPOINT
GET /v1/template/:id
fetch(`https://api.templated.io/v1/template/${id}?includeLayers=true`, {
method: 'GET',
headers: {
'Authorization': `Bearer ${API_KEY}`
}
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
# Update tags for template > Learn how to update tags for an existing template using the Templated API.

Update tags for an existing template.
This endpoint allows you to replace all existing tags of a template with a new set of tags.

Request Body

Section titled “Request Body”

The request body should be an array of strings containing the new tags you want to set.

Sample Request

Section titled “Sample Request”

Here’s a sample request to update tags for a template:

PUT /v1/template/{templateId}/tags
fetch(`https://api.templated.io/v1/template/${template_id}/tags`, {
method: 'PUT',
headers: {
'Authorization': `Bearer ${API_KEY}`,
'Content-Type': 'application/json'
},
body: JSON.stringify([
"new-tag1",
"new-tag2",
"new-tag3"
])
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
# Update a template > Learn to update a template using the Templated API.

This endpoint allows you to update an existing template by modifying its layers, properties, or content.
You can update specific layers without affecting the rest of the template, making it efficient for partial updates.

Key features:

After updating the template, the changes will be reflected in the Editor and any future renders created from this template.

Parameters

Section titled “Parameters”

Path Parameters

Section titled “Path Parameters”

id string REQUIRED
The template ID of the template you want to update (passed in the URL path).

Query Parameters

Section titled “Query Parameters”

replaceLayers boolean OPTIONAL
When set to true, layers not included in the request will be removed from the template.
Default is false (partial update mode - existing layers not in the request remain unchanged).
Use this when you want to completely replace the template’s layers rather than just updating specific ones.

Body Parameters

Section titled “Body Parameters”

name string OPTIONAL
The name of the template.

width number OPTIONAL
The width of the template in pixels (max 5000).

height number OPTIONAL
The height of the template in pixels (max 5000).

description string OPTIONAL
A description of the template.

externalId string OPTIONAL
An external identifier you can attach to the template to associate it with a record in your own system (e.g., one of your end-users).
Useful when offering per-user templates through your service.
You can later filter templates by this value via the List templates endpoint using the externalId query parameter.

layers array OPTIONAL
An array of layer objects to update.
Only include the layers you want to modify or add.
Each layer must specify the layer property (layer name identifier) and the layer type (image, text, shape).

pages array OPTIONAL
For multi-page templates, an array of page objects containing the layers to update.
Only include the pages and layers you want to modify.

For all the available layer properties, see the Layer Parameters section.

Grouping Layers

Section titled “Grouping Layers”

You can group layers by setting the same group property on multiple layers. See Create a template - Grouping Layers for details.

When adding new grouped layers to an existing template:

Sample Requests

Section titled “Sample Requests”

Update specific layers in a template

Section titled “Update specific layers in a template”

Here’s a sample request to update only specific layers:

ENDPOINT
PUT /v1/template/{id}
UPDATE SPECIFIC LAYERS
fetch(`https://api.templated.io/v1/template/${template_id}`, {
method: 'PUT',
headers: {
'Authorization': `Bearer ${API_KEY}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
"layers": [
{
"layer": "event-name",
"type": "text",
"text": "UPDATED EVENT NAME",
"color": "#ff0000"
},
{
"layer": "background-image",
"type": "image",
"image_url": "https://images.unsplash.com/photo-new-image-id"
}
]
})
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));

Update template properties and layers

Section titled “Update template properties and layers”

You can also update template metadata along with layers:

UPDATE PROPERTIES AND LAYERS
fetch(`https://api.templated.io/v1/template/${template_id}`, {
method: 'PUT',
headers: {
'Authorization': `Bearer ${API_KEY}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
"name": "Updated Template Name",
"description": "This template has been updated",
"width": 1920,
"height": 1080,
"layers": [
{
"layer": "title",
"type": "text",
"text": "New Title Text",
"font_size": "64px",
"color": "#ffffff"
}
]
})
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));

Update multi-page template

Section titled “Update multi-page template”

For multi-page templates, use the pages array:

UPDATE MULTI-PAGE TEMPLATE
fetch(`https://api.templated.io/v1/template/${template_id}`, {
method: 'PUT',
headers: {
'Authorization': `Bearer ${API_KEY}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
"pages": [
{
"page": "page-1",
"layers": {
"title": {
"layer": "title",
"type": "text",
"text": "Updated Page 1 Title"
}
}
},
{
"page": "page-2",
"layers": {
"subtitle": {
"layer": "subtitle",
"type": "text",
"text": "Updated Page 2 Subtitle"
}
}
}
]
})
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));

Assign a template to one of your end-users

Section titled “Assign a template to one of your end-users”

If you’re building a service on top of Templated and want to associate a template (for example, a clone) with one of your own users, set the externalId field.
You can then list and filter templates per end-user via the List templates endpoint.

ASSIGN EXTERNAL ID
fetch(`https://api.templated.io/v1/template/${template_id}`, {
method: 'PUT',
headers: {
'Authorization': `Bearer ${API_KEY}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
"externalId": "your-user-id"
})
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));

Replace all layers in a template

Section titled “Replace all layers in a template”

Use replaceLayers=true when you want to completely replace the template’s layers. Any layers not included in your request will be removed:

ENDPOINT
PUT /v1/template/{id}?replaceLayers=true
REPLACE ALL LAYERS
// This will replace ALL layers in the template with only the layers specified below
// Any existing layers not in this array will be REMOVED
fetch(`https://api.templated.io/v1/template/${template_id}?replaceLayers=true`, {
method: 'PUT',
headers: {
'Authorization': `Bearer ${API_KEY}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
"layers": [
{
"layer": "new-title",
"type": "text",
"text": "My New Title",
"x": 100,
"y": 100,
"width": 400,
"height": 50,
"font_size": "48px",
"color": "#000000"
},
{
"layer": "new-image",
"type": "image",
"image_url": "https://images.unsplash.com/photo-example",
"x": 100,
"y": 200,
"width": 400,
"height": 300
}
]
})
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));

Response

Section titled “Response”

The API returns a JSON object with the updated template details:

{
"id": "template-id-123",
"name": "Updated Template Name",
"description": "This template has been updated",
"width": 1920,
"height": 1080,
"layersCount": 15,
"pagesCount": 1,
"updatedAt": "2024-01-15T10:30:00Z",
"createdAt": "2024-01-01T08:00:00Z"
}

Error Responses

Section titled “Error Responses”
Status CodeDescription
401Not authorized - Invalid or missing API key
403Forbidden - You don’t have permission to update this template or account is blocked
404Not Found - Template not found
500Internal Server Error - An unexpected error occurred

Important Notes

Section titled “Important Notes”
# Upload an image > Learn to upload an image using the Templated API.

Upload an image to your account.

Sample Request

Section titled “Sample Request”

Here’s a sample request to upload an image:

ENDPOINT
POST /v1/upload
Content-Type: multipart/form-data
// Create form data
const fileInput = document.getElementById('fileInput');
const formData = new FormData();
formData.append('file', fileInput.files[0]);
// Optional: add tags to organize your uploads
formData.append('tags', 'product');
formData.append('tags', 'featured');
// Optional: add an external ID to link with your own system
formData.append('externalId', 'your-external-reference-id');
fetch('https://api.templated.io/v1/upload', {
method: 'POST',
body: formData,
headers: {
'Authorization' : `Bearer ${API_KEY}`
}
})

Parameters

Section titled “Parameters”
ParameterTypeRequiredDescription
fileFileYesThe image file to upload (JPG, PNG, WebP, or SVG). Maximum size: 2MB
tagsString[]NoOptional tags to organize your uploads. Can be provided multiple times
externalIdStringNoOptional external reference ID to link the upload with records in your own system
# Delete uploads > Learn how to delete one or multiple uploads using the Templated API.

Delete one or multiple uploads by their IDs. All specified uploads must exist and belong to your account for the deletion to proceed.

Sample Request

Section titled “Sample Request”

Here’s a sample request to delete uploads:

ENDPOINT
DELETE /v1/uploads?ids=UPLOAD_ID_1&ids=UPLOAD_ID_2
// Delete single upload
fetch(`https://api.templated.io/v1/uploads?ids=${UPLOAD_ID_1}`, {
method: 'DELETE',
headers: {
'Authorization': `Bearer ${API_KEY}`
}
})
.then(response => response.json())
.then(data => console.log('Response:', data))
.catch(error => console.error('Error:', error));
// Delete multiple uploads
const uploadIds = [UPLOAD_ID_1, UPLOAD_ID_2];
const params = uploadIds.map(id => `ids=${id}`).join('&');
fetch(`https://api.templated.io/v1/uploads?${params}`, {
method: 'DELETE',
headers: {
'Authorization': `Bearer ${API_KEY}`
}
})
.then(response => response.json())
.then(data => console.log('Response:', data))
.catch(error => console.error('Error:', error));

Response

Section titled “Response”

Success Response

Section titled “Success Response”

A successful deletion will return a 200 OK response with details about the deleted uploads:

{
"deleted": ["upload-id-1", "upload-id-2"],
"message": "Successfully deleted 2 upload(s)"
}

Error Responses

Section titled “Error Responses”
Status CodeDescriptionResponse Body
400Bad Request - Invalid upload IDs or permission issues{"not_found": ["id1"], "unauthorized": ["id2"], "error": "Cannot delete uploads: some uploads were not found or you don't have permission to delete them"}
400Bad Request - No upload IDs provided{"error": "At least one upload ID must be provided"}
401Not authorized - Invalid or missing API key{"error": "Not authorized"}
404Not Found - User not found{"error": "User not found"}
500Internal Server Error - An unexpected error occurred{"error": "An unexpected error occurred"}

Important Notes

Section titled “Important Notes”

Query Parameters

Section titled “Query Parameters”
ParameterTypeRequiredDescription
idsstring[]YesOne or more upload IDs to delete. Pass multiple ids parameters for bulk deletion.
# The upload object > Learn the properties of an upload object in the Templated API.

These attributes define the properties of an upload object.
The upload object is used to store images in an organized way.

Attributes

Section titled “Attributes”

id string
The unique UUID for the upload.

name string
The file name of the upload.

size number
The size of the upload in bytes.

contentType string
The content type of the upload.

createdAt string
The date and time when the upload was created.

Sample Object

Section titled “Sample Object”

Here’s a sample object of an upload:

{
"id": "3c435c83-6682-4468-939f-6af175caacex",
"name": "my-image.jpg",
"size": 123456,
"contentType": "image/jpeg",
"createdAt": "2024-01-01T00:00:00Z"
}
# List all uploads > Learn the list all uploads of an user using the Templated API.

Lists all uploads of an user.

Sample Request

Section titled “Sample Request”

Here’s a sample request to list all user’s uploads:

ENDPOINT
GET /v1/uploads
REQUEST
fetch('https://api.templated.io/v1/uploads?query=banner&tags=social,marketing&page=0&limit=10', {
method: 'GET',
headers: {
'Authorization' : `Bearer ${API_KEY}`
}
})

Parameters

Section titled “Parameters”

query string
Search uploads by name or tag.

tags string[]
Filter uploads by tags (comma-separated).

page integer
Page number for pagination. Default is 0.

limit integer
Number of items per page. Default is 15.