These are some common errors you might encounter when sending an API request to trigger an API Triggered Broadcast campaign, as well as the reasons you might be encountering them.
Reason: Your campaign trigger id wasn’t found. You can double-check it by looking at your campaign’s Triggering Details tab.
Reason: An issue with the recipients JSON. This is likely mistyped values, but also can be caused by improper or missing request headers when sending a JSON cURL request
(-H "Content-Type: application/json”)
Reason: Issues with the JSON formatting of the request. This could be mismatched opening or closing brackets, missing commas or quotes, etc.
Reason: Incorrect site ID and/or API key. Double-check the spelling of both and ensure they are formatted correctly (e.g. -u YOUR-SITE-ID-HERE:YOUR-SECRET-API-KEY-HERE when using cURL).
Reason: Possible misspelling of the request URI. The URI should look like the following (with the campaign id inserted): https://api.customer.io/v1/api/campaigns/:id/triggers
If you’ve encountered a different error, or need more help fixing one of these, please let us know!