Get In Touch

Leveraging Public APIs for Personalized Messaging in Braze

In the age of data-driven marketing, personalization is king. As marketers, we’re always looking for new ways to enhance our campaigns and make them more relevant to our audience. One powerful strategy is to leverage public APIs to enrich our messaging with real-time, context-specific data.

Braze, a comprehensive customer engagement platform, supports this approach with a feature known as Connected Content. This allows you to make HTTP requests to external servers – such as public APIs – and use the returned data to customize your messages.

Let’s explore how you can leverage some popular public APIs to supercharge your Braze campaigns with dynamic, personalized content. offers a detailed forecast API that can be used to include weather information in your messaging.

Suppose you want to send a message that includes the day’s weather forecast for the user’s city. Assuming provides the weather forecast for a specific location with an API call like this:<YOUR_API_KEY>&q=<LOCATION>&days=1

You could use Connected Content in Braze like this:

{% connected_content{{${city}}}&days=1 :save result %}

Then you could reference the result in your message:

Hello {{${first_name}}}, the forecast for today in {{${city}}} is {{result.forecast.forecastday[0].day.condition.text}} with a high of {{result.forecast.forecastday[0].day.maxtemp_c}} degrees.

SportScore API

SportScore API can provide real-time scores and stats for various sports, which can be useful for engaging sports fans with the latest updates.

Assuming that SportScore API provides data on the latest scores with an API call like this:<YOUR_API_KEY>&sport=soccer&date=<YYYY-MM-DD>

You might use it like this in Braze:

{% connected_content{{${todays_date}}} :save result %}

Then you could reference the result in your message:

Hey {{${first_name}}}, the latest soccer scores are in! The match between {{[0].team1}} and {{[0].team2}} ended {{[0].score1}} to {{[0].score2}}.


VISIT Data, a location data API, can provide insights about a user’s current location, which can be used to offer location-specific recommendations.

Assuming that VISIT Data provides data on a user’s location with an API call like this:<YOUR_API_KEY>&user_id=<USER_ID>

You might use it like this in Braze:

{% connected_content{{${user_id}}} :save result %}

Then you could reference the result in your message:

Hello {{${first_name}}}, we see you're currently in {{}}. Check out our recommendations for places to visit!

Please note that these examples are hypothetical, and the actual implementation would depend on the specific APIs’ documentation and how they structure their responses. Always replace placeholders like <YOUR_API_KEY> and <USER_ID> with actual values or variables from your data.

Author avatar
Kodie Critzer

Post a comment

Your email address will not be published. Required fields are marked *