It is possible to send a notification with the app inactive

I'm talking about sending any signal, to inform a friend of mine that I sent him a message so that he can read it, just like the notification of a message sent with whatsapp, but without using the phone number.