API reference
Errors
Errors use conventional HTTP status codes and one consistent JSON envelope. error is the human-readable message and error_code is the stable identifier to branch on.
error envelope
{
"success": false,
"error_code": "API_KEY_INVALID",
"error": "That API key is not valid."
}Error codes
400INVALID_REQUESTThe request body isn't valid JSON.401API_KEY_MISSING · API_KEY_INVALIDNo API key was sent, or the key sent isn't valid.402INSUFFICIENT_CREDITSYour account doesn't have enough credits for this screenshot.403USER_BLOCKED · API_KEY_REVOKEDThis account can't make API requests, or the key used has been revoked.404JOB_NOT_FOUNDNo screenshot with that id belongs to your account.409JOB_NOT_DELETABLEThat screenshot is still running. Wait for it to finish before deleting it.422VALIDATION_ERROROne or more capture settings were rejected.429RATE_LIMITEDToo many requests. Back off per Retry-After.503SCREENSHOT_SERVICE_UNAVAILABLEScreenshots are temporarily unavailable. Please try again shortly.These are the codes the API returns today. Branch on error_code where you need one, or on the HTTP status otherwise. Capture-time failures (timeouts, DNS, blocked pages) are not HTTP errors: they arrive as status: "failed" on the job, with their own error_code alongside — see Check job status.