LogoLogo
Try it outResourcesAPIsAddOnsBook a demo
  • Getting Started
    • Introduction to Beefree SDK
      • Create an Application
      • Installation and Fundamentals
        • Configuration parameters
          • Configuration Reload
          • Workspaces
          • Debugging the Beefree SDK Editor
        • Methods and Events
        • Authorization Process
        • How the UID parameter works
        • Set up two-factor authentication
        • Naming conventions
      • Development Applications
      • Manage Users
      • Manage Subscriptions
      • Installation and Fundamentals
    • Tracking Message Changes
    • Sample Code
    • Release Candidate Environment
  • Visual Builders
    • Email Builder
    • Page Builder
      • Integrating Page Builder
      • Embedding videos in a page
    • Popup Builder
      • Popup Builder - Getting Started
      • Testing and Integrating
      • Setting layout and size
        • Advanced settings
    • AI-Driven Design Creation
  • APIs
    • Content Services API
      • Authentication
      • Export
      • Convert
      • Row Processing
      • AI Collection
      • Brand Style
    • Template Catalog API
      • Authentication
      • Templates
      • Categories
      • Collections
      • Designers
      • Tags
    • HTML Importer API
      • Authentication
      • Import HTML
  • Forms
    • Form Block
    • Integrating and using the Form block
      • Passing forms to the builder
      • Form structure and parameters
      • Form layout customization
      • Allowed form fields
      • Edit form field modal
  • Rows
    • Reusable Content
      • Create Reusable Content
        • Pre-build Reusable Content
          • Implement Custom Rows
        • Save Reusable Content
          • Implement Hosted Saved Rows
          • Implement Self-hosted Saved Rows
            • Self-hosted Saved Rows Concepts and Tutorial
      • Sync Reusable Content
        • Implement Synced Rows
        • Initialize Edit Single Row Mode
      • Manage Reusable Content
    • Storage for Reusable Content
      • Hosted Saved Rows
      • Self-Hosted Saved Rows
  • File manager
    • File manager application overview
      • Mime Types and Groups
  • Server-side configurations
    • Server-side options
      • Toolbar options
      • Storage options
        • Configure your AWS S3 bucket
        • Connect your file storage system
      • Content options
      • Services options
      • Undo & Changes history
      • Custom JavaScript Libraries Injection
  • Other Customizations
    • Advanced options
      • Special Links and Merge Tags
      • Content Dialog
      • Custom Color Palette
      • Font management
      • Roles and Permissions
      • Smart Merge Tags
      • Commenting
      • Custom Attributes
      • Meta Tags
      • Custom Languages
      • Display Conditions
      • Advanced Permissions
      • Custom File Picker
      • Custom Headers
    • Appearance
      • Content Defaults
      • Custom Sidebar Position
      • Content Tile Sorting
      • Content Tile Grouping
      • Loading Spinner Theme
      • Custom Tab Layout
      • Themes
      • Custom CSS
        • Change Log
    • AMP for Email
    • Collaborative Editing
      • Co-editing Integration Guide
    • Mobile Design Mode
    • Multi-language Templates
    • Cards Style and Image Round Corners
    • Hover Effect for Buttons
    • Content Area Padding
    • Line Height
  • Data Structures
    • Getting Started
    • Schema Catalog
    • Simple Schema
      • Template Schema
      • Definitions Schema
      • Row Schema
      • Column Schema
      • Title Schema
      • Image Schema
      • Button Schema
      • Paragraph Schema
      • HTML Schema
      • Menu Schema
      • List Schema
      • Icon Schema
      • Divider Schema
    • Row Metadata
    • Form Validation Schema
    • Comments Schema
      • Change Schema for Comments
  • Builder AddOns
    • AddOns
      • AddOns Overview
      • Partner AddOns
        • Partner AddOns directory
        • Installing Partner AddOns
        • DeepL
        • Stability AI
        • Azure AI Vision - Image Analysis
          • Alternate Text Generation with AI
          • AI Alt Text Bulk Generation
        • AI Writing Assistant
          • Available Providers
            • OpenAI
            • Azure OpenAI
            • Anthropic
          • AI Providers and Data Security
          • AI-Generated Meta Tag Fields
          • Token Upselling
          • Apply a Brand Tone
        • Custom AI Writing Assistant
      • Custom AddOns
        • AddOn Development
        • Contribute to the Partner AddOn Marketplace
      • AddOns Configuration
      • AddOn FAQs
  • Resources
    • Error Management
      • onWarning
      • Beefree SDK Editor Errors
      • File System Provider errors
      • JSON Parser errors
      • Template Validation and Update
      • Template validation and update errors
    • Scheduled maintenances
Powered by GitBook
LogoLogo

Policies

  • Privacy & Cookies
  • Terms of Services
  • GDPR Compliance
  • Trust Center

Contact Us

  • Submit a request
  • Book a demo
  • Report a security issue

Resources

  • Developer website
  • Create a Developer Account

© Bee Content Design, Inc. San Francisco, CA | Part of Growens

On this page

Was this helpful?

Export as PDF
  1. APIs
  2. Content Services API

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.

PreviousExportNextRow Processing

Last updated 15 days ago

Was this helpful?

Conversion Collection

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.

Email to Page Conversion: Important Behaviors

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.

Page to Email Conversion: Important Behaviors

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:

    {
      "disableHtmlSanitizer": true,
      "template": { "page": ... }
    }
  • Handle Multi-Column Layouts The email builder supports up to 12 columns, which is compatible with the page builder's column configurations.

Simple to Full JSON

Request Parameters

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.

Name
Type
Required
Description

template

JSON

Yes

The following code snippet shows the template object as the body of the POST request.

{
  “template”:{...}
}

Object Parameters Nested within the Template Object

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.

Name
Type
Required
Description

type

String

✅ Yes

Specifies the template type. Possible values include: email, page, popup.

rows

Array

✅ Yes

settings

Object

❌ No

metadata

Object

❌ No

Settings Object Parameters

The following code snippet shows the optional settings object nested within the template object in the body of the POST request.

{
  “template”:{
    "settings":{...},
    ...
  }
}

The following table lists and describes optional object parameters nested within the settings object. The settings object is nested within the mandatory template object.

Name
Type
Required
Description

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.

Metadata Object Parameters

The following code snippet shows the optional metadata object nested within the template object in the body of the POST request.

{
  “template”:{
    "metadata":{...},
    ...
  }
}

The following table lists and describes optional object parameters nested within the metadata object. The metadata object is nested within the mandatory template object.

Name
Type
Required
Description

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.

Superpowers and Enterprise plans
Simple schema
Simple schema
Simple schema
simple template JSON schema
see the schema in GitHub
simple row schema
Settings Object Parameters
Metadata Object Parameters section
Simple Schema
Email to Page
Page to Email

Convert Email JSON to Page JSON

post

Convert an email JSON template to a page JSON template, and ensure compatibility throughout the conversion process by removing or adjusting unsupported blocks.

Authorizations
Path parameters
collectionstringRequired

The collection ID or name

Body
Responses
200
Successful response
application/json
Responseobject
400
Bad request
401
Unauthorized
403
Forbidden
500
Internal Server Error
post
POST /v1/{collection}/email-to-page HTTP/1.1
Host: api.getbee.io
Authorization: Bearer Enter Dev Console API Key as Bearer token
Content-Type: application/json
Accept: */*
Content-Length: 3810

{
  "template": {
    "page": {
      "body": {
        "container": {
          "style": {
            "background-color": "#FFFFFF"
          }
        },
        "content": {
          "computedStyle": {
            "linkColor": "#0068A5",
            "messageBackgroundColor": "transparent",
            "messageWidth": "500px"
          },
          "style": {
            "color": "#000000",
            "font-family": "Arial, Helvetica, sans-serif"
          }
        },
        "type": "mailup-bee-page-properties",
        "webFonts": []
      },
      "description": "Empty template for BEE",
      "rows": [
        {
          "columns": [
            {
              "grid-columns": 12,
              "modules": [
                {
                  "type": "mailup-bee-newsletter-modules-paragraph",
                  "descriptor": {
                    "paragraph": {
                      "html": "<p>I'm a new paragraph block.</p>",
                      "style": {
                        "color": "#000000",
                        "font-size": "14px",
                        "font-family": "inherit",
                        "font-weight": "400",
                        "line-height": "120%",
                        "text-align": "left",
                        "direction": "ltr",
                        "letter-spacing": "0px"
                      },
                      "computedStyle": {
                        "linkColor": "#0068A5",
                        "paragraphSpacing": "16px"
                      }
                    },
                    "style": {
                      "padding-top": "10px",
                      "padding-right": "10px",
                      "padding-bottom": "10px",
                      "padding-left": "10px"
                    },
                    "mobileStyle": {},
                    "computedStyle": {
                      "hideContentOnAmp": false,
                      "hideContentOnHtml": false,
                      "hideContentOnDesktop": false,
                      "hideContentOnMobile": false
                    }
                  },
                  "uuid": "c8ecedba-4891-46fa-9aec-1f4ef3276914",
                  "locked": false
                },
                {
                  "type": "mailup-bee-newsletter-modules-image",
                  "descriptor": {
                    "image": {
                      "alt": "",
                      "src": "https://d153pg9b3vec03.cloudfront.net/public/users/Integrators/41032f14-a2c0-4389-842f-81e67db90a66/Marco/download.png",
                      "href": "",
                      "target": "_blank",
                      "width": "110px",
                      "height": "110px"
                    },
                    "style": {
                      "width": "100%",
                      "border-radius": "0px",
                      "padding-top": "0px",
                      "padding-right": "0px",
                      "padding-bottom": "0px",
                      "padding-left": "0px"
                    },
                    "computedStyle": {
                      "class": "center autowidth",
                      "width": "110px",
                      "hideContentOnMobile": false
                    },
                    "mobileStyle": {}
                  },
                  "uuid": "bf5b394e-e238-40cf-9c45-69866139490c",
                  "locked": false
                },
                {
                  "type": "mailup-bee-newsletter-modules-table",
                  "descriptor": {
                    "table": {
                      "content": {
                        "headers": [
                          {
                            "cells": [
                              {
                                "html": "a"
                              },
                              {
                                "html": "a"
                              },
                              {
                                "html": "a"
                              }
                            ]
                          }
                        ],
                        "rows": [
                          {
                            "cells": [
                              {
                                "html": "Add text"
                              },
                              {
                                "html": ""
                              },
                              {
                                "html": ""
                              }
                            ]
                          },
                          {
                            "cells": [
                              {
                                "html": ""
                              },
                              {
                                "html": ""
                              },
                              {
                                "html": ""
                              }
                            ]
                          },
                          {
                            "cells": [
                              {
                                "html": ""
                              },
                              {
                                "html": ""
                              },
                              {
                                "html": ""
                              }
                            ]
                          }
                        ]
                      },
                      "style": {
                        "color": "#000000",
                        "font-size": "14px",
                        "font-family": "inherit",
                        "font-weight": "400",
                        "line-height": "120%",
                        "text-align": "left",
                        "direction": "ltr",
                        "letter-spacing": "0px",
                        "background-color": "transparent",
                        "border-top": "1px solid #dddddd",
                        "border-right": "1px solid #dddddd",
                        "border-bottom": "1px solid #dddddd",
                        "border-left": "1px solid #dddddd"
                      },
                      "computedStyle": {
                        "linkColor": "#0068A5",
                        "headersFontSize": "14px",
                        "headersFontWeight": "400",
                        "headersTextAlign": "left",
                        "headersBackgroundColor": "#EAEAEA",
                        "headersColor": "#505659"
                      }
                    },
                    "style": {
                      "padding-top": "10px",
                      "padding-right": "10px",
                      "padding-bottom": "10px",
                      "padding-left": "10px"
                    },
                    "mobileStyle": {},
                    "computedStyle": {
                      "hideContentOnAmp": false,
                      "hideContentOnHtml": false,
                      "hideContentOnDesktop": false,
                      "hideContentOnMobile": false
                    }
                  },
                  "uuid": "77957748-6069-40bd-9342-14f0b514f244",
                  "locked": false
                }
              ],
              "style": {
                "background-color": "transparent",
                "border-bottom": "0px solid transparent",
                "border-left": "0px solid transparent",
                "border-right": "0px solid transparent",
                "border-top": "0px solid transparent",
                "padding-bottom": "5px",
                "padding-left": "0px",
                "padding-right": "0px",
                "padding-top": "5px"
              },
              "uuid": "9cb47b70-8e2f-4e12-b79b-511f3c7b0dae"
            }
          ],
          "container": {
            "style": {
              "background-color": "transparent",
              "background-image": "none",
              "background-position": "top left",
              "background-repeat": "no-repeat"
            }
          },
          "content": {
            "computedStyle": {
              "hideContentOnDesktop": false,
              "hideContentOnMobile": false,
              "rowColStackOnMobile": true,
              "rowReverseColStackOnMobile": false,
              "verticalAlign": "top"
            },
            "style": {
              "background-color": "transparent",
              "background-image": "none",
              "background-position": "top left",
              "background-repeat": "no-repeat",
              "color": "#000000",
              "width": "500px"
            }
          },
          "empty": false,
          "locked": false,
          "synced": false,
          "type": "row-1-columns-12",
          "uuid": "ae43b807-1a9d-4f1f-888d-798f74ec54b3"
        }
      ],
      "template": {
        "name": "template-base",
        "type": "basic",
        "version": "2.0.0"
      },
      "title": "Empty Template"
    }
  }
}
{
  "message": "Success"
}
  • Conversion Collection
  • Email to Page Conversion: Important Behaviors
  • POSTConvert Email JSON to Page JSON
  • Page to Email Conversion: Important Behaviors
  • POSTConvert Page JSON to Email JSON
  • Simple to Full JSON

Convert Page JSON to Email JSON

post

Convert a page JSON template to an email JSON template, and ensure compatibility throughout the conversion process by removing or adjusting unsupported blocks.

Authorizations
Path parameters
collectionstringRequired

The collection ID or name

Body
disableHtmlSanitizerintegerOptional

An integer field for disableHtmlSanitizer

Responses
200
Successful response
application/json
Responseobject
400
Bad request
401
Unauthorized
403
Forbidden
500
Internal Server Error
post
POST /v1/{collection}/page-to-email HTTP/1.1
Host: api.getbee.io
Authorization: Bearer Enter Dev Console API Key as Bearer token
Content-Type: application/json
Accept: */*
Content-Length: 2705

{
  "disableHtmlSanitizer": true,
  "template": {
    "page": {
      "body": {
        "container": {
          "style": {
            "background-color": "#FFFFFF"
          }
        },
        "content": {
          "computedStyle": {
            "linkColor": "#0068A5",
            "messageBackgroundColor": "transparent",
            "messageWidth": "500px"
          },
          "style": {
            "color": "#000000",
            "font-family": "Arial, Helvetica, sans-serif"
          }
        },
        "type": "mailup-bee-page-properties",
        "webFonts": []
      },
      "description": "Empty template for BEE",
      "rows": [
        {
          "columns": [
            {
              "grid-columns": 12,
              "modules": [
                {
                  "type": "mailup-bee-newsletter-modules-html",
                  "descriptor": {
                    "html": {
                      "html": "<div class=\"our-class\"><script>console.log(\"ok\");</script>test 1</div>"
                    },
                    "style": {
                      "padding-top": "0px",
                      "padding-right": "0px",
                      "padding-bottom": "0px",
                      "padding-left": "0px"
                    },
                    "computedStyle": {
                      "hideContentOnMobile": false,
                      "hideContentOnDesktop": false,
                      "hideContentOnAmp": false,
                      "hideContentOnHtml": false
                    }
                  },
                  "uuid": "f6c6a079-dd90-4589-8855-93dfdf74461d",
                  "locked": false
                }
              ],
              "style": {
                "background-color": "transparent",
                "border-bottom": "0px solid transparent",
                "border-left": "0px solid transparent",
                "border-right": "0px solid transparent",
                "border-top": "0px solid transparent",
                "padding-bottom": "5px",
                "padding-left": "0px",
                "padding-right": "0px",
                "padding-top": "5px"
              },
              "uuid": "cbd74fa2-b853-449e-88b8-f34195441c05"
            },
            {
              "grid-columns": 12,
              "modules": [
                {
                  "type": "mailup-bee-newsletter-modules-html",
                  "descriptor": {
                    "html": {
                      "html": "<div class=\"our-class\"><script>console.log(\"ok\");</script>test 2</div>"
                    },
                    "style": {
                      "padding-top": "0px",
                      "padding-right": "0px",
                      "padding-bottom": "0px",
                      "padding-left": "0px"
                    },
                    "computedStyle": {
                      "hideContentOnMobile": false,
                      "hideContentOnDesktop": false,
                      "hideContentOnAmp": false,
                      "hideContentOnHtml": false
                    }
                  },
                  "uuid": "f6c6a079-dd90-4589-8855-93dfdf74461d",
                  "locked": false
                }
              ],
              "style": {
                "background-color": "transparent",
                "border-bottom": "0px solid transparent",
                "border-left": "0px solid transparent",
                "border-right": "0px solid transparent",
                "border-top": "0px solid transparent",
                "padding-bottom": "5px",
                "padding-left": "0px",
                "padding-right": "0px",
                "padding-top": "5px"
              },
              "uuid": "cbd74fa2-b853-449e-88b8-f34195441c05"
            }
          ],
          "container": {
            "style": {
              "background-color": "transparent",
              "background-image": "none",
              "background-position": "top left",
              "background-repeat": "no-repeat"
            }
          },
          "content": {
            "computedStyle": {
              "hideContentOnDesktop": false,
              "hideContentOnMobile": false,
              "rowColStackOnMobile": true,
              "rowReverseColStackOnMobile": false,
              "verticalAlign": "top"
            },
            "style": {
              "background-color": "transparent",
              "background-image": "none",
              "background-position": "top left",
              "background-repeat": "no-repeat",
              "color": "#000000",
              "width": "500px"
            }
          },
          "empty": false,
          "locked": false,
          "synced": false,
          "type": "row-1-columns-12",
          "uuid": "d0a914f7-7212-41c6-9372-c954886e6bd4"
        }
      ],
      "template": {
        "name": "template-base",
        "type": "basic",
        "version": "2.0.0"
      },
      "title": "Empty Template"
    }
  }
}
{
  "message": "Success"
}