Errors
MisarBlog API error codes and how to handle them.
The MisarBlog API uses standard HTTP status codes and returns a consistent JSON error body.
Error Format
{ "error": "Human-readable message" }All errors include a single error field with a description of what went wrong.
HTTP Status Codes
| Status | Meaning |
|---|---|
400 Bad Request | Invalid request body or query parameters |
401 Unauthorized | Missing or invalid API key |
403 Forbidden | Invalid CSRF token on a session-authenticated route (e.g. key management) |
404 Not Found | Resource does not exist or belongs to another user |
422 Unprocessable Entity | Valid JSON but fails business-logic validation (e.g. content quality checks) |
429 Too Many Requests | Rate limit exceeded (100 req/min per key) |
500 Internal Server Error | Unexpected server error |
Rate Limit Errors
When you exceed the limit of 100 requests per minute per API key, the API returns 429:
{ "error": "Rate limit exceeded — 100 req/min" }Session-authenticated routes (such as key generation) may also include a Retry-After header with the number of seconds to wait. Back off before retrying.
Common Errors
401 — Invalid API key
{ "error": "Invalid or missing API key" }Ensure your key starts with mbk_ and hasn't been revoked in Dashboard → Settings → API Keys.
404 — Article not found
{ "error": "Article not found" }Confirm the slug exists and is published (or use /drafts for unpublished content).
422 — Validation error
{ "error": "Content quality checks failed" }Fix the field described in the error message and retry.
Retries
Safe to retry on 429 (after back-off) and 500. Do not retry 4xx errors — they indicate a problem with the request that won't resolve on its own.