Hello Alex,
Yes, you can call any API from Custom code including sendPushtoUser. This will trigger the Push notification to your app users from custom code instead of from app/client.
Please have a look here at our Custom Code tutorial and let us know if it helps.
P.S Sending push to users are not real time and are on best effort delivery. If you wan to use real time messaging, would be great to use AppWarp in that case.
Thanks,
Himanshu Sharma