Skip to main content

Error Reference

All Naturalead API errors follow a consistent JSON format:

HTTP Status Codes

400 Bad Request

The request body or query parameters are invalid.

401 Unauthorized

Authentication is missing or invalid.

403 Forbidden

Authenticated but insufficient permissions. 403 responses use a two-field format: {"error": "Forbidden", "message": "..."}.

404 Not Found

The requested resource doesn’t exist or belongs to a different account.

409 Conflict

The request conflicts with current state.

429 Too Many Requests

Rate limit exceeded. Check the RateLimit-* headers for timing. Recovery: Wait for the Retry-After header value (seconds), then retry. See Rate Limits for details.

500 Internal Server Error

An unexpected error occurred on the server.

503 Service Unavailable

A required integration or service is not configured.

Error handling best practices

  1. Check the status code first — branch your logic by HTTP status.
  2. Parse the error field — it contains a human-readable message suitable for logging.
  3. Use details when available — some errors include additional context.
  4. Implement retry with backoff — for 429 and 500 errors, use exponential backoff with jitter.
  5. Never retry 400, 401, 403, 404 — these require fixing the request, not retrying.