Docs/API Reference/Errors & Codes

Errors & Status Codes

The EmailSendX API uses standard HTTP status codes. Every error response includes a human-readable error field in the JSON body to help you diagnose issues quickly.

Error Response Format

All error responses have a consistent JSON structure:

json
{
  "error": "Human-readable description of what went wrong"
}

The error field always contains a message written for developers. It describes the problem clearly enough to act on without needing to look up error codes.

Successful responses do not include an error field. You can always check the HTTP status code first: 2xx means success, 4xx means a client error, 5xx means a server error.

HTTP Status Codes

CodeStatusMeaningAction
200OKThe request succeeded and returned the requested data.No action needed.
201CreatedA new resource was created successfully.The response body contains the new resource.
202AcceptedAn async operation was accepted and will be processed.The result will be available via webhook or polling.
400Bad RequestThe request body was invalid, malformed JSON, or a required field was missing.Check the error message for the specific field or validation issue.
401UnauthorizedThe API key was missing, invalid, revoked, or the key's IP restriction blocked the request.Verify your API key is correct and hasn't been deleted.
403ForbiddenThe API key is valid but lacks the required scope for this operation.Add the required scope to your key in Settings → API.
404Not FoundThe requested resource doesn't exist or doesn't belong to this workspace.Verify the resource ID and that it belongs to the workspace of your API key.
429Too Many RequestsYou've exceeded the rate limit of 120 requests/minute.Check the Retry-After header and wait before retrying.
500Internal Server ErrorAn unexpected error occurred on the server.Retry with exponential backoff. If it persists, contact support.

On 5xx errors, use exponential backoff

Server errors (5xx) are typically transient. Implement exponential backoff: wait 1s, then 2s, then 4s, then 8s between retries. After 4–5 retries, surface the error to your monitoring system.

On 401, check your key status

A 401 response after a key was previously working usually means the key was deleted, or your server's IP no longer matches the key's IP restriction. Check Settings → API in the dashboard.

Common Error Messages

Below are frequently encountered error messages, what causes them, and how to fix them.

Error MessageStatusCause & Fix
"Invalid email address"400The email field is not a valid email format. Check for typos or missing @ symbol.
"email is required"400The request body is missing the required email field. Include it in your JSON body.
"List not found in workspace"404The listId you provided does not belong to your workspace. Verify the list ID using GET /lists.
"Contact not found"404The contact ID in the URL path does not exist in this workspace. Confirm the contact ID is correct.
"Automation not found or not active"404The automation ID doesn't exist, belongs to another workspace, or is paused/draft. Only active automations can be enrolled via API.
"Missing required scope: contacts:write"403Your API key does not have the contacts:write scope. Edit the key in Settings → API to add the scope.
"API key not found or has been revoked"401The key in your Authorization header has been deleted. Create a new key and update your integration.
"Rate limit exceeded. Retry after N seconds."429You've sent more than 120 requests in the last minute. Wait the specified seconds before retrying.
"Request body too large"400The bulk contacts array or event data payload exceeds the size limit. Split bulk imports into smaller batches.
"contacts array must not exceed 1000 items"400You passed more than 1,000 contacts to the bulk endpoint. Split your import into batches of ≤1,000.

Still stuck?

If you're seeing an error not listed here, reach out to support with your request details and the error message.