PostHero API

v1 Reference

Error Handling

All errors follow a consistent format with success: false, a human-readable error message, and a machine-readable error code.

Error Codes

CodeStatusDescription
UNAUTHORIZED401Missing or invalid API key
FORBIDDEN403Account not active or no API plan
NOT_FOUND404Resource not found
VALIDATION_ERROR400Invalid request parameters
RATE_LIMITED429Too many requests (60/min)
PLATFORM_LIMIT429Monthly post limit reached (100/month)
ACCOUNT_NOT_FOUND400Social media account not found
PUBLISH_FAILED500Publishing failed on one or more platforms
INTERNAL_ERROR500Server error

Error Response Format

{
  "success": false,
  "error": "Human-readable error message",
  "code": "MACHINE_READABLE_CODE"
}