Content Services API Reference
The Content Services API Reference provides a comprehensive guide to utilizing the Content Services API, which leverages the REST architecture and HTTP protocol for making API calls. This reference document outlines the available collections, including /message
, /page
, /popup
, /amp
, /template
, and /ai
, detailing the resources for each collection. For every resource, this document includes its description, parameters, and example responses and requests.
API Key
To use the Content Services API you will first need to obtain a your API Key from the Beefree SDK Console.
To obtain an API Key, take the following steps:
Log into the Beefree SDK Console
Locate the application that you wish to work with, and click on Details
Locate the Content Services API section and click Create New API Key
Acknowledge the message that reminds you that if you exceed the number of API calls included in your plan, you may be charged for overages and click Create Key
Your API key will appear under the Content services API section of your application details.

The Content Services API uses API Keys to authenticate requests for resources. You can manage your API Keys within the Beefree SDK Console. All requests must be made over HTTPS and contain the following HTTP Header:
Authorization:
Bearer {token}
Rate Limits
API requests rate limits exist independently of API key’s monthly usage allowance.
By default, the API has the following rate limits:
Per minute: 500 requests
Per second: 100 requests
X-Rate-Limit: An integer representing the total number of requests available per cycle. Exceeding the limit per cycle results in a 429 error. (e.g. 500)
X-Rate-Limit-Remaining: An integer representing the number of remaining requests before the next cycle begins, and the count resets. (e.g. 100)
X-Rate-Limit-Reset: A Unix timestamp representing the time the next cycle will begin, and the count will reset.
Retry-After: A Unix timestamp representing the time the application may resume submitting requests.
API Root
All API access is over HTTPS, and accessed from the following URL:
https://api.getbee.io/v1/{collection}/{resource}
Collections
The following table lists the available collection option and corresponding resources for each collection.
/message
html
, pdf
, images
, merge
, index, plain-text
/page
html
, pdf
, images
, merge
, index
/popup
html
/amp
html
/template
brand
/ai
metadata
, sms
, summary
Example URLs
The following table provides a few examples of URLs you can use to make specific types of requests.
Request HTML for email
https://api.getbee.io/v1/message/html
Landing Page
Request HTML for a landing page
https://api.getbee.io/v1/page/html
Popup
Request HTML for a popup
https://api.getbee.io/v1/popup/html
AMP
Request HTML for AMP
https://api.getbee.io/v1/amp/html
Resources
The following section provides detailed information for each of the resources associated with each collection mentioned in the previous section.
HTML
URL: https://api.getbee.io/v1/{collection}/html
Transform a JSON template into an HTML response.
The collection ID or name
Flag to return beautified HTML
For multi-language templates, sets the output language using a valid language code
POST /v1/{collection}/html HTTP/1.1
Host: api.getbee.io
Authorization: Bearer Enter Dev Console API Key as Bearer token
Content-Type: application/json
Accept: */*
Content-Length: 1017
{
"beautifyHtmlEnabled": true,
"language": "text",
"page": {
"body": {
"container": {
"style": {
"backgroundColor": "#FFFFFF"
}
},
"content": {
"computedStyle": {
"linkColor": "#FF819C",
"messageBackgroundColor": "transparent",
"messageWidth": "675px"
},
"style": {
"color": "#000000",
"fontFamily": "Arial, Helvetica Neue, Helvetica, sans-serif"
}
}
},
"webFonts": [
{
"fontFamily": "'Montserrat', 'Trebuchet MS', 'Lucida Grande', 'Lucida Sans Unicode', 'Lucida Sans', Tahoma, sans-serif",
"name": "Montserrat",
"url": "https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&display=swap"
}
],
"description": "BF-ecommerce-template",
"rows": [
{
"columns": [
{
"gridColumns": 6,
"modules": [
{
"moduleDescriptor": {
"computedStyle": {
"cssClass": "left fixedwidth",
"width": "287px"
},
"image": {
"alt": "Image",
"height": "142px",
"href": "https://beefree.io",
"src": "https://ih1.redbubble.net/image.4902607927.7016/flat,750x,075,f-pad,750x1000,f8f8f8.jpg",
"width": "546px"
}
}
}
]
}
]
}
],
"template": {
"name": "template-base",
"type": "basic",
"version": "2.0.0"
},
"title": "BF-ecommerce-template"
}
}
The HTML response
<!DOCTYPE html>
<html lang="en">
<head>
<title></title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>/* Styles here */</style>
</head>
<body>
<!-- HTML content here -->
</body>
</html>
Plain Text
Endpoint: /message/plain-text
This endpoint accepts a JSON template to create a plain text version of an email.
Optional. The output language for multi-language templates.
POST /v1/message/plain-text HTTP/1.1
Host: api.getbee.io
Authorization: Bearer Enter Dev Console API Key as Bearer token
Content-Type: application/json
Accept: */*
Content-Length: 1241
{
"language": "it-IT",
"page": {
"body": {
"container": {
"style": {
"background-color": "#fff",
"background-image": "none",
"background-position": "top left",
"background-repeat": "no-repeat",
"background-size": "auto"
}
},
"content": {
"computedStyle": {
"linkColor": "#8a3b8f",
"messageBackgroundColor": "transparent",
"messageWidth": "650px"
},
"style": {
"color": "#000000",
"font-family": "Lato, Tahoma, Verdana, Segoe, sans-serif"
}
}
},
"rows": [
{
"columns": [
{
"grid-columns": 12,
"modules": [
{
"descriptor": {
"computedStyle": {
"align": "center",
"hideContentOnMobile": false
},
"divider": {
"style": {
"border-top": "0px solid transparent",
"height": "10px",
"width": "100%"
}
},
"style": {
"padding-bottom": "0px",
"padding-left": "0px",
"padding-right": "0px",
"padding-top": "0px"
}
},
"locked": false,
"type": "mailup-bee-newsletter-modules-divider",
"uuid": "b89c3d25-dbec-439a-8ad1-4939a28678e9"
}
],
"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": "0px",
"padding-left": "0px",
"padding-right": "0px",
"padding-top": "0px"
},
"uuid": "3bd72010-5175-4326-b848-8beacea852d6"
}
]
}
],
"template": {
"name": "template-base",
"type": "basic",
"version": "2.0.0"
},
"title": ""
}
}
[BEE Pro Logo](https://beefree.io/)
*****************************
Hi 😊 **Would you be interested to participate in a user research project with us?**
PDF
URL: https://api.getbee.io/v1/{collection}/pdf
This endpoint accepts HTML and settings to generate a PDF document and provides a URL for the PDF.
The file type for the output.
PDF
Possible values: A full HTML document to be transformed into a PDF.
The orientation of the PDF page.
landscape
Possible values: The size of the PDF page.
letter
Possible values: POST /v1/{collection}/pdf HTTP/1.1
Host: api.getbee.io
Authorization: Bearer Enter Dev Console API Key as Bearer token
Content-Type: application/json
Accept: */*
Content-Length: 477
{
"html": "<!DOCTYPE html><html lang='en'><head><meta charset='UTF-8'><title>PDF Output</title></head><body style='font-family: Arial, sans-serif;'><header style='text-align: center; margin-top: 20px;'><h1 style='font-size: 36px; color: #4CAF50;'>The Incredible World of Cats</h1></header><main style='margin: 40px;'><p style='font-size: 18px; line-height: 1.6;'>Cats are truly fascinating creatures...</p></main></body></html>",
"page_orientation": "landscape",
"page_size": "Full"
}
{
"body": {
"content_type": "application/pdf",
"filename": "7qMsRsxTz8.pdf",
"page_orientation": "landscape",
"page_size": "Full",
"url": "https://pro-bee-beepro-pdf.s3.amazonaws.com/public/pdf/7qMsRsxTz8.pdf"
},
"statusCode": 200
}
Image
URL: https://api.getbee.io/v1/{collection}/image
Transform HTML and image settings into an image.
The collection ID or name
Accepts jpg or png
The image height in pixels
A BeeFree HTML message
Image size if width and height are not defined
The image width in pixels
POST /v1/{collection}/image HTTP/1.1
Host: api.getbee.io
Authorization: Bearer Enter Dev Console API Key as Bearer token
Content-Type: application/json
Accept: */*
Content-Length: 214
{
"file_type": "png",
"html": "<!DOCTYPE html><html lang='en'><head><meta charset='utf-8'><title>Simple HTML</title></head><body><h1>Hello World!</h1><p>This is a simple HTML response.</p></body></html>",
"size": "1000"
}
The image response as a binary data in PNG format
�PNG...
Merge
URL: https://api.getbee.io/v1/{collection}/merge
Replace or update content in the template using a specific path and value.
POST /v1/{collection}/merge HTTP/1.1
Host: api.getbee.io
Authorization: Bearer Enter Dev Console API Key as Bearer token
Content-Type: application/json
Accept: */*
Content-Length: 415
{
"replace": [
{
"path": "$..rows[?(@.metadata.uid=='508824c4-8d45-11ee-84be-aafd6b2aca16')]",
"value": {
"columns": [
{
"grid-columns": 4,
"modules": [
{
"descriptor": {
"computedStyle": {},
"image": {},
"paragraph": {}
},
"type": "mailup-bee-newsletter-modules-paragraph"
}
],
"style": {
"background-color": "transparent"
}
}
],
"container": {
"displayCondition": {}
},
"content": {},
"metadata": {
"uid": "508824c4-8d45-11ee-84be-aafd6b2aca16"
},
"type": ""
}
}
]
}
{
"html": "text",
"json": {
"page": {
"body": {},
"rows": [
{}
],
"template": {},
"title": "text"
},
"comments": {}
}
}
Merge Rows
URL: https://api.getbee.io/v1/{collection}/merge-rows
The Merge Rows endpoint enables you to integrate custom fonts and resized images into your designs. It saves custom fonts within the template's JSON, ensuring the correct font is displayed. It also handles image resizing, particularly when the image's initial template width is narrower than the saved row's destination template. To use this endpoint, send your template and rows in JSON format. You will receive a response with an updated template. The rows requiring an update are identified by their rowIdentifier values.
The collection ID or name
Label for identifying rows, usually GUID
A Beefree template in JSON format
POST /v1/{collection}/merge-rows HTTP/1.1
Host: api.getbee.io
Authorization: Bearer Enter Dev Console API Key as Bearer token
Content-Type: application/json
Accept: */*
Content-Length: 1749
{
"rowIdentifierLabel": "guid",
"rows": [
{
"columns": [
{
"grid-columns": 12,
"modules": [
{
"descriptor": {
"computedStyle": {
"hideContentOnAmp": false,
"hideContentOnDesktop": false,
"hideContentOnHtml": false,
"hideContentOnMobile": false
},
"paragraph": {
"computedStyle": {
"linkColor": "#7747FF",
"paragraphSpacing": "16px"
},
"html": "<p>Updated paragraph block.</p>",
"style": {
"color": "#101112",
"direction": "ltr",
"font-family": "'Alegreya', 'Trebuchet MS', Helvetica, sans-serif",
"font-size": "16px",
"font-weight": "400",
"letter-spacing": "0px",
"line-height": "120%",
"text-align": "left"
}
},
"style": {
"padding-bottom": "10px",
"padding-left": "10px",
"padding-right": "10px",
"padding-top": "10px"
}
},
"locked": false,
"type": "mailup-bee-newsletter-modules-paragraph",
"uuid": "29cd2a3d-fd76-4537-a91b-b8cb9872d8a3"
}
],
"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": "56119ad2-574d-4122-8dd1-c1152b5f4879"
}
]
}
],
"template": {
"page": {
"body": {
"container": {
"style": {
"background-color": "#ffffff"
}
},
"content": {
"computedStyle": {
"linkColor": "#7747FF",
"messageBackgroundColor": "transparent",
"messageWidth": "600px"
},
"style": {
"color": "#000000",
"font-family": "Arial, Helvetica, sans-serif"
}
},
"webFonts": [
{
"fontFamily": "'Alegreya', 'Trebuchet MS', Helvetica, sans-serif",
"name": "Alegreya",
"url": "https://fonts.googleapis.com/css2?family=Alegreya:wght@100;200;300;400;500;600;700;800;900"
},
{
"fontFamily": "'Arvo', 'Courier New', Courier, monospace",
"name": "Arvo",
"url": "https://fonts.googleapis.com/css2?family=Arvo:wght@100;200;300;400;500;600;700;800;900"
}
]
}
},
"title": ""
}
}
Updated template with merged rows
{
"template": {
"page": {
"body": {
"container": {
"style": {
"background-color": "#ffffff"
}
},
"content": {
"computedStyle": {
"linkColor": "#7747FF",
"messageBackgroundColor": "transparent",
"messageWidth": "600px"
},
"style": {
"color": "#000000",
"font-family": "Arial, Helvetica, sans-serif"
}
},
"webFonts": [
{
"fontFamily": "'Alegreya', 'Trebuchet MS', Helvetica, sans-serif",
"name": "Alegreya",
"url": "https://fonts.googleapis.com/css2?family=Alegreya:wght@100;200;300;400;500;600;700;800;900"
},
{
"fontFamily": "'Arvo', 'Courier New', Courier, monospace",
"name": "Arvo",
"url": "https://fonts.googleapis.com/css2?family=Arvo:wght@100;200;300;400;500;600;700;800;900"
}
]
},
"rows": [
{
"columns": [
{
"grid-columns": 12,
"modules": [
{
"descriptor": {
"paragraph": {
"html": "<p>Updated paragraph block.</p>",
"style": {
"color": "#101112",
"font-family": "'Alegreya', 'Trebuchet MS', Helvetica, sans-serif",
"font-size": "16px"
}
}
}
}
]
}
]
}
],
"warnings": [
{
"msg": "No merges were completed for row with identifier 0922fb70-f97e-4ae8-bcfe-0be9fd09a0d5"
}
]
}
}
}
Synced Rows
URL: https://api.getbee.io/v1/{collection}/synced-rows
Retrieve a list of synced rows from a template.
The collection name.
The label used for identifying the rows added to the metadata key, usually GUID.
POST /v1/{collection}/synced-rows HTTP/1.1
Host: api.getbee.io
Authorization: Bearer Enter Dev Console API Key as Bearer token
Content-Type: application/json
Accept: */*
Content-Length: 812
{
"rowIdentifierLabel": "guid",
"template": {
"page": {
"body": {
"container": {
"style": {
"background-color": "#ffffff"
}
},
"content": {
"computedStyle": {
"linkColor": "#7747FF",
"messageBackgroundColor": "transparent",
"messageWidth": "600px"
},
"style": {
"color": "#000000",
"font-family": "Arial, Helvetica, sans-serif"
}
}
},
"rows": [
{
"columns": [
{
"grid-columns": 12,
"modules": [
{
"descriptor": {
"paragraph": {
"html": "<p>I'm a new paragraph block.</p>",
"style": {
"color": "#101112",
"font-family": "'Alegreya', 'Trebuchet MS', Helvetica, sans-serif",
"font-size": "16px"
}
}
}
}
],
"metadata": {
"guid": "0922fb70-f97e-4ae8-bcfe-0be9fd09a0d5"
},
"synced": true
}
]
}
]
},
"webFonts": [
{
"fontFamily": "'Alegreya', 'Trebuchet MS', Helvetica, sans-serif",
"name": "Alegreya",
"url": "https://fonts.googleapis.com/css2?family=Alegreya:wght@100;200;300;400;500;600;700;800;900"
}
]
}
}
{
"syncedRows": [
{
"rowIdentifier": "0922fb70-f97e-4ae8-bcfe-0be9fd09a0d5",
"rowIndex": 0
}
]
}
Index
URL: https://api.getbee.io/v1/{collection}/merge/index
Reference an array of metadata objects from a Beefree template in JSON format.
The collection ID or name
A Beefree template in JSON format
POST /v1/{collection}/merge/index HTTP/1.1
Host: api.getbee.io
Authorization: Bearer Enter Dev Console API Key as Bearer token
Content-Type: application/json
Accept: */*
Content-Length: 1987
{
"source": {
"page": {
"body": {
"container": {
"style": {
"background-color": "#FFFFFF"
}
},
"content": {
"computedStyle": {
"linkColor": "#FF819C",
"messageBackgroundColor": "transparent",
"messageWidth": "675px"
},
"style": {
"color": "#000000",
"font-family": "Arial, 'Helvetica Neue', Helvetica, sans-serif"
}
},
"type": "mailup-bee-page-properties",
"webFonts": [
{
"fontFamily": "'Montserrat', 'Trebuchet MS', 'Lucida Grande', 'Lucida Sans Unicode', 'Lucida Sans', Tahoma, sans-serif",
"name": "Montserrat",
"url": "https://fonts.googleapis.com/css?family=Montserrat"
}
]
},
"description": "BF-ecommerce-template",
"rows": [
{
"columns": [
{
"grid-columns": 6,
"modules": [
{
"descriptor": {
"computedStyle": {
"class": "center fixedwidth",
"width": 338
},
"image": {
"alt": "Image",
"href": "https://beefree.io",
"src": "https://d1oco4z2z1fhwp.cloudfront.net/templates/default/113/logo_1.png"
},
"style": {
"padding-bottom": "0px",
"padding-left": "15px",
"padding-right": "15px",
"padding-top": "5px",
"width": "100%"
}
},
"locked": false,
"type": "mailup-bee-newsletter-modules-image"
},
{
"descriptor": {
"computedStyle": {
"align": "center",
"hideContentOnMobile": true
},
"divider": {
"style": {
"border-top": "0px solid transparent",
"height": "20px",
"width": "100%"
}
},
"style": {
"padding-bottom": "10px",
"padding-left": "10px",
"padding-right": "10px",
"padding-top": "10px"
}
},
"locked": false,
"type": "mailup-bee-newsletter-modules-divider"
}
],
"style": {
"background-color": "transparent",
"padding-bottom": "0px",
"padding-left": "0px",
"padding-right": "0px",
"padding-top": "30px"
}
}
],
"container": {
"style": {
"background-color": "#FF819C",
"background-image": "none",
"background-position": "top left",
"background-repeat": "no-repeat"
}
},
"content": {
"computedStyle": {
"hideContentOnDesktop": false,
"hideContentOnMobile": false,
"rowColStackOnMobile": true
},
"style": {
"background-color": "transparent",
"color": "#333",
"width": "675px"
}
},
"locked": false,
"metadata": {
"guid": "test3",
"name": "demo3"
},
"type": "two-columns-empty"
}
],
"template": {
"name": "template-base",
"type": "basic",
"version": "2.0.0"
},
"title": "BF-ecommerce-template"
}
}
}
An array of metadata objects containing row details
[
{
"guid": "test3",
"name": "demo3"
}
]
AI Collection
The resources in the AI collection accept your template JSON and use generative AI to return text within a JSON object to you.
Prerequisites
Prior to getting started with the resources in this collection, ensure you have the following:
Superpowers subscription or higher
OpenAI AddOn installed and configured in your Beefree Developer Console
Content Services API key
Metadata (Preheader and Subject)
v1/ai/metadata
The endpoint accepts a JSON template and returns a JSON object with metadata.
POST /v1/ai/metadata HTTP/1.1
Host: api.getbee.io
Authorization: Bearer Enter Dev Console API Key as Bearer token
Content-Type: application/json
Accept: */*
Content-Length: 952
{
"options": {
"model": "gpt-3.5-turbo",
"toneOfVoice": "",
"instructions": "Try to use a pun.",
"reportUsage": true,
"language": ""
},
"template": {
"page": {
"body": {
"container": {
"style": {
"background-color": "#fff",
"background-image": "none",
"background-position": "top left",
"background-repeat": "no-repeat",
"background-size": "auto"
}
},
"content": {
"computedStyle": {
"linkColor": "#8a3b8f",
"messageBackgroundColor": "transparent",
"messageWidth": "650px"
},
"style": {
"color": "#000000",
"font-family": "Lato, Tahoma, Verdana, Segoe, sans-serif"
}
}
},
"type": "mailup-bee-page-properties",
"webFonts": [
{
"fontFamily": "'Lato', Tahoma, Verdana, Segoe, sans-serif",
"name": "Lato",
"url": "https://fonts.googleapis.com/css?family=Lato"
}
]
},
"template": {
"name": "template-base",
"type": "basic",
"version": "2.0.0"
},
"title": "",
"description": "",
"rows": [
{
"columns": [
{
"grid-columns": 12,
"modules": [
{
"descriptor": {
"computedStyle": {
"align": "center"
},
"style": {
"padding-top": "10px",
"padding-bottom": "5px"
}
}
}
]
}
]
}
]
}
}
A JSON object with metadata (preheader and subject).
{
"preheader": "Ready to Bee a part of our user research project? Schedule your interview now!",
"subject": "BEE Pro: Let's Bee-gin! Join our user research project 🐝",
"usage": {
"prompt_tokens": 424,
"completion_tokens": 48,
"total_tokens": 472,
"completion_tokens_details": {
"reasoning_tokens": 0
}
}
}
SMS
v1/ai/sms
This endpoint accepts a JSON template and options to generate a custom SMS.
POST /v1/ai/sms HTTP/1.1
Host: api.getbee.io
Authorization: Bearer Enter Dev Console API Key as Bearer token
Content-Type: application/json
Accept: */*
Content-Length: 335
{
"options": {
"model": "gpt-3.5-turbo",
"toneOfVoice": "text",
"length": "detailed",
"instructions": "text",
"reportUsage": true,
"language": "it-IT"
},
"template": {
"page": {
"body": {
"container": {
"style": {
"background-color": "#fff",
"background-image": "none",
"background-position": "top left",
"background-repeat": "no-repeat",
"background-size": "auto"
}
}
}
}
}
}
Successful response with SMS.
{
"sms": "Ciao! Ti interessa partecipare a un progetto di ricerca utente con noi? Sarà una videochiamata di 30-45 minuti.",
"usage": {
"prompt_tokens": 475,
"completion_tokens": 87,
"total_tokens": 562
}
}
Summary
v1/ai/summary
This endpoint accepts a JSON template and options to generate a concise summary.
POST /v1/ai/summary HTTP/1.1
Host: api.getbee.io
Authorization: Bearer Enter Dev Console API Key as Bearer token
Content-Type: application/json
Accept: */*
Content-Length: 334
{
"options": {
"model": "gpt-3.5-turbo",
"toneOfVoice": "text",
"length": "concise",
"instructions": "text",
"reportUsage": true,
"language": "it-IT"
},
"template": {
"page": {
"body": {
"container": {
"style": {
"background-color": "#fff",
"background-image": "none",
"background-position": "top left",
"background-repeat": "no-repeat",
"background-size": "auto"
}
}
}
}
}
}
Successful response with summary.
{
"summary": "Vuoi partecipare a un progetto di ricerca utente con BEE Pro? Rispondi a Dalila per prenotare un colloquio video.",
"usage": {
"prompt_tokens": 425,
"completion_tokens": 39,
"total_tokens": 464
}
}
Last updated
Was this helpful?