Skip to content

Execute Browser feature transformations

Request

Zephr HTML Features can be run in the browser by calling this API directly or using the Zephr Browser SDK. For compatibility with CDN, any web headers (Referrer, User-Agent) will be accepted and passed onto the rule engine.

Providing a JWT

Supply it as a jwt query parameter, an X-Blaize-Jwt header, an X-Zephr-Jwt header, an Authorization: Bearer header, or a blaize_jwt cookie. If more than one is present, the first found in that order is used.

Security
CookieBlaizeSession or JwtQuery or JwtHeaderXBlaizeJwt or JwtHeaderXZephrJwt or JwtBearer or JwtCookie
Headers
Cookiestring

The session cookie.

Example:blaize_session=...
Bodyapplication/json
featureIdsArray of anyrequired

An array of HTML Feature IDs.

Example:
[ "featureX" ]
sessionstring

The Zephr Session ID.

Example:"xxx-xxx-xxx"
refererstring

Browser referer

Example:"https://www.zephr.com/"
pathstring

Request path, defaults to "/". If available, include the content ID as a query parameter. For example, /story.html?content_id=abc-123.

Example:"/x.html"
content_metadataobject
Example:
{ "content_id": "xxx-xxx-xxx" }
giftTokenstring

Token to provide access to content for one session.

Example:"xxx-xxx-xxx"
customDataobject

Custom data to be used in Feature HTML browser rule. Accepts a JSON object

Example:
{ "key": "value" }
{ "featureIds": [ "featureX" ], "session": "xxx-xxx-xxx", "referer": "https://www.zephr.com/", "path": "/x.html", "content_metadata": { "content_id": "xxx-xxx-xxx" }, "giftToken": "xxx-xxx-xxx", "customData": { "key": "value" } }

Responses

OK

Headers
any
Bodyapplication/json
featureResultsobject

Map of HTML Feature IDs and feature result transformations

resourcesobject
Response
{ "featureResults": { "featureX": { … } }, "accessDetails": { "authenticated": false, "accessDecisions": { … }, "entitlements": { … }, "credits": { … }, "meters": { … }, "trialTrackingDetails": [ … ], "trials": { … }, "timeTrials": { … }, "testGroups": { … }, "activeProducts": [ … ] } }