Twitter could see your "viral marketing" as plain spam, and block your account. For an active account, with a well-earned number of followers, this can be disastrous.
Marketing for free is not impossible, but it requires you to work a lot. I'd recommend you to, instead of using Twitter API on your own, use a well-known established app such as Hootsuite. Its free account lets you add up to three accounts (from Twitter, Facebook, Instagram or LinkedIn) and schedule postings for all those accounts.
But, rather than just bragging about your poetry book, you also need to set up quality content in the same areas of interest your book covers. Schedule maybe up to three tweets a day about your book(s) and fill the rest of the day with retweets from poets or novelists you follow, and also interesting general purpose information, such as the news, curiosities, and any quality content you can think of. You need to build a following, with people who find you interesting, and will also find out you're a writer, too.
What you need, more than tweeting about you book(s), which is inevitable and also needed, is to get others to tweet about you and your works, which you'll get by establishing true friendship relationships with other writers and with your readers. Once you get people to talk about you, and not only read what you write about yourself, you'll know you're on the right path.
Anyway, keep your self promotion on Twitter or Facebook on a reasonable level. Don't send a tweet an hour about yourself or your books, as this will be considered spam and people will soon forget about you or directly block your account. I know it's hard to stand out when there are thousands of writers everywhere, but if you really have something different and valuable to offer, you will eventually be discovered by the right readers.
You can also try to get your book reviewed, on Amazon or other sites. You can send free copies of your book(s) to selected web sites, newspapers, magazines, etc. But, in case you choose to do this, keep in mind you have to be polite. You can't demand, but ask whether those people might be interested in reviewing your book, using the book itself as a payment. The biggest sites, and the most famous reviewers, will probably what to charge you, but with politeness, you can get almost anything. And remember: never send your book straight to anyone. First send just a polite proposal, be humble, and cross your fingers.
In the future, if you get famous enough, you might also get a literary agent, and, in that case, you'll have to worry less about your own promotion.
For further information, you can get several inexpensive book on Amazon which cover every aspect of online promotion.
Also, do not forget about traditional promotion. Keep in touch with local bookstores, libraries and readers clubs. Go to other writers' presentations and don't be shy to introduce yourself (politely). Join writers associations and seek advice from more experienced writers. And don't forget this will demand a lot of work from you, unless you are the next instant best seller, but every 99 writers out of 100 aren't, so don't quit if you don't get immediate success.