Skip to main content
The API uses standard HTTP status codes and returns a consistent JSON error envelope.

Error envelope

  • message — always present. Safe to surface to end users.
  • errors — present on 422 validation failures. Each key is the offending field; each value is an array of per-field messages.

Status code reference

Validation errors

The 422 shape mirrors Laravel’s validation output:
Use the errors object to display field-level messages in your UI. The numeric suffixes (e.g. media_content_ids.0) indicate which entry in an array failed validation.

Authentication errors

Resource not found

Publish failures

Posts that successfully reach the API but fail when handed off to the social network surface their error in two places:
  1. The post’s status becomes failed.
  2. error_message on the post contains the network’s error description (e.g. “Instagram: Media aspect ratio not supported”).
The HTTP response from the original create call was 200 — the failure is reported asynchronously. Always check status after creating a post, especially for scheduled posts that publish minutes or days after creation.

Retrying safely

Reporting an error

If you see consistent 5xx responses or behaviour that looks wrong, email support@publishbuddy.com with:
  • The endpoint and method
  • The approximate timestamp (UTC)
  • The X-Request-Id header from the failing response, if present
  • A redacted dump of the request body (omit your token)
That gives us enough to find the request in our logs.