API Triggered Broadcasts - Common API errors

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.

“status”:”404”

{  
  "errors":[  
    {  
      "detail":"not found (reference 01C4MWKQA9XTFNYR68QB7JJ0XA)",
      "status":"404"
    }
  ]
}

Reason: Your campaign trigger id wasn’t found. You can double-check it by looking at your campaign’s Triggering Details tab.

“status”:”422”

{
  "errors":[
    {
      "detail":"recipients filter is not valid",
      "source":{
        "pointer":"/data/attributes/recipients"
      },
      "status":"422"
    }
  ]
}

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”)

“status”:”400”

{
  "errors":[
    {
      "detail":"bad request (reference 01C4MWXZPAR1SHBSZT4ZMZ6KZV)",
      "status":"400"
    }
  ]
}

Reason: Issues with the JSON formatting of the request. This could be mismatched opening or closing brackets, missing commas or quotes, etc.

“status”:”401”

{
  "errors":[
    {
      "detail":"unauthorized",
      "status":"401"
    }
  ]

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).

Method Not Allowed

Method Not Allowed

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

Need help?

If you’ve encountered a different error, or need more help fixing one of these, please let us know!