You must log in or register to comment.
Yes, there is an API that all of the clients use (Voyager, Jerboa, etc). Automated posts would use the same API from a user with the bot flag set. See https://join-lemmy.org/docs/contributors/04-api.html for more information.
As mentioned before there is indeed an API. Please keep in mind that some instances have rules on how to run a bot. On lemmy.world for instance you need express permission from the mods of the community you are using the bot in, you should obviously mark the bot account as a bot account and the name should make it clear that it is in fact a bot.