Skip to Content
API ReferenceError Handling

Error Handling

The Prooflio API uses conventional HTTP status codes and returns a consistent JSON error body so you can handle failures programmatically.

Error Response Format

Every error response includes three fields:

{ "error": "unauthorized", "message": "Invalid or missing API key.", "details": [] }
FieldTypeDescription
errorstringA machine-readable error code (e.g., unauthorized, rate_limit_exceeded).
messagestringA human-readable summary of the error.
detailsarrayAn array of objects providing additional detail. May be empty.

Success Codes

Status CodeMeaningWhen Returned
200 OKRequest succeeded.All successful GET requests.

Client Error Codes

Status CodeError CodeMeaning
400 Bad Requestbad_requestThe request is malformed or contains invalid query parameters.
401 UnauthorizedunauthorizedAPI key is missing, invalid, expired, or revoked.
403 ForbiddenforbiddenAPI key is valid but the plan does not include API access.
404 Not Foundnot_foundThe requested resource does not exist (e.g., invalid widget ID).
429 Too Many Requestsrate_limit_exceededYou have exceeded the rate limit. See Rate Limits.

Server Error Codes

Status CodeError CodeMeaning
500 Internal Server Errorinternal_errorAn unexpected error occurred on our side. Try again later.

If you receive a 500 error repeatedly, please contact support with the request details so we can investigate.

Error Handling Example

const response = await fetch('https://app.prooflio.io/api/v1/reviews', { headers: { 'Authorization': 'Bearer YOUR_API_KEY' }, }); if (!response.ok) { const error = await response.json(); switch (response.status) { case 401: console.error('Authentication failed. Check your API key.'); break; case 403: console.error('API access requires a Growth plan or higher.'); break; case 429: const retryAfter = response.headers.get('Retry-After'); console.error(`Rate limited. Retry after ${retryAfter} seconds.`); break; default: console.error(`Error (${response.status}): ${error.message}`); } } else { const { data, pagination } = await response.json(); console.log(`Fetched ${data.length} of ${pagination.total} reviews`); }
Last updated on