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

Process promo code decisions

Request

The Promo Code decision would execute the discount rule defined behind the given promo code, which is configured from the Zephr console. The decision request would require a list of relevant products with its pricing data, typically it would have come from a Dynamic Offer decision response. The Promo Code decision would generate decision response like a regular Dynamic Offer, but with the discount output according to the Promo Code's discount rule.

Alternatively, if configured and the feature is enabled, this api can execute a dynamic offer rule that is linked to this promo code. Selected products are not required for executing promo codes using this method. Parameters supplied to the dynamic offers decisions api can also be supplied to this api for this promo code flow (session, foreign_keys, etc).

Security
CookieBlaizeSession or JwtQuery or JwtHeaderXBlaizeJwt or JwtHeaderXZephrJwt or JwtBearer or JwtCookie
Bodyapplication/json
promo_codestring

The Promo Code, generated from the Zephr console.

promo_code_definitionstring

The Definition ID of Promo Code, generated from the Zephr console. This is useful for previewing a draft promo code rule/offer as there won't be any downloadble/usable promo code generated.

selected_productsArray of objects or null(promo-code-decision-request-selected-product)
sessionstring or null

Zephr Session ID, required for trials. Only relevant for executing promo code with a linked dynamic offer.

foreign_keysobject or null

Foreign system and ID used to identify the user. Only relevant for executing promo code with a linked dynamic offer.

ipstring or null

Client IP address, defaults to request IP. Only relevant for executing promo code with a linked dynamic offer.

user_agentstring or null

Client user agent. Only relevant for executing promo code with a linked dynamic offer.

jwtstring or null

A Json Web Token, may include identity or product holding claims. Only relevant for executing promo code with a linked dynamic offer.

pathstring or null

Request path, required for trials if used. Only relevant for executing promo code with a linked dynamic offer.

content_idstring

Content ID, used to perform requests to a 3rd party API for additional content information used in making a decision. Only relevant for executing promo code with a linked dynamic offer.

curl -i -X POST \
  https://developer.zuora.com/_mock/zephr-api-reference/zephr-public-api/zephr/public/decisions/v1/promo-codes \
  -H 'Content-Type: application/json' \
  -b blaize_session=YOUR_API_KEY_HERE \
  -d '{
    "promo_code": "string",
    "promo_code_definition": "string",
    "selected_products": [
      {
        "id": "product-a",
        "payment_plan": {
          "provider": "zuora-billing",
          "plan_id": "string",
          "charges": [
            {
              "charge_definition_id": "string",
              "currency": "string",
              "price": 0
            }
          ]
        }
      }
    ],
    "session": "string",
    "foreign_keys": {},
    "ip": "string",
    "user_agent": "string",
    "jwt": "string",
    "path": "string",
    "content_id": "string"
  }'

Responses

OK

Bodyapplication/json
productsArray of objects(do-product-response)

The processed output for mainly the Product rule. Price and Discount, if present, the output of those would be nested under each product element according to the rule specification.

taglinestring

The tagline rule output

customobject

key value pair of any custom property rule output. The key would be the property id, the value would be its rule output

outcomesArray of objects

The rule outcome for each property rule within the offer. If you wish to record user conversion data, you would need to send these outcome data back to Zephr upon when the conversion is happening.

errorsArray of objects
Response
application/json
{ "products": [ { … } ], "tagline": "string", "custom": {}, "outcomes": [ { … } ], "errors": [ { … } ] }

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

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