api docs
api docs

Errors

Standard HTTP status codes and error response formats returned by the WhatAPI API.

Errors

Whatapi returns standard HTTP response status codes. All errors return a JSON body with an `error` field describing the issue.

CodeStatusMeaning
400Bad RequestMissing required parameters or malformed request body
401UnauthorizedMissing or invalid Authorization header
403ForbiddenInvalid API key, insufficient scope, or message limit exceeded
404Not FoundUser, client, session, or resource not found
429Too Many RequestsDaily rate limit hit
500Internal Server ErrorUnexpected server error
502Bad GatewayWhatsApp pairing disconnected or OpenWA backend unavailable

Error Response Format

{
  "error": "Invalid API key",
  "code": 401
}

Common Error Messages

ErrorLikely Cause
Missing Authorization headerNo API key or token provided
Invalid API keyKey not found, revoked, or expired
Insufficient scopeKey doesn't have the required permission
Rate limit exceededDaily request cap reached
Monthly message limit reachedAccount has used all allocated messages
WhatsApp session not foundNo active WhatsApp connection
WhatsApp pairing disconnectedSession is not connected to WhatsApp