OneSignal REST API

Push notifications triggered by AI conversations, delivered instantly

Your AI agent does not just talk, it takes action. When a customer interaction requires a follow-up notification, the agent fires a push message through OneSignal on the spot. Order updates, appointment reminders, and promotional alerts go out without anyone pressing send.

Chosen by 800+ global brands across industries

Notification power in every chat

Your AI agent orchestrates push notifications, manages subscriber devices, and segments audiences through OneSignal's REST API, all triggered by real-time conversation context.

Send Push Notifications

During a conversation, a customer opts into delivery updates. Your AI agent creates a push notification in OneSignal targeting that customer's device with personalized content, scheduling, and action buttons. The notification fires immediately or at the chosen time.

View Audience Segments

A marketing manager asks which user segments exist. The agent queries OneSignal for all segments with their names, sizes, and filter definitions. Perfect for quick audits before launching a campaign or verifying targeting criteria during planning conversations.

Manage Device Records

A customer reports duplicate notifications. The agent looks up their device record in OneSignal by player ID, reviews subscription status, and can update device properties or remove stale entries. Device hygiene happens in real-time during the support interaction.

Review Notification History

A team member asks what notifications were sent this week. The agent retrieves a paginated list of notifications from OneSignal showing content, delivery stats, and targeting details. Campaign performance becomes visible without opening the OneSignal dashboard.

Update Device Tags

A customer changes their preferences in a conversation. The agent updates custom tags on their OneSignal device record, adjusting which segments they belong to. Preference changes take effect immediately for future notification targeting.

View App Configuration

A developer needs to verify app settings. The agent retrieves OneSignal app metadata including the app name, platform configurations, and notification settings. Quick config checks happen right in conversation without API console access.

OneSignal REST API

Use Cases

Conversational notification workflows

Real scenarios where AI-driven conversations trigger targeted push notifications through OneSignal, closing the loop between customer engagement and re-engagement.

Transactional Alerts Triggered by Chat Actions

A customer confirms a shipping address change through your AI chatbot. The agent updates the order in your system, then immediately sends a push notification through OneSignal confirming the address was changed, with a deep link to track their package. The customer receives confirmation on their phone within seconds, even after closing the chat.

Smart Re-Engagement After Abandoned Conversations

A shopper asks about a product but leaves the chat without purchasing. Your AI Agent notes their interest, creates a targeted push notification in OneSignal with a personalized product recommendation and a limited-time discount, and schedules it for delivery 2 hours later. The shopper returns and converts. Cart abandonment drops measurably.

Support Escalation Notifications to On-Call Teams

A customer reports a critical production issue through the chatbot at 3 AM. Your AI Agent cannot resolve it automatically, so it creates a high-priority push notification through OneSignal targeting the on-call engineering segment. The notification includes the issue summary and a direct link to the support ticket. Response time drops from hours to minutes.

Try
OneSignal REST API

OneSignal REST API

FAQs

Frequently Asked Questions

How does the AI agent send push notifications through OneSignal?

The agent uses OneSignal's Create Notification endpoint, specifying the target audience via segments or player IDs, the message content per language, optional headings, and scheduling parameters. You can configure the agent to send notifications based on conversation triggers like order confirmations, preference changes, or support escalations.

Can I control which types of notifications the agent is allowed to send?

Yes. Configure your agent with rules about which notification types are permitted. You might allow transactional notifications like order updates and appointment reminders while requiring human approval for promotional campaigns. The agent respects whatever guardrails you set around notification content and frequency.

What OneSignal API key does Tars need?

Tars requires your OneSignal App API Key, found in the OneSignal dashboard under Settings, then Keys and IDs. This key authenticates REST API requests for your specific app. Keep the key secure and avoid sharing it. You can regenerate it from the OneSignal dashboard if needed.

Does Tars store subscriber device data from OneSignal?

No. Device information, segment data, and notification history are queried from OneSignal in real-time during conversations. Tars does not maintain a copy of your subscriber database. All data lives in your OneSignal account and is fetched live when the agent needs it.

Can the agent target notifications to specific user segments?

Yes. The Create Notification endpoint supports targeting by included_segments such as All, Active Users, or any custom segment you have defined in OneSignal. The agent can also target individual devices by player ID or apply advanced filters based on tags, location, and activity.

How is this different from sending notifications directly from the OneSignal dashboard?

The dashboard requires manual creation of each notification. With Tars, notifications are triggered automatically based on conversation context. A customer confirms an order and the push goes out. A lead qualifies and a follow-up notification schedules itself. No one needs to open the OneSignal dashboard for routine messaging.

Can the agent schedule notifications for later delivery?

Yes. The Create Notification endpoint supports a send_after parameter in ISO 8601 format, as well as delayed_option for timezone-based or last-active-based delivery. The agent can schedule a notification during a conversation to be delivered hours or days later.

What happens if a notification fails to deliver?

The agent can check delivery status by reviewing notification records through the View Notifications endpoint. If a notification was not delivered due to invalid device tokens or disabled subscriptions, the agent can identify the issue, update the device record, and attempt redelivery or notify the support team.

How to add Tools to your AI Agent

Supercharge your AI Agent with Tool Integrations

Don't limit your AI Agent to basic conversations. Watch how to configure and add powerful tools making your agent smarter and more functional.

Real results, real customers, real stories

“We're saving an average of 4,000+ calls a month.”
Implementing an Agent revolutionized our customer service channels and our service to Indiana business owners. We're saving an average of 4,000+ calls a month and can now provide 24x7x365 customer service️ along with our business services.
Lindsey Roark Mayes
Ex-Director of SOS IT (State of Indiana)
“Cutting down on staff needing to email back.”
Since our launch of Tars Agents, we've had more than 5k interactions with them from individuals on the website. We saw prospects interacting with the Agent regarding application timelines, tuition, curriculum, and other items that may come through an email. This provides another avenue of access to our team while cutting down on staff needing to email back.
Levi Eastwood
Marketing Director of UCI Merage School
“Powerful tool - and there's so much more still to explore!”
I love the flexibility of the TARS chatbot design tool. The ability to drop in a new gambit and easily de-link and re-link gambits before and after it saves HOURS of time lost if I had to regenerate from scratch. TARS stands out for its flexibility, consistent performance, and outstanding support.
Aaron Rittmaster
Founder
“I like the product.”
Takes those boring forms and allows you to make the collecting of customer information enjoyable for the user. It has a lot of value and I see the company constantly working on improving it.
Pierre Rattini
Director of Marketing
“Very responsive and supportive Team”
I love how supportive and responsive the team members are. The chatbots are not difficult to build once you have an idea of what you are doing, and this is so based on the backend work Tars has completed. Also, they are flexible to the clients' requests.
Keisha Cameron
Product Manager
“Easy for cooperation and open to agreement.”
One of the biggest qualities of TARS is their ability to truly understand their clients' needs. They took the time to thoroughly assess our requirements, offering valuable insights and recommendations that we hadn't even considered. This level of personalized attention made a significant difference in the success of our project.
Milica Petrovic
Customer Care Project Associate
“Great service”
The guys at Tars are so passionate about bots and maximum engagement. Tars is overall a great product with really nice people there to help me engage and automate conversations I would have otherwise missed.
Nigel Gosling
Health Coach
“Best in class for lead generation”
TARS is an essential tool within our lead gen strategy. I started to use it a couple years ago, and the platform evolved to focus on results. You can integrate your Google Analytics, Facebook Pixel, and AdWords conversion tag to track results and measure your campaign. You can also integrate with Zapier, which opens a lot of possibilities. Compared with static landing pages, we have seen an increase in conversions and more engagement.
Leonardo Wolff
Founder
“Very professional and cooperative”
Building an automated chat that our customers actually used and reduced calls amount.
Maryam Alhaddad
Customer Journey Designer
“Flexibility and good service”
Tars platform is very flexible, so you can do pretty much any flux you desire. Also integrates with any third party through APIs with a very simple and easy-to-use interface. Also tars team is great! Always at disposal and brings suggestions and solutions for any issue encountered during the process of building the chatbot.
Lucas Von Lachmann
Process Manager
“Deserved The title of the Best Chatbot of the Year”
If you are building chatbots, you cannot go wrong with TARS. I have been with this company since their beginning. Seen how they have grown. I have tested a lot of bots, but this one is still the best out there. We use WhatsApp a lot for our business. And what I like best is that I can have 1 chatbot for website and for my WhatsApp. I especially appreciate their support team as well. Whenever I am stuck, they quickly reply to my questions.
MJ Felix
Chairman
“Advanced integration, easy to use, and very customizable.”
This chatbot does everything from AI integration to complete customization and is excellent for lead conversion in most industries. I think the pre-formatted templates are an excellent boost to get started quickly. The team is also excellent.
Rachel Rowling
Chief Operating Officer
“The chatbot implementation has exceeded expectations!”
The implementation has delivered 24/7 customer support and is proving its value by reducing Contact center calls by around 5% in just four months of operation. Beyond enhancing the e-care experience, the chatbot is driving impressive business results, achieving a remarkable 20% month-on-month growth.
Victor Pereira
Customer Care and CX Manager
“We're saving an average of 4,000+ calls a month.”
Implementing an Agent revolutionized our customer service channels and our service to Indiana business owners. We're saving an average of 4,000+ calls a month and can now provide 24x7x365 customer service️ along with our business services.
Lindsey Roark Mayes
Ex-Director of SOS IT (State of Indiana)
“Cutting down on staff needing to email back.”
Since our launch of Tars Agents, we've had more than 5k interactions with them from individuals on the website. We saw prospects interacting with the Agent regarding application timelines, tuition, curriculum, and other items that may come through an email. This provides another avenue of access to our team while cutting down on staff needing to email back.
Levi Eastwood
Marketing Director of UCI Merage School
“Powerful tool - and there's so much more still to explore!”
I love the flexibility of the TARS chatbot design tool. The ability to drop in a new gambit and easily de-link and re-link gambits before and after it saves HOURS of time lost if I had to regenerate from scratch. TARS stands out for its flexibility, consistent performance, and outstanding support.
Aaron Rittmaster
Founder
“I like the product.”
Takes those boring forms and allows you to make the collecting of customer information enjoyable for the user. It has a lot of value and I see the company constantly working on improving it.
Pierre Rattini
Director of Marketing
“Very responsive and supportive Team”
I love how supportive and responsive the team members are. The chatbots are not difficult to build once you have an idea of what you are doing, and this is so based on the backend work Tars has completed. Also, they are flexible to the clients' requests.
Keisha Cameron
Product Manager
“Easy for cooperation and open to agreement.”
One of the biggest qualities of TARS is their ability to truly understand their clients' needs. They took the time to thoroughly assess our requirements, offering valuable insights and recommendations that we hadn't even considered. This level of personalized attention made a significant difference in the success of our project.
Milica Petrovic
Customer Care Project Associate
“Great service”
The guys at Tars are so passionate about bots and maximum engagement. Tars is overall a great product with really nice people there to help me engage and automate conversations I would have otherwise missed.
Nigel Gosling
Health Coach
“Best in class for lead generation”
TARS is an essential tool within our lead gen strategy. I started to use it a couple years ago, and the platform evolved to focus on results. You can integrate your Google Analytics, Facebook Pixel, and AdWords conversion tag to track results and measure your campaign. You can also integrate with Zapier, which opens a lot of possibilities. Compared with static landing pages, we have seen an increase in conversions and more engagement.
Leonardo Wolff
Founder
“Very professional and cooperative”
Building an automated chat that our customers actually used and reduced calls amount.
Maryam Alhaddad
Customer Journey Designer
“Flexibility and good service”
Tars platform is very flexible, so you can do pretty much any flux you desire. Also integrates with any third party through APIs with a very simple and easy-to-use interface. Also tars team is great! Always at disposal and brings suggestions and solutions for any issue encountered during the process of building the chatbot.
Lucas Von Lachmann
Process Manager
“Deserved The title of the Best Chatbot of the Year”
If you are building chatbots, you cannot go wrong with TARS. I have been with this company since their beginning. Seen how they have grown. I have tested a lot of bots, but this one is still the best out there. We use WhatsApp a lot for our business. And what I like best is that I can have 1 chatbot for website and for my WhatsApp. I especially appreciate their support team as well. Whenever I am stuck, they quickly reply to my questions.
MJ Felix
Chairman
“Advanced integration, easy to use, and very customizable.”
This chatbot does everything from AI integration to complete customization and is excellent for lead conversion in most industries. I think the pre-formatted templates are an excellent boost to get started quickly. The team is also excellent.
Rachel Rowling
Chief Operating Officer
“The chatbot implementation has exceeded expectations!”
The implementation has delivered 24/7 customer support and is proving its value by reducing Contact center calls by around 5% in just four months of operation. Beyond enhancing the e-care experience, the chatbot is driving impressive business results, achieving a remarkable 20% month-on-month growth.
Victor Pereira
Customer Care and CX Manager

Privacy & Security

We’ll never let you lose sleep over privacy and security concerns

At Tars, we take privacy and security very seriously. We are compliant with GDPR, ISO, SOC 2, and HIPAA.

GDPR
ISO
SOC 2
HIPAA

Still scrolling? We both know you're interested.

Let's chat about AI Agents the old-fashioned way. Get a demo tailored to your requirements.

Schedule a Demo