I think there's a plugin or 2 that let you export your notes as a blog.
However, if you prefer to use Joplin server it does have an API. I don't think it's documented so you'd have to reverse-engineer it from the code or by capturing network traffic.
UPD
Here are the plugins I mentioned: