WATI uses conventional HTTP response codes to indicate the success or failure of an API request. In general: Codes in the 2xx range indicate success. Codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted, a charge failed, etc.). Codes in the 5xx range indicate an error with WATI servers (these are rare).
|200||Everything worked as expected.|
|401||No valid API key provided.|
|403||The API key doesn't have permissions to perform the request.|
|404||The requested resource doesn't exist.|
|405||Please see if you are using the correct request method POST vs GET. Many of our APIs are POST requests.|
|500||Something went wrong on WATI's end. (These are rare.)|
If you call certain endpoints too frequently, you may run into the rate limit or see the error 429. Below are some rate limits that you may face, depending on your use case.
|/addContact||10 / 10 sec||You don't have to add contacts before sending your first message to the contact, WATI will add the contact to your account automatically if it's a new contact.|
|/getMessages||10 / 10 sec||We recommend using the webhook to receive incoming messages instead of retrieving via this endpoint|
|/sendTemplateMessage||50 / 10 sec *||If you are sending the same template to multiple contact at once, we recommend using /sendTemplateMessages instead.|
|/sendTemplateMessages||50 / 10 sec *||You can add up to 1000 contacts in 1 API call.|
For higher limits, please reach out to us about your use case!
*These limits refer to how quickly your application can call WATI APIs, message requests are then processed in a queue.