Skip to main content

Error Response Format

Vouch API errors return a simple error message with the appropriate HTTP status code:
Some errors include additional details:

HTTP Status Codes

Error Codes Reference

Authentication Errors (401)

Cause: API key is invalid, expired, or malformed Solution:
  • Verify your API key is correct
  • Check you’re using the right environment (test vs live)
  • Regenerate key if compromised

Cause: Attempting to use server key from browser Solution: Use client key for browser/mobile applications

Request Errors (400)

Cause: Email parameter missing or empty Solution: Include valid email in request body
Cause: Malformed JSON in request body Solution: Ensure request body is valid JSON
Cause: Missing X-Project-Id header Solution: Include X-Project-Id header in all requests

Permission Errors (403)

Cause: Client key used from unauthorized domain Solution: Add domain to allowed list in dashboard
Cause: Project ID invalid or API key doesn’t have access Solution: Verify project ID and API key match

Quota Errors (402)

Cause: Monthly validation quota exhausted Solution:
  • Upgrade your plan
  • Wait for quota reset (1st of month)
  • Contact support for quota increase

Rate Limit Errors (429)

Cause: Exceeded hourly rate limit Solution:
  • Implement exponential backoff
  • Respect retryAfter value (seconds)
  • Use server keys for higher limits (5,000/hr vs 1,000/hr)

Server Errors (500)

Cause: Unexpected server error Solution:
  • Retry with exponential backoff
  • Contact support if persistent

Handling Errors

Retry Logic

Implement exponential backoff for transient errors:

Monitoring Errors

Response Headers

Check these headers to monitor quota and rate limits:

Logging Recommendations

Log errors with context for debugging:

Best Practices

Retry on:
  • RATE_LIMITED (with exponential backoff)
  • INTERNAL_ERROR (max 3 retries)
Don’t retry on:
  • UNAUTHORIZED (fix API key)
  • QUOTA_EXCEEDED (upgrade plan)
  • INVALID_EMAIL (invalid input)
Use the message field for quick user-facing errors, or check individual validations for custom logic:
Set up alerts when quota reaches 80%:

Next Steps

Error Handling Guide

Comprehensive error handling strategies

Rate Limits

Understanding and managing rate limits

Best Practices

Production deployment tips

Dashboard

Monitor quota and usage