Yes, with the official WhatsApp Business API and correct opt-in management, operation is fully legal.
WhatsApp Bot Unna | Context Studios