Misar IO Docs

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

StatusMeaningCommon causes
400Bad RequestMissing required fields, invalid body JSON, failed Zod validation
401UnauthorizedNo session cookie or invalid API key
402Payment RequiredFree-tier post or repurpose limit reached
404Not FoundConnected account, post, or resource not found
409ConflictDuplicate post (same account + platform + time)
422Unprocessable EntitySafety gate blocked the post
429Too Many RequestsRate limit exceeded
500Internal Server ErrorUnexpected 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"
}
ReasonDescription
duplicate_contentIdentical text already posted to this account in the last 24 hours
daily_limitPer-account daily post limit reached
minimum_gapToo soon after the last post on this account
account_unhealthyAccount 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