Content Services API
Learn more about the Content Services API offering in Beefree SDK.
Last updated
Was this helpful?
Learn more about the Content Services API offering in Beefree SDK.
Last updated
Was this helpful?
Beefree SDK includes a comprehensive API offering designed to expand upon the builder's capabilities. By leveraging Beefree SDK's APIs, you can extend the builder's functionality into other aspects of your application.
Beefree SDK's API offering includes three APIs. They are the following:
This section of the documentation discusses the , which includes resources for exporting, converting, processing, and styling templates within Beefree SDK. This collection of resources extends the functionality of the builder to offer your end users a complete content creation solution.
There are five categories of resources within the Content Services API. Each of these categories includes a group of endpoints with resources to support various workflows.
These categories are the following:
Export: Services that allow users to extract content into various formats (such as HTML, PDF, or image files), making it easy to repurpose or distribute designs across different platforms.
Convert: Tools that transform content from one format to another (for example, converting template JSON to HTML ). This enables compatibility with different systems and workflows.
AI Collection: AI-powered capabilities for text generation, such as creating metadata for emails, summarizing content, or creating SMS messages.
Row Processing: Services that operate at the structural level, such as analyzing, modifying, or extracting specific rows or sections within a design for granular control over the content layout.
Brand Style: Resources focused on enforcing or applying brand guidelines, including applying consistent colors, typography, and spacing rules to ensure brand integrity across all generated content.
The following diagram displays each of the five categories within the Content Services API, and their corresponding resources.
This section provides a high level overview of the Content Services API's capabilities, and lists a few scenarios in which this API is particularly helpful.
Your end users may want to export their templates into various formats in the following scenarios:
HTML: For sending email campaigns, publishing landing pages, or embedding popups.
Plain Text: For accessibility, compatibility with text-only email clients, improved deliverability, and compliance with communication regulations.
PDF: For attaching designs to emails, SMS, WhatsApp, printing hard copies, or creating flyers, while preserving the design's layout.
Image: For creating visual galleries, dashboards, social media posts, internal presentations, or campaign planning visuals.
Another common use case of the Content Services API is converting one format to another. The formats in the Convert category differ from those in the Export category, and serve a separate purpose. This category of endpoints is for creating designs and loading them within the builder.
These endpoints allow you to:
Page to Email: Convert existing page templates into email templates. This saves your end users time by allowing them to use their favorite designs across multiple content channels.
Email to Page: Convert existing email templates into page templates. This saves your end users time by allowing them to use their favorite designs across multiple content channels.
SMS: Generates concise text versions (e.g., promotional SMS).
Metadata: Generates subject lines and preheaders based on a template's content.
Summary: Generate summaries based on a template's content.
These endpoints manage rows within templates to maintain consistency and reduce redundancy:
Index: List saved rows available.
Merge: Merge row updates across multiple templates. Particularly useful when applying global updates.
Synced Rows: Retrieve a list of synced rows available.
Brand consistency can be enforced or retroactively applied across templates:
/templates and /rows endpoints allow updating visual properties (colors, fonts, spacings, etc.) across multiple templates or rows based on defined brand styles.
All API access is over HTTPS, and accessed from the following URL:
You can reference each resource and its corresponding collection options in the following section.
The following tables list the available collection options for resources within the category.
The following table lists the resources available in this category of endpoints and their corresponding collection options.
/html
/message
/page
/popup
/amp
/plain-text
/message
/pdf
/message
/page
/image
/message
/page
The following table lists the resources available in this category of endpoints and their corresponding collection options.
/page-to-email
/conversion
/email-to-page
/conversion
/simple-to-full-json
/conversion
The following table lists the resources available in this category of endpoints and their corresponding collection options.
/sms
/ai
/metadata
/ai
/summary
/ai
The following table lists the resources available in this category of endpoints and their corresponding collection options.
/merge
/message
/page
/merge-rows
/message
/page
/synced-rows
/message
/page
/merge-index
/message
/page
The following table lists the resources available in this category of endpoints and their corresponding collection options.
/brand
/template
/row
The following table provides a few examples of URLs you can reference as an example for making 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
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.
To stay within the default limits and ensure reliable delivery, the following practices are recommended. These not only help distribute traffic more evenly but also provide resilience against transient network issues:
Monitor rate limit headers and handle 429 responses gracefully.
Response metadata indicates remaining capacity and reset timing. When receiving a 429 Too Many Requests
, it’s best to pause requests and retry after the time specified in the Retry-After
header.
Use exponential backoff. On retries, apply an exponentially increasing delay with a small random variation. This helps prevent synchronized retry storms that can worsen congestion.
Throttle traffic using a queue. In applications that generate burst traffic or scale horizontally, a request queue with rate-based throttling can smooth spikes and prevent exceeding per-second or per-minute thresholds.
Debounce high-frequency updates. Debouncing can be especially effective in scenarios like autosaving. For example, it's not typically necessary to request new HTML after every change.
Cache repeated GET requests.
Short-lived caching for frequently accessed data helps reduce redundant requests and conserves rate limit capacity.
Monitor usage patterns. Set up alerting for repeated 429 errors to catch rate limit issues early. Monitoring request patterns can also help anticipate scale needs.
Reference the answers to the most frequently asked questions in this section.
These tasks consume resources in our Amazon Web Services environment, so we have to account for that. We did extensive research to define pricing that is consistent with other APIs.
Here is a quick summary:
Essentials
15,000
$0.01
Core
50,000
$0.01
Superpowers
250,000
$0.003
Enterprise
Custom
Custom
An additional charge, CSAPI, will be added to your current subscription plan invoice. When you activate the Content Services API, your billing statement will change, and you'll notice a new line item on your Beefree SDK invoice for the service.
The Content Services API is provided as a component for your current subscription and the charges will be applied to the subscription payment method. Currently, there is no option to use an alternative payment method specific to these charges.
API requests rate limits exist independently of any API key’s monthly usage allowance.
The API has the following rate limits:
Per minute: 500 requests
Per second: 100 requests
The Content Services API is a -based API that enables Beefree SDK integrators to programmatically manipulate template JSON. It is built to follow predictable resource url patterns, and to utilize standard HTTP response codes and methods.
Beefree SDK requires that you prior to accessing the Content Services API's resources. You can generate API keys for both production and . API keys associated with development applications are intended for pre-production environments and endpoint testing. They should not be used in production environments.
One of the most common use cases for the Content Services API is exporting different format types. Once your end users complete their designs within the no-code builder, they'll want to export their designs and distribute them. That is where the stands out. By using this category of endpoints, you can provide your end users with the option to export their no-code designs in HTML, plain text, PDF, or image formats.
Simple to Full JSON: Convert an into full Beefree JSON that can be loaded within the builder for your end users to edit.
This category of endpoints requires that you configure an AI Provider within the . Through the integration with your AI Provider, these endpoints generate the following supporting details for your end users templates:
The Content Services API allows you to carry out a number of useful tasks, like converting an email or a page into a thumbnail image or a PDF document, or updating a footer into all the emails that use it (for example, a ).
Note: Overages to the allotted amounts for each Beefree SDK plan type are charged at the end of the billing period. For this reason, the first invoice after cancellation may include usage charges for the Content Services API. Reference the for more information.