2
Messenger with API for bot accounts
(unilem.org)
Simplex chat has a command line client. You may beable to hack a api from that.
I also believe matrix has some sort of api
Simplex chat also has Haskell and Typescript apis iirc
This is a community to discuss FOSS encrypted communications.