API Reference
Errors
UniPost uses structured error responses so clients can distinguish validation issues, authorization failures, conflicts, and transient server errors without guessing from freeform text.
Error shape
Top-level API errors are returned in an error envelope. Validation-heavy endpoints may also include an issues[] array with field-specific detail.
Common codes
| HTTP | Code | Meaning |
|---|---|---|
| 400 | VALIDATION_ERROR | Malformed JSON or structurally invalid request |
| 401 | UNAUTHORIZED | Missing or invalid API key |
| 404 | NOT_FOUND | The requested resource is not in this workspace |
| 409 | CONFLICT | The request conflicts with current state, often around idempotency or draft promotion |
| 422 | VALIDATION_ERROR | The body is structurally valid but violates business rules |
| 500 | INTERNAL_ERROR | Unexpected server-side failure |
Platform-side errors
Per-platform publish failures usually appear in results[].error_message on a post response rather than as top-level API errors. That allows UniPost to represent partial success across platforms.