Skip to main content

List of API response codes

2Chat uses standard HTTP response codes to contextually indicate the result of an operation. These codes try to be as contextual as possible based on the source request.

For example, an HTTP 404 reply indicates that a resource couldn't be found, but the resource being referred to could be a contact, a number, or a message, and it will always depend on the context of the request.

The API will also include a message field on each response that will contain a description of the error to disambiguate the response's error code further.

HTTP response codes

HTTP CodeDescription
200Successfully executed retrieval operation.
201Content created, for example, during a contact creation.
202Request accepted, usually to be processed asynchronously.
400Bad request. Check if you are calling the endpoint using the right JSON structure.
401Unauthorized, usually in the context of an invalid API key.
402Payment required, usually when trial accounts expire, or when API credits need to be recharged.
403Operation is forbidden. For example, trying to execute a flow that is not public, or connect a WhatsApp number that already exists.
406Trying to execute an operation on a resource that doesn't support it. For example, trying to add a catalog to a non-WhatsApp Business account.
410WhatsApp number is in the process of connection or disconnection. Try again in a few seconds.
422Malformed or invalid request. Check if you are calling the endpoint using a number that is properly formatted (E.164 format).
429Too many requests in too short a time. Check the API for your plan, and make sure to retry the request automatically.
503Service temporarily unavailable. Check the error message to clarify which service.
504Bad gateway. 2Chat API may be temporarily down. Retry the request after a few seconds.