The Blaize Decision Engine can be invoked via the Public API to calculate an HTTP Response based upon Request-Level Rules created in the Admin Console. This functionality is built into the Blaize Dynamic CDN but the API variant is useful for CMS or edge side integrations.
Public API Reference (2025-07-30)
The Zephr Public API provides common client-side actions tied to a session cookie. Unlike the Admin API, neither users nor other resources can be dereferenced; the only data that can be accessed is owned by the user who is currently signed-in. This design is used to protect other users from malicious attacks.
You can find the base URL for the Public API by navigating to your site domains. To do this, select Sites from the Delivery menu, select your site, and then click the Site Domains button. The base URL is the Live domain.
Zephr forms use the Public API by default, with relative URLs based on the base URL.
- Mock serverhttps://developer.zuora.com/_mock/zephr-api-reference/zephr-public-api/blaize/decision-engine
- https://demo-site/blaize/decision-engine
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://developer.zuora.com/_mock/zephr-api-reference/zephr-public-api/blaize/decision-engine \
-H 'Content-Type: application/json' \
-b blaize_session=YOUR_API_KEY_HERE \
-d '{
"path": "/x.html",
"http_method": "POST",
"session": "xxx-xxx-xxx",
"foreign_keys": {},
"request_headers": {
"User-Agent": "<userAgent>"
},
"content_metadata": {
"publishedDate": "<contentAge>"
},
"jwt": "xxx-xxx-xxx",
"btr": "17e74b9e49e66282e55d4b7ec73de951"
}'{ "status": "301", "body": "Redirecting to login page...", "headers": { "Location": "/login.html" } }
Request
For compatibility with CDN, any web headers (Referrer, User-Agent) will be accepted and passed onto the rule engine.
Uniquely identifies the content Zephr is making a decision about. Request rules can be configured to only execute when the request path matches a provided regular expression.
Zephr Session ID - same as the blaize_session cookie used by the CDN and authentication endpoints.
Foreign ID used to identify the user. The foreign system is parsed as the remainder of the parameter key name following 'foreign_id.'
Passed as metadata.content_id to the Content API template, used to perform requests to a 3rd party API for additional content information used in making a decision.
- Mock serverhttps://developer.zuora.com/_mock/zephr-api-reference/zephr-public-api/blaize/decision-engine
- https://demo-site/blaize/decision-engine
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://developer.zuora.com/_mock/zephr-api-reference/zephr-public-api/blaize/decision-engine?path=string&session=string&foreign_id.xxx=string&content_id=string&jwt=string&btr=string' \
-b blaize_session=YOUR_API_KEY_HERERequest
Generates a new preview of the price that Stripe will charge the customer if they create a new subscription for the specified plan. Note: This method does not create any entities in Stripe and does not result in any payments being made.
- Mock serverhttps://developer.zuora.com/_mock/zephr-api-reference/zephr-public-api/zephr/payment/stripe/subscriptions/{externalId}/change-previews
- https://demo-site/zephr/payment/stripe/subscriptions/{externalId}/change-previews
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
'https://developer.zuora.com/_mock/zephr-api-reference/zephr-public-api/zephr/payment/stripe/subscriptions/{externalId}/change-previews' \
-H 'Content-Type: application/json' \
-b blaize_session=YOUR_API_KEY_HERE \
-d '{
"plan_id": "string"
}'{ "total": 5000, "sub_total": 4500 }