1. Home
  2. Knowledge Base
  3. Automations
  4. API Triggered Communications

API Triggered Communications

Contents

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.

Automated > API Triggered

Clicking the Add new button takes you through the normal composition sequence.  The only channels available are email and SMS as these channels have specific recipients – 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 communication listed along with its promotion ID. This number is passed in with the API call to identify the communication 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.

Updated on October 17, 2023

Was this article helpful?

Related Articles

Need Support?
Can't find the answer you're looking for?
Contact Support