Error response format
A machine-readable error code string. Use this in your application logic to classify errors programmatically.
A human-readable description of what went wrong. Safe to log and display in developer-facing output.
The HTTP status code, mirrored inside the response body for convenience.
HTTP status codes
| Status | Code string | Meaning |
|---|---|---|
200 | — | Request succeeded. The response body contains the requested data. |
400 | BAD_REQUEST | One or more query or path parameters are invalid or missing. Fix the request before retrying. |
401 | UNAUTHORIZED | The X-API-Key header is missing, malformed, or the key does not exist. |
403 | FORBIDDEN | The key is valid and active but does not have permission for this operation (e.g., accessing a paid-tier field with a free-tier key). |
404 | NOT_FOUND | The requested resource — typically a farm ID — does not exist in the dataset. |
429 | RATE_LIMITED | Your key has exceeded the request limit for the current window. Check X-RateLimit-Remaining before sending further requests. |
500 | INTERNAL_ERROR | An unexpected server-side error occurred. This is not caused by your request and is safe to retry. |
Retry guidance
When to retry
Retry on429 and 500 responses using exponential backoff:
- Wait before the first retry (e.g., 1 second).
- Double the wait time on each subsequent attempt (e.g., 2 s, 4 s, 8 s).
- Add a small random jitter to avoid synchronized retry storms when multiple clients hit the limit simultaneously.
- Cap the maximum wait time (e.g., 60 seconds) and the number of attempts (e.g., 5).
429 specifically, inspect the X-RateLimit-Remaining header. If it reaches 0, pause all requests until the rate limit window resets rather than issuing retries immediately.
When not to retry
Do not retry these without fixing the underlying issue first:400 BAD_REQUEST— Your request is missing a required parameter or contains an invalid value. Correct the request.401 UNAUTHORIZED— Your API key is missing or invalid. Verify the key value and that theX-API-Keyheader is being set.403 FORBIDDEN— Your key does not have access to the requested resource or field. Check your plan tier.404 NOT_FOUND— The farm ID you requested does not exist. Verify the ID in your data.