In TalkBox you can compose a message and save it to be triggered later with an API call. This is a powerful feature that allows TalkBox communications to become part of complex systems with logic and triggers external to TalkBox.
API triggered communications are a new type of auto comm in TalkBox.
To set one up go to Communicate > Automated and click on the API Triggered tab.
Clicking the Add new API Triggered promotion button takes you through the normal composition sequence. The only channels available are email and SMS as these channels have specific recipients unlike social media and RSS. TalkBox will not ask for information about the recipients or the send time. This is purely about creating content.
On launch the message is saved but not sent. It will sit in your account waiting to be triggered by an API call.
When you return to your the list of API Triggered communications you will see your new promotion listed along with its promotion ID. This number is passed in with the API call to identify the promotion to be sent. The recipients are defined either by passing in contact IDs if they are already in your database or by passing in email addresses or mobile numbers (or both).
To trigger the communication send a POST request to /promotions/:id/communications with the following parameters:
- contact_ids Comma-separated list of contact IDs to send to.
- recipient_details Comma-separated list of email addresses or mobile numbers to send to.
- test Marks the send as a test for reporting purposes.
See the API documentation for more.
If you disable the promotion in the TalkBox interface it will not be sent when triggered with an API call. Similarly, if you edit the content the promotion ID will not change. This gives control over communications triggered via the API to non-technical users.