Now there are a lot of implementation requirements, basically forcing you to have some kind of messaging provider. Therefore difficult to apply for an open source solution. However there is such an interface.
[0] https://developers.facebook.com/m/messaging-interoperability...
They don't have one for regular people who want to do regular end-user computation.
I totally understand why they try and make it hard for integration to happen. When compared to classic SMS, the fact that you need to start a conversation with a preapproved template means that they have a way to control casual interactions.
I understand that WhatsApp is kinda special in that it effectively replaced SMS in some parts of the world, but IMO this needs to be looked at through the lens of other Meta effort. The same is the case with Facebook/Messenger, and has been since before WhatsApp has been a (Meta) thing - they offer multiple different official ways to support spamming users and tricking them to buy stuff, but may the Lord have mercy on you should you want to create an auto-responder or "save to calendar" script and hook it up to your personal account.