That is a tough one. Apologies are better to do in person, if possible. But if it is not possible, choose your words carefully for the text. Don't be trite. Own the problem. Don't use cute emojis or try to minimize the problem.