Here is your periodic reminder on how to apologize properly. When you goofed, do the following;
1. Admit you have done something wrong and that you need to make up for it.
2. Take full responsibility for your actions and sincerely apologize to anyone you have harmed.
3. Apologize with urgency.
4. Tell those you have harmed specifically what you did wrong and how you feel about what you did.
5. Recognize that what you did is inconsistent with whom you want to be.
6. Make amends and demonstrate your commitment to not repeat the act by changing your behavior.
Note: They are under no obligation to forgive you.
This only works if you feel remorseful. Any lack of sincerity tends to announce itself. Own up and show some self-leadership.