Write from facts rather than momentum
Pause long enough to remove accusations, assumptions, and details that belong to someone else. For a message about how to apologize for not inviting a close friend, use this factual base: identify the moment, the impact on trust or inclusion, and what your friend should not have had to carry.
Offer a proportionate next step
Match the size of the request to the relationship and to what the recipient can reasonably decide now. Offer a repair that matches the harm and show how your behavior will be different. Make the immediate next step clear enough that the recipient can answer without reconstructing the entire history.
Protect privacy on both sides
Do not use shared history, mutual friends, or public gestures to pressure a private response. If contact is unwelcome, stop and avoid using mutual friends as messengers. Use the most private legitimate channel available and do not share the exchange to recruit support or pressure.