Convert
This page lists and describes the Convert category of endpoints within the Content Services API. It also includes interactive testing environments for each endpoint in this category.
Last updated
Was this helpful?
This page lists and describes the Convert category of endpoints within the Content Services API. It also includes interactive testing environments for each endpoint in this category.
Last updated
Was this helpful?
The Conversion Collection provides you with endpoints that enable you to convert templates from one format to another. With the endpoint, you can easily convert your email JSON templates into page JSON. The endpoint lets you turn your page JSON templates into email-ready JSON, with the option to disable the HTML sanitizer if needed. The Simple to Full JSON endpoint enables you to convert templates into full Beefree JSON templates that can be loaded in the builder.
The Email to Page endpoint converts a JSON template created for email into a JSON template optimized for web pages. During this conversion, the following adjustments are applied:
Remove AMP Carousel Any AMP carousels included in the email template are removed, as these are not supported in the page format.
Expand Content Area Width The content width is expanded to 900px to fit the web page format, removing the width constraints typically applied to emails.
Target Attributes Target attributes will not be processed. Remove all link target attributes or set them to "Open a new page." Links will not be modified during the conversion.
Remove Subject and Preheader Email-specific metadata, such as the subject line and preheader text, is removed since these elements are not relevant in the page format.
Retain Comments and Secondary Language Comments and secondary language data in the email template are preserved in the conversion process.
The Page to Email endpoint transforms a JSON template designed for a web page into a JSON template optimized for email. During this conversion process, the following adjustments are made:
Remove Video Row Backgrounds Video backgrounds applied to page rows are removed because email formats do not support video backgrounds.
Replace Embedded Videos with Thumbnails Embedded videos are replaced with thumbnail images. This ensures recipients can preview the content visually without the compatibility issues of embedded videos. Note: Hosted videos will not be converted.
Remove Form Blocks Any form blocks present in the page template are removed.
Adjust Design Content Area Width If the page width exceeds the maximum width supported by the email builder (900px), it is resized to fit within email constraints.
Update Link Target Attributes Target attributes will not be processed. Remove all link target attributes. Links will not be modified during the conversion.
Sanitize Code The endpoint sanitizes the code to ensure compatibility with email standards. When the sanitizer is disabled, the payload looks like this:
Handle Multi-Column Layouts The email builder supports up to 12 columns, which is compatible with the page builder's column configurations.
The API call accepts a template
object, which is required to successfully perform the /simple-to-full-json
API call. The following table describes this required object.
template
JSON
Yes
The following code snippet shows the template object as the body of the POST
request.
The following table lists and describes both required and optional object parameters nested within the mandatory template
object. This template
object is the body of the POST
request for the API call.
type
String
✅ Yes
Specifies the template type. Possible values include: email
, page
, popup
.
rows
Array
✅ Yes
settings
Object
❌ No
metadata
Object
❌ No
The following code snippet shows the optional settings
object nested within the template
object in the body of the POST
request.
The following table lists and describes optional object parameters nested within the settings
object. The settings object is nested within the mandatory template
object.
linkColor
String
❌ No
The default color of the links within the template.
backgroundColor
String
❌ No
The background color of the template.
contentAreaBackgroundColor
String
❌ No
The background color of the content area.
width
integer
❌ No
Important: The width of the template must be between 320 and 1440 pixels.
The following code snippet shows the optional metadata
object nested within the template
object in the body of the POST
request.
The following table lists and describes optional object parameters nested within the metadata
object. The metadata
object is nested within the mandatory template
object.
lang
string
❌ No
The language code of the template (for example, "en"
, "fr"
).
title
string
❌ No
The title of the template.
description
string
❌ No
A short description of the template.
subject
string
❌ No
The subject line of the email (if applicable).
preheader
string
❌ No
The preheader text for the email (if applicable).
Simple Schema is available on .
This section discusses what the /simple-to-full-json
endpoint is and how you can use it for AI-driven designs. Beefree SDK template JSON is long and includes many properties. For this reason, it does not provide the best structure for training AI models in workflows that include AI-driven design creation. Beefree SDK's is a lightweight alternative that is optimized for training AI models. , which is several lines shorter than Beefree SDK's template JSON, is a great solution for AI-generated schemas. This endpoint accepts as the body of the POST
request, and returns the full Beefree SDK template JSON, which can then be loaded in the Beefree SDK editor for an end user to view and edit accordingly. There are many creative ways to use and implement this endpoint, because it provides a pathway to programmatically creating full Beefree SDK-compatible templates completely outside of the Beefree SDK builder.
A Beefree SDK template in simple JSON format ().
Note: The describes the request parameters, and the template object structure.
Array containing at least one row. Reference the .
Configuration settings. Reference the section for more information.
Metadata information. Reference the for more information.
Convert a page JSON template to an email JSON template, and ensure compatibility throughout the conversion process by removing or adjusting unsupported blocks.
The collection ID or name
An integer field for disableHtmlSanitizer
Convert an email JSON template to a page JSON template, and ensure compatibility throughout the conversion process by removing or adjusting unsupported blocks.
The collection ID or name