You can do whatever you program your bot to do. If you want it to interact with your own API then it’s entirely up to you to write the code that will allow it to make those requests your API requires.
If you’re using a bot developed by someone else, then you’d have to look at their documentation to see what features their bot has and if it has the capability to send requests to other services external to Twitch.