Guide 2.18: Developer Guide

HTTP Status Codes Explained

SdashAPI strictly follows standard REST semantics. The HTTP status code returned in the headers (and duplicated in the JSON status field) tells you exactly what happened to your request.

Success Codes (2xx)

2.18.1

200 OK: Your request was completely successful. The API understood your parameters, your key was valid, and the requested data is located in the data property of the JSON payload.

Client Errors (4xx)

2.18.2

These codes indicate that your application did something wrong. You need to fix your code before retrying.

  • 400 Bad Request: You passed invalid parameters (e.g., passing a string for the limit instead of an integer).
  • 401 Unauthorized: You forgot to include the AccessToken header, or the key you provided does not exist.
  • 403 Forbidden: Your key is valid, but your account has been suspended for violating terms of service.
  • 404 Not Found: No questions matched your specific filters, or you tried to access an endpoint that doesn't exist (like /v5/).
  • 405 Method Not Allowed: You tried to send a POST or PUT request to an endpoint that only accepts GET requests.
  • 429 Too Many Requests: You have exceeded your monthly API quota. You must wait for the next billing cycle or upgrade your plan.

Server Errors (5xx)

2.18.3

500 Internal Server Error: Something went wrong on SdashAPI's end. Our database might be down, or we encountered an unexpected bug. You should implement retry logic on your end if you see this, as it is usually temporary.

What happens when you hit 429?

Next, we will discuss how SdashAPI calculates rate limits.

Next Guide: Rate Limits Explained →
Avatar

How can we help?

We reply immediately

Hello! 👋 How can we help you today?