- A user’s current rewards balance
- Latest order status
- Personalized product recommendations
Data Feeds are currently available only for email messages sent through Journeys.
Need another channel? Fill out this short survey.
How Data Feeds work
- Create a Data Feed – Configure how OneSignal connects to your API.
- Attach the Data Feed to a message template.
- Insert response fields in your message using Liquid syntax.
- At send time, OneSignal makes an API call for each recipient, parses the response, and injects the data into your message.
Example: Display reward points
Suppose you want to show each customer their rewards balance:Creating and using a Data Feed
1. Set up your Data Feed configuration
Navigate to Data > Data Feeds in the sidebar to see the list of existing Data Feeds and create a new one. Each Data Feed must have:- Name: A descriptive name like “Customer Rewards API” to help you distinguish feeds. Unique names are recommended but not required.
- Alias: A short identifier like
rewardsused in Liquid syntax (e.g.,{{ data_feed.rewards.points }}). Must be unique, lowercase, alphanumeric, with no spaces or special characters. - Method: The HTTP method OneSignal uses to contact your API. Usually
GET, butPOSTis also supported. - URL: Your API endpoint. Supports Liquid syntax so OneSignal can fetch user-specific data.
external_id (stored in OneSignal) as a URL parameter:
- Headers: Key-value pairs required by your API (e.g., authentication tokens). Supports Liquid syntax.
- Body: Optional JSON request body. Supports Liquid syntax, the same as Journey webhooks.

2. Attach the Data Feed to your message template
Attach your Data Feed to your message template so that OneSignal knows to use it.- Navigate to Messages > Templates
- In the Message section, select the Personalization button

- Toggle on Data Feeds and select your feed

- Save your template
3. Use the data in your message
Use Liquid syntax to insert response data anywhere in your message. Continuing the rewards example, the API response for Sarah (whoseexternal_id is a1-b2c3) might look like this:
- Use a Data Feed
- Use the
rewardsData Feed- Recall: the
rewardsfeed knows to call the API with theexternal_idof the recipient
- Recall: the
- From the response, insert the value of the
pointsitem (193) and thestatus_levelitem (Gold)
Requirements and limits
Your API needs to:- Accept single-step authentication with auth tokens in headers
- Respond quickly. Under 250ms recommended (this directly affects send speed)
- Return JSON. Other formats are not supported at this time.
- If you need a different format, share your use case.
- Handle your send volume. A low rate limit on your API slows message delivery.
- Return reasonably-sized payloads. Keep responses under 50 KB for best performance.
- One Data Feed per template. Fetch everything you need in a single API response.
- One API call per Data Feed per message.
- Journeys only. Not yet available for other sending methods.
- No chaining calls. The payload from one Data Feed cannot be used to call another.
Need multiple Data Feeds per template or support for other channels? Share your use case to help prioritize these features.
Setting up your API
Before creating a Data Feed, ensure your API can handle these requirements:Authentication
Your API should accept authentication via headers:JSON request body
If you need to include a body in the request, your API should accept JSON. This may mean your headers need to includeContent-Type: application/json.
JSON response
Your API should return a JSON object. Typically this means your headers will includeAccept: application/json.
Personalization parameters
You’ll typically pass user identifiers in the URL like this:Rate limits
Consider your API’s rate limits. Sending to 10,000 users means 10,000 API calls in rapid succession. Ensure your API can handle this volume.Error handling
If your API returns an error or doesn’t have data for a user, the message won’t be sent to that recipient. Make sure your API returns data for all expected users.Getting started checklist
Before implementing Data Feeds, answer these questions:- What data do I want to show in my message? Working backwards from a simple outline with the items to be populated from your API identified will help you organize your thinking.
- Is this data available via a single API endpoint?
- How will I authenticate API requests?
- What identifier or other data item will I use to fetch personalized data?
- Is that identifier already stored in OneSignal? If not, how will it be populated?
- Can my API handle the volume of requests I’ll generate?
- What happens if my API doesn’t have data for a user?
Examples and advanced use cases
Data Feeds can be used with Liquid syntax or in combination with other features in creative ways to produce more complex personalization.- Iterating with loops: abandoned cart
- Custom events properties
- Conditional display: order status
- Automation without personalization
- Personalized coupon codes
Let’s say you have a Data Feed cart that returns an array of items in the user’s cart, plus the cart total dollar amount:If you want to show each item in the cart, plus the cart total, you can use a for loop in Liquid:This will result in:
If you’re using the email block editor, when inserting this sort of complex Liquid syntax, particularly if you need to include images or links, for best results use the custom HTML block element.
FAQ
My Data Feed values are not appearing in the message. What should I check?
Verify these in order:- The Data Feed is attached to the template (under Personalization > Data Feeds).
- Your Liquid syntax matches the JSON response structure exactly —
{{ data_feed.<alias>.<field> }}. - The API endpoint returns valid JSON when called manually with the same identifiers.
- The recipient has the required identifier (e.g.,
external_id) stored in OneSignal.
Why are messages sending slowly?
Data Feed API calls run at send time for every recipient. If your API responds slowly or cannot handle concurrent requests, message delivery slows proportionally. Aim for under 250 ms response time and ensure your infrastructure can handle your send volume.Why are some recipients not getting messages?
If the Data Feed API call fails for a recipient — due to a 404, timeout, or missing data — OneSignal skips that recipient entirely. Check the error log in your Data Feed configuration and your own API logs for failures. Verify those users have the required identifiers in OneSignal.Can I use more than one Data Feed in a template?
Not currently. Each template supports one Data Feed. Fetch all the data you need in a single API response. If you need multiple feeds, share your use case.Are Data Feeds available for push notifications or SMS?
No. Data Feeds are currently available only for email messages sent through Journeys. Support for additional channels is planned — share your use case to help prioritize.What happens if my API is down when the message sends?
OneSignal skips any recipient whose Data Feed call fails. The message is not sent to that recipient, and no fallback value is inserted. Monitor your API uptime and error rates during scheduled sends.Related pages
Liquid syntax
Full reference for Liquid templating in OneSignal messages.
Journeys
Build automated messaging workflows that trigger Data Feed emails.
Custom events
Trigger Journeys and pass event properties for Data Feed URLs.
Message personalization
Overview of all personalization methods — tags, Liquid, dynamic content, and Data Feeds.
