How does it work?
When Braze sends a message, the Connected Content script calls the Voucherify API, fetches the response, and injects the data into the message template before delivery. A basic Connected Content script looks as follows:Connected content basic schema
- API endpoint URL: The Voucherify API endpoint to call (for example,
/v1/publications). :method: The HTTP method –postfor creating resources,getfor fetching data.:headers: Your Voucherify API credentials (X-App-IdandX-App-Token) for authentication.:content_type: Set toapplication/jsonfor Voucherify API calls.:retry: Retries the call up to 5 times if the request fails.:save: Stores the API response in a variable you can reference in the message body.
What can you do with Connected Content?
Connected Content scripts support various Voucherify use cases:| Use case | Description |
|---|---|
| Publish unique coupon codes | Assign and send a unique discount code to each customer. |
| Generate personalized codes | Create codes with custom prefixes based on customer attributes. |
| Invite referrers | Publish referral codes for customers to share. |
| Fetch loyalty card balance | Display a customer’s current loyalty points and expiration dates. |
| Add loyalty points | Award points through custom event earning rules. |
| Add gift card credits | Top up a customer’s gift card balance. |
| List unused coupons | Show customers their available, unredeemed codes. |
| Resend existing codes | Remind customers about codes they already received. |
API endpoints
Connected Content calls the Voucherify API. The examples in this documentation use the default European cluster. Change the endpoint if your project is in another region or uses a dedicated cluster. You can check your API endpoint in Voucherify under Project settings > General > API endpoint.| Shared cluster | Endpoint for Braze Connected Content |
|---|---|
| Europe (default) | https://api.voucherify.io/v1/ |
| United States | https://us1.api.voucherify.io/v1/ |
| Asia (Singapore) | https://as1.api.voucherify.io/v1/ |
Optimization and security
Without proper optimization, each Connected Content message triggers at least two Voucherify API calls. This can drain your hourly and monthly limits. Before going to production, configure:- Rate limiting: Limit the number of messages Braze sends per minute to protect both APIs.
- Caching: Add
cache_idand:cache_max_ageto reduce duplicate API calls. - Retry: Use the
:retryattribute so Braze retries failed requests up to 5 times. - Source ID: Use
source_idto ensure each customer receives only one unique code per campaign.
Next steps
Visit the following pages to explore possibilities of using Voucherify with Braze Connected Content.Get started
Publish your first coupon code with a step-by-step tutorial.
Optimize scripts
Configure caching, retry, and rate limiting for production.
Script reference
Browse ready-to-use script templates for all use cases.

