Send private message through CURL

Using the API, no you can’t.
The only way would be create a session with a firefox/chrome/ie user-agent, login, using regex and analysis of the source simulate your software as a web browser.