I've tried the following:
curl -F name=document -F upload=@<path_to_the_file> \
-H "Content-Type:multipart/form-data" \
"https://api.telegram.org/bot<token>/sendDocument?chat_id=<chat_id>"
It returns {"ok":false,"error_code":400,"description":"[Error]: Bad Request: there is no document in request"}
What have I done wrong?
Here is some documentation on sendDocument
method.