{ "error": { "code": "INVALID_PHONE_NUMBER", "message": "Phone number must include country code", "details": { "provided": "1234567890", "expected": "+1234567890" } }}
404 Not Found
Copy
{ "error": { "code": "INSTANCE_NOT_FOUND", "message": "Instance 'my-whatsapp' does not exist" }}
503 Service Unavailable
Copy
{ "error": { "code": "INSTANCE_NOT_CONNECTED", "message": "Instance 'my-whatsapp' is not connected" }}
# Check if instance is connectedcurl http://localhost:8000/api/v1/instances/my-whatsapp/status# Then send messagecurl -X POST http://localhost:8000/api/v1/messages ...
Handle Errors Gracefully
Copy
try: response = send_message(...) if response.status_code == 503: # Instance disconnected, reconnect reconnect_instance() elif response.status_code == 429: # Rate limited, wait and retry time.sleep(60)except Exception as e: log_error(e)
Use Message Traces for Debugging
Every message gets a unique ID for tracking:
Copy
# Get message detailscurl http://localhost:8000/api/v1/traces/{messageId}