Skip to main content

Content API


Content API

As one of it’s various integration options, Zephr includes an feature which allows it to consume JSON from an external API as content metadata. The metadata pulled from this is then available as additional decision points within the Rule Builder. For example, if you have information within your Content API about whether a piece of content is Premium or Free, then you could use a Decision Point within Zephr to provide different experiences to your users depending on the type of content.

Requests to a Content API are made behind a double buffered cache, to protect site performance.

Configuring your Content API

You can configure a content API connection within your Zephr Admin Console by navigating to Settings > Content API. If you have more than one Admin Console, this will need to be configured on each instance.

Once on the configuration page, enter the URL template for your API. Zephr has the following URL templates available:


If relevant, you can also add Headers by clicking the Add Header button and providing a Name and Value.
Once you have entered your details, click Save.

Using Content API Decision Points

Once you have configured your Content API, you will see new options within your Request Rule Builder. These can be found under the Content Segments section and can be dragged into your Rule as Decision Points.

The new options you’ll see are for Content API and Content API Age.

Content API: Allows you to make a decision based upon information being returned by your API. For example, in the below image, a check would be done to see if the Content API returns that the piece of content being access is Premium.

Shows set up of Content API Decision Point

Content API Age: Allows you to make decisions based upon the age of a piece of content, provided this information is returned by your Content API in a date/time format. In the example below, a check is done to see if the content is more than 24 hours old. This could be useful if you wish to place a paywall over old or archived content.

Shows set up of Content API Age Decision Point

Once you’ve dragged the Decision Points in, complete your Rule as usual and click Save.