An HTTP status code is the server’s compact result for a request. Read it with the response headers and JSON body to decide what succeeded and what to inspect next.
The useful status-code groups
| Group | Meaning |
|---|---|
| 2xx | Successful request |
| 3xx | Redirect or further action |
| 4xx | Request or permission problem |
| 5xx | Server-side failure |
The codes you will meet first
| Code | Meaning | Inspect next |
|---|---|---|
200 | Read or update succeeded | JSON body and expected fields |
201 | A POST created a resource | Save the returned UUID |
204 | Action succeeded without a body | Do not try to parse JSON |
301/308 | Redirect | Check the URL and trailing slash |
400 | Invalid input | Read field and validation details |
401 | Missing or invalid credentials | Check token presence and type |
403 | Authenticated but not permitted | Check visibility and scopes |
404 | Route or resource not found | Copy exact slugs and UUID |
409 | Conflict | Check duplicate or current state |
429 | Rate limited | Back off; do not retry immediately |
500/503 | Server unavailable or failed | Record request ID and retry safely |
Inspect status and body together
curl -i "https://meowmeowscratch.com/api/v1/YOUR_USERNAME/weather-station/readings/" \
-H "Authorization: Bearer $MEOW_APP_API_KEY"Code language: JavaScript (javascript)
The -i option prints the status line and headers before the JSON. A useful error includes a stable code, message, details and request ID. Never log the bearer token while troubleshooting.
A practical diagnostic flow
- Confirm the scheme, host, API version, username, app slug and endpoint slug.
- Confirm the method matches the intended operation.
- Check the trailing slash on management routes.
- Check the credential type and required scope without exposing its value.
- Read the JSON error details before changing the payload.
- For 429 or transient 5xx responses, retry with a bounded exponential backoff.
- For repeated 5xx responses, record the request ID, time and route for support.
Next step
For a deeper credential and retry flow, read REST API Authentication and Common Errors. To practice each method, return to HTTP Methods Explained.