While email is often the preferred method, apologizing through professional messaging apps may be acceptable depending on your company's culture. Social media may not be appropriate for professional apologies.