Ionic Push Notification from device

Hi, I’m developing a reminder application to set reminders. I’m currently using the Ionic’s Push notifications (https://docs.ionic.io/services/push/#sending-pushes) to send pushes to my device. However, I have to go to the dashboard and create a push manually to do so.

In the event the user creates their own reminder and needs a notification sent from the dashboard at a specified time, how may I be able to do this?

https://docs.ionic.io/api/endpoints/push.html#post-notifications Has said to use
{
"tokens": ["DEVICE_TOKEN"],
"profile": "PROFILE_TAG",
"notification": { "message": "Hello World!"}
}`
But I’m unsure as to where to place this code under which function.

You call the API from your server backend.