For people using the Sonar Ruby Gem. Check out the gem read me for more info.

For curl users, errors are rendered in json with an appropriate http code and message. The JSON looks like this:

{"error":"Bad Token"}

Here are the errors you may see:

Error NameCodeDescription
Bad Publishable-Key401The Publishable Key you used is incorrect or can't be found
Company inactive403Your company account has been set to inactive.
Company cancelled403Your company account has been cancelled
No Active Subscription403Your company doesn't have an active subscription or the free trial has expired
Api Disabled For Company403The API has been disabled for your company
Invalid Phone Number403The phone number you provided is invalid
Trial Customer Limit Reached403Your company has reached the limit of the number of customers it can add to Sonar as part of a free trial
Trial Message Limit Reached403Your company has reached the limit of the number of messages you can send as part of a free trial
Forbidden403General error for not being able to add a customer and sending a message