detail field (FastAPI format) or structured error object.
Status code reference
| Code | Name | When it happens |
|---|---|---|
| 400 | Bad Request | Invalid platform, missing required body field, unsupported post type |
| 401 | Unauthorized | Missing, invalid, expired, or revoked API key |
| 403 | Forbidden | Plan feature blocked, API key scope mismatch, workspace header mismatch |
| 404 | Not Found | Draft, scheduled post, or resource ID does not exist |
| 422 | Unprocessable Entity | Validation failure — character limits, invalid enum, schema error |
| 500 | Internal Server Error | Unexpected server failure |
400 Bad Request
Common causes:| Scenario | Example detail |
|---|---|
| Unknown platform | Invalid or unsupported platform: 'twitter'. Supported: ... |
| Unsupported post type | This platform does not support text posting. |
Missing post_type | post_type is required |
Empty platforms | platforms must have at least one platform |
Invalid draft_platforms | draft_platforms must be a subset of platforms. Invalid: instagram. |
| Bluesky connect missing fields | handle and app_password are required for bluesky |
401 Unauthorized
Common causes:| Scenario | Response |
|---|---|
| No API key header | 401 — key required |
| Wrong key format | Invalid API key. (APIKEY_INVALID) |
| Revoked key | API key has been revoked. (APIKEY_REVOKED) |
| Expired key | API key has expired. (APIKEY_EXPIRED) |
403 Forbidden
Three distinct 403 cases:Plan feature blocked
| Feature gate | Routes affected |
|---|---|
api_keys_enabled | API key auth |
mcp_enabled | MCP server |
drafts_enabled | /unified/drafts, draft: true |
scheduling_enabled | scheduled_time, /unified/scheduled-posts |
analytics_enabled | /unified/analytics |
402 Payment Required for insufficient post or AI credits.
API key scope mismatch
linkedin,instagram or full).
Workspace mismatch
When using JWT +X-Workspace-Id, or when optional X-Workspace-Id with API key doesn’t match the key’s workspace:
X-Workspace-Id with API keys (workspace inferred from key).
404 Not Found
| Resource | Example |
|---|---|
| Draft | GET /unified/drafts/{id} — draft deleted or wrong ID |
| Scheduled post | PATCH /unified/scheduled-posts/{id} — invalid ID |
| Media | Referenced media_id not in workspace |
422 Unprocessable Entity
Validation errors before the request reaches platform APIs.Character limits
YouTube title
TikTok photo title
Pydantic schema
Malformed JSON types, wrong field types — FastAPI returns field-levelloc and msg arrays.
500 Internal Server Error
Unexpected failures — OAuth URL generation, storage upload, worker errors. Fix:- Retry with backoff
- Check request payload for edge cases
- Contact support if persistent
Rate limiting
Heavy API key usage may return rate limit errors (implementation-specific status, often429 or wrapped in 403 with APIKEY_RATE_LIMIT).
Include retry-after logic in production integrations.
Related
Postsiva errors
NOT_CONNECTED, plan codes
Authentication
Keys and scopes