HTTP Status Codes
Sheet Best is a RESTful API and uses standard HTTP status codes to signal success or failure. Codes in the 4xx range indicate a problem with the request; codes in the 5xx range indicate a problem on Sheet Best's side and are rare.
| Status | Description |
|---|---|
200 OK | Everything worked as expected. |
400 Bad Request | The request was unacceptable, often due to a missing parameter or insufficient permission to the spreadsheet. |
401 Authentication Failed | Incorrect authentication credentials. See API Keys. |
402 Payment Required | The operation isn't allowed in your current plan, or you've used all of your plan's monthly requests. Check X-RateLimit-Remaining. |
403 Forbidden | You don't have permission to perform this action. |
404 Not Found | The requested resource doesn't exist. Verify the connection ID, tab name, or row index. |
405 Method Not Allowed | The endpoint doesn't support that HTTP method (for example, POST to the /search endpoint). |
500 / 502 / 503 / 504 | Server errors on Sheet Best's end. |
Some 4xx responses also include a string error code you can branch on.
Inspecting the status
curl -i 'https://api.sheetbest.com/sheets/<id>'
const res = await fetch('https://api.sheetbest.com/sheets/<id>');
if (!res.ok) {
console.error(`Request failed: ${res.status}`);
}