Error Codes

Reference for all error responses returned by the YourSend API.

Error Format

All error responses follow a consistent JSON format:

{
  "error": {
    "code": "invalid_to",
    "message": "Human-readable error message",
    "status": 400
  }
}

HTTP Status Codes

CodeMeaning
200Success
400Bad Request — missing or invalid parameters
402Payment Required — insufficient wallet balance
403Forbidden — invalid/missing API key, suspended, or quota exceeded
404Not Found — resource does not exist
429Rate Limited — too many requests
500Internal Server Error — try again later

Error Codes

CodeHTTPDescription
invalid_api_key403The API key is invalid, revoked, or missing
invalid_request400A required field is missing or malformed
invalid_to400Recipient email or phone format is invalid
invalid_channel400Channel must be email, sms, voice, whatsapp, or auto
channel_mismatch400Recipient address does not match the channel
insufficient_balance402Wallet balance is too low to send
quota_exceeded403You have exceeded your plan quota
rate_limited429Too many requests — slow down
not_found404The requested resource does not exist
expired400The verification code has expired
already_verified400The code has already been used
max_attempts400Too many verification attempts
internal_error500Something went wrong — try again later