Handling Spamova API Errors
Every error response from the Spamova API includes an error field and a message field.
Always use the error value as your machine-readable code in application logic - it is stable across API versions. The message field is human-readable and intended for logging and debugging.
Some errors also include a meta object with quota details. See the service_unavailable section below for details.
400 - Bad Request Errors
These errors mean something is wrong with your request payload. Checks are not consumed. Fix the request before retrying.
invalid_json
The request body is not valid JSON, or is valid JSON but not an object.
Check that your request sets Content-Type: application/json and that the body is a valid JSON object. Arrays and primitives at the root level are not accepted.
invalid_payload
The request body could not be read.
Retry with a valid JSON request body.
invalid_request
A required field is missing or invalid.
For /api/v1/check, the request must include a non-empty email string. For /api/v1/bulk, the request must include a non-empty emails array of strings. Fix the payload before retrying.
bulk_limit_exceeded
The emails array contains more than 100 emails.
The request is rejected in full - no subset is processed and no checks are consumed. Split your input into batches of 100 emails or fewer before retrying.
401 - Unauthorized
unauthorized
The Bearer token is missing or invalid.
Check that your request includes the Authorization header in the correct format:
If you recently rotated your API key, make sure all instances of your integration are using the new key. No checks are consumed on authentication failures.
402 - Quota Exceeded
quota_exceeded
Not enough checks remain on your plan for this request.
Checks are not consumed when this error is returned. Your options:
- Wait for your plan to renew at the start of your next billing period
- Upgrade your plan to increase your monthly check limit
- If using bulk, reduce batch sizes to stay within remaining quota
Monitor meta.checks_remaining in bulk responses to track your quota proactively before hitting the limit.
403 - Forbidden Errors
access_denied
The API key belongs to an account whose plan does not include API access.
Upgrade to an API-enabled plan to resolve this.
bulk_blocked
Bulk checks are disabled for this API key.
Stop sending requests to /api/v1/bulk for this key. The /api/v1/check endpoint may still be available depending on your plan. Contact support if you believe this is unexpected.
405 - Method Not Allowed
method_not_allowed
The endpoint was called with a method other than POST.
Both endpoints only accept POST requests with a JSON body. GET, PUT, PATCH, and DELETE are not supported.
413 - Payload Too Large
payload_too_large
The request body exceeds the endpoint payload limit.
Reduce the size of your request body. For bulk requests, keep each batch at 100 emails or fewer. If you are hitting this on a single check, verify that your request is not including unexpected extra data.
429 - Rate Limited
rate_limited
The API key has exceeded its rolling rate limit for this endpoint.
No checks are consumed. Back off and retry after a short delay. A simple exponential backoff works well here:
If you are hitting rate limits regularly during high-volume jobs, switch to /api/v1/bulk to reduce the number of requests by up to 100x.
500 - Service Unavailable
service_unavailable
A temporary service problem prevented the request from completing.
This error covers two distinct situations:
Quota was never reserved - the failure happened before any checks were consumed. No checks are deducted. Retry with backoff.
Quota was reserved but the check failed - checks were reserved but the email check itself could not complete. In this case the response includes meta.checks_refunded and meta.checks_remaining, confirming the reserved checks have been returned to your account. Retry with backoff.
Check for the presence of meta.checks_refunded in your error handler to distinguish between the two cases:
If service_unavailable errors persist across multiple retries, pause your job and contact support.
General Error Handling Pattern
A robust error handler for any Spamova API call should cover retryable errors separately from errors that require a fix before retrying: