Errors
Error codes and response shapes returned by the MisarSocial API.
Error Response Format
All API errors return JSON with an error field:
{ "error": "Human-readable error message" }Some endpoints return additional context fields (e.g., reason, limitReached, count, limit).
HTTP Status Codes
| Status | Meaning | Common causes |
|---|---|---|
400 | Bad Request | Missing required fields, invalid body JSON, failed Zod validation |
401 | Unauthorized | No session cookie or invalid API key |
402 | Payment Required | Free-tier post or repurpose limit reached |
404 | Not Found | Connected account, post, or resource not found |
409 | Conflict | Duplicate post (same account + platform + time) |
422 | Unprocessable Entity | Safety gate blocked the post |
429 | Too Many Requests | Rate limit exceeded |
500 | Internal Server Error | Unexpected server error |
Validation Errors
Validation failures from Zod return a structured error object:
{
"error": {
"formErrors": [],
"fieldErrors": {
"platform": ["Invalid enum value. Expected 'twitter' | 'linkedin' | ..."]
}
}
}Safety Gate Errors (422)
When a post is blocked by the scheduling safety gateway:
{
"error": "Post blocked by safety rules",
"reason": "duplicate_content"
}| Reason | Description |
|---|---|
duplicate_content | Identical text already posted to this account in the last 24 hours |
daily_limit | Per-account daily post limit reached |
minimum_gap | Too soon after the last post on this account |
account_unhealthy | Account token is expired or access was revoked |
Plan Limit Errors (402)
{
"error": "Free tier limit reached (10 posts/month). Upgrade to Pro.",
"count": 10,
"limit": 10
}Rate Limit Errors (429)
{
"error": "Too many requests. Please wait before scheduling more posts."
}Rate limit headers are included:
X-RateLimit-Limit: 30
X-RateLimit-Remaining: 0