Skip to content

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.

Download OpenAPI description
Languages
Servers
Mock server
https://developer.zuora.com/_mock/zephr-api-reference/zephr-public-api
https://{your-domain}

Authentication

Operations

Braintree Payments

Operations

Browser Feature Transformations

Operations

Decision Engine

Operations

Dynamic Offer Decision Engine

Operations

Dynamic Offer Promo Code Decision

Operations

OAuth Flow

Operations

Payments

Operations

Product Sharing

Operations

SDK Feature Decision Engine

Operations

Sessions

Operations

Stripe Payments

Operations

Third-Party Authentication

This section contains the API operations for the OAuth 2.0 Authorization Code Flow.

Operations

User

Operations

V4 Gifts

Create a Gift resource for V4. Gifts can be used to provide access to a particular URL for one session only by appending a gift token ID to the URL as the gift path parameter.

Operations

Web Analytics

Operations

Retrieve the datalayer

Request

Retrieves the Datalayer object for the current session. The datalayer can be used to provide contextual data when tracking user activity, for example providing values for 'User Attributes' in hotjar. The /blaize/profile endpoint is preferred for retrieving complete user profile information.
All fields configured in the admin console will be resolved against the current session and returned.
The top-level property in the response object defaults to 'dataLayer' and can be configured in the console under the data layer settings using the 'Data Layer Name' field.
Data layer fields can be grouped by their 'Entity' as configured in the console. An example of the possible groupings is included.

Security
CookieBlaizeSession or JwtQuery or JwtHeaderXBlaizeJwt or JwtHeaderXZephrJwt or JwtBearer or JwtCookie
curl -i -X GET \
  https://developer.zuora.com/_mock/zephr-api-reference/zephr-public-api/blaize/datalayer \
  -b blaize_session=YOUR_API_KEY_HERE

Responses

OK

Headers
Cache-Controlstring

The response cache header max-age can be configured by support, and defaults to zero seconds.

Bodyapplication/json
dataLayerArray of objects
Response
application/json
{ "dataLayer": [ { … }, { … }, { … }, { … } ] }

Submit user conversion data

Request

Records a user conversion. In Zephr, a conversion typically represents a user state change, such as transitioning from anonymous to registered or becoming a paying customer. This endpoint can also be used to record any event, like a user clicking on an advert. Conversions are tracked against specific rule versions and outcomes, enabling performance comparison between different outcomes.
Recording this data enables the comparison of performance of different outcomes in a rule. For example, a split test could be set up with two slightly different 'advert' outcomes that each record a conversion when a user interacts with them. After traffic has been processed by the rule, the conversion rates between the two outcomes can be compared in 'analytics' mode in the console. For example, it might show that 5% of users who saw Outcome1 clicked a button, compared to 8% for Outcome2. This analytics data can be downloaded in CSV format for further analysis.
Conversion data is only used to evaluate the performance of outcomes in rules and cannot be accessed on a per-user basis. To track if a particular registered user has interacted with an outcome, update a user attribute value.
This endpoint is only relevant where the Zephr in-rule analytics feature is enabled.
This endpoint must be called with a populated blaize_tracking_id cookie. If this cookie is missing, a 400 response code is returned.

Security
CookieBlaizeSession or JwtQuery or JwtHeaderXBlaizeJwt or JwtHeaderXZephrJwt or JwtBearer or JwtCookie
Cookies
blaize_tracking_idstringrequired

Zephr tracking ID cookie used to uniquely identify the user or anonymous session

Example: blaize_tracking_id=dc8f7f9e-2deb-4485-a9f0-34b44fc7f45e
Bodyapplication/json
ruleIdstringrequired

The ID of the specific Zephr rule version that led to the outcome causing this conversion.

Example: "article-22"
outcomeIdstringrequired

The ID of the outcome in the rule that triggered this conversion.

Example: "graph/1#1,graph/1#2,graph/1#3,graph/2#1,graph/2#2"
conversionstringrequired

The type of conversion to be recorded. For example, Zephr out-of-the-box components will submit conversion strings 'REGISTERED' and 'CUSTOMER' when registering a user or when a user purchases a product. Any string can be used for custom conversions.

Example: "REGISTERED"
curl -i -X POST \
  https://developer.zuora.com/_mock/zephr-api-reference/zephr-public-api/zephr/public/rule-outcomes/v1/conversions \
  -H 'Content-Type: application/json' \
  -b 'blaize_tracking_id=dc8f7f9e-2deb-4485-a9f0-34b44fc7f45e; blaize_session=YOUR_API_KEY_HERE' \
  -d '{
    "ruleId": "article-22",
    "outcomeId": "graph/1#1,graph/1#2,graph/1#3,graph/2#1,graph/2#2",
    "conversion": "REGISTERED"
  }'

Responses

OK. The user conversion data has been successfully recorded.

Zephr Features

Operations

Component Library

Operations

Change the Stripe subscription price

Request

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.

Security
CookieBlaizeSession or JwtQuery or JwtHeaderXBlaizeJwt or JwtHeaderXZephrJwt or JwtBearer or JwtCookie
Path
externalIdstringrequired
Bodyapplication/json
plan_idstring
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"
  }'

Responses

OK

Bodyapplication/json
totalnumber

The total amount the user will be initially charged for the subscription in the relevant currency's lowest denomination (e.g. pence), i.e. for a monthly subscription, the first month's cost.

Example: 5000
sub_totalnumber

The total amount minus tax for the initial charge in the relevant currency's lowest denomination (e.g. pence).

Example: 4500
Response
application/json
{ "total": 5000, "sub_total": 4500 }

Oauth2 Access Token

Operations

Subscription

Operations