Introduction
Open Weather is a team of IT experts and data scientists practicing deep weather data science. For every point on the globe, OpenWeather provides historical, current, and forecasted weather data via fast APIs.MoEngage and Open Weather
The MoEngage and Open Weather integration lets you enrich and personalize your marketing campaigns. You can fetch the user’s location and weather data on the fly and send personalized campaigns in real time. For example, an ecommerce brand can nudge users to buy:- Sunglasses, when the weather at the user’s location is sunny.
- An umbrella, when there is a high likelihood of rain.

Integration
Prerequisites
- An Open Weather account.
- Access to your Open Weather API key. Contact your Open Weather account manager for a compatible API key. For more information, see Open Weather API.
- You are tracking each user’s coordinates (latitude and longitude) as user attributes in MoEngage.
Available APIs
You can use the following Open Weather APIs within your MoEngage campaigns:- Current weather data
- Hourly forecast — 4 days
- One Call API
- Daily forecast — 16 days
- Climate forecast — 30 days
- 5-day weather forecast
- Road risk API
Steps
The example below shows three message variants based on the current weather conditions at the user’s coordinates. We use the Current Weather API through MoEngage Content APIs to fetch the weather details.Step 1: Add a Content API on MoEngage
- Navigate to Settings > Advanced settings > Content API. Click + Add content API in the upper-right corner of the Content API screen.

- Add the Current Weather API details. API URL
Parameters Your parameters auto-populate. Update the values with personalized variables — type
@and select the variable.
- Click Save.
- The Open Weather API now appears in your Content APIs list.

Step 2: Use the Content API in MoEngage campaigns
You can now use this Content API in your campaigns. For more information, see Content APIs.- On step 2 of campaign creation, type
@. - In the personalization pop-up, select the Open Weather Content API you configured in Step 1.

- Use the MoEngage Templating Language to parse the API response and define your campaign content based on local weather. For example:
- If local weather is Sunny → “Get a sunscreen”.
- If local weather is Rain → “Get an umbrella”.
Rain as the weather description, the user receives the push message “It’s raining. Get an umbrella”.