When students say, „Thanks for inviting“, every English teacher in the world is screaming for them to add the word „me“. But more often than not, it doesn’t come. But without that small little word, it doesn’t make sense. Thanks for inviting who? We need to know who has been invited.
So, you have to say, „Thanks for inviting me.“
Another way of not making this mistake is to say, „Thanks for the invitation“ and it means the same thing.
So, let’s role-play a correct conversation:
A: I can’t come to your birthday but thanks for inviting me.
B: No problem. Are you going out somewhere else?
A: Yeah, I had already received an invitation to go to a ball. Sorry.