I am using the TDLib API of telegram.
I know the receivers phone number.
How to send a message to him, no matter whether there is already a chat or not?
How to get the chat id?
Using official client, you can add them as a contact and message after that.
Thus, you need TDLib AddContact method and everything related to that, like GetContacts or SearchContacts.