Xurel Docs

Errors

Errors return a consistent JSON envelope so SDKs and clients can branch on error.type.

Error format

Error envelope
{
  "error": {
    "type": "validation_error",
    "message": "Invalid to address",
    "detail": "to[0] is not a valid email",
    "field": "to"
  }
}

Error types

The type enum includes:

  • validation_error
  • not_found
  • rate_limited
  • domain_not_verified
  • unauthorized
  • forbidden
  • conflict
  • payment_required
  • suppressed_recipient
  • internal_error
  • idempotency_conflict

HTTP status codes

Status Meaning
400Validation error
401Missing or invalid API key
402Quota or subscription required
403Permission denied or account suspended
404Resource not found
409Conflict (state or idempotency)
422Semantic error (domain not verified, all recipients suppressed)
429Rate limited
500Internal error