Errors
Every error returns the same envelope so you can handle them with one code path.
Envelope
Minimal shape (no extra context to attach):
{
"status": 401,
"code": "INVALID_KEY",
"message": "Invalid API key"
}Some codes carry a details object with structured fields you can program against. Example for INSUFFICIENT_SCOPE:
{
"status": 403,
"code": "INSUFFICIENT_SCOPE",
"message": "This endpoint requires the 'posts:write' scope, which this token was not granted. Granted scopes: [posts:read, connections:read]. Mint a new key with the missing scope.",
"details": {
"required_scope": "posts:write",
"granted_scopes": ["posts:read", "connections:read"],
"token_kind": "workspace"
}
}Quota responses carry a details.upgrade_url so your integration can deep-link the end user to billing instead of asking them to navigate. Example for UPLOAD_QUOTA_EXCEEDED (the per-user post cap on Free):
{
"status": 429,
"code": "UPLOAD_QUOTA_EXCEEDED",
"message": "Monthly upload quota exceeded for this account. Upgrade to Creator or Team for unlimited posts.",
"details": {
"quota": "uploads",
"used": 5,
"limit": 5,
"remaining": 0,
"upgrade_url": "https://www.shortsync.app/settings?section=billing"
}
}Same shape for QUOTA_EXCEEDED (the per-org monthly API request cap), plus a details.resets_at ISO 8601 timestamp telling you when the counter resets:
{
"status": 429,
"code": "QUOTA_EXCEEDED",
"message": "Monthly API request quota exceeded for this organization. Upgrade to Creator or Team for a higher request cap.",
"details": {
"quota": "requests",
"used": 1000,
"limit": 1000,
"resets_at": "2026-07-01T00:00:00.000Z",
"upgrade_url": "https://www.shortsync.app/settings?section=billing"
}
}statusmirrors the HTTP status code, in the body for convenience.codeis a stable machine-readable identifier (UPPER_SNAKE_CASE). Switch on this, not onmessage.messageis human-readable and may change between versions.detailsis optional. When absent the field is omitted entirely (notnull). Shape depends oncode.- No stack traces or request context are ever returned in any environment. Those go to server logs and Sentry.
Codes you'll see
| HTTP | code | When |
|---|---|---|
| 400 | VALIDATION_ERROR | Request body or query params didn't pass shape validation. |
| 401 | MISSING_AUTH_HEADER | No `Authorization` header on the request. |
| 401 | INVALID_KEY | Token wasn't found in our table, or its prefix is unrecognized. |
| 401 | KEY_REVOKED | Token existed but was revoked. Mint a new one. |
| 401 | KEY_EXPIRED | Token was rotated and the grace window has passed. |
| 403 | INSUFFICIENT_SCOPE | Token is valid but lacks the scope this endpoint requires. |
| 404 | POST_NOT_FOUND / UPLOAD_NOT_FOUND / KEY_NOT_FOUND | Resource doesn't exist for this workspace. |
| 409 | UPLOAD_NOT_RECEIVED | POST /posts referenced an upload whose bytes haven't been PUT to the presigned URL yet. |
| 409 | POST_NOT_EDITABLE / POST_NOT_CANCELLABLE | Post is in a state that doesn't allow the operation (e.g. already published). |
| 413 | FILE_TOO_LARGE / STORAGE_QUOTA_EXCEEDED | GET /uploads/:id finalize: upload exceeds per-kind size cap (2 GB video, 20 MB image) or the workspace's storage quota. The S3 object is deleted before this response. |
| 415 | UNSUPPORTED_FILE_TYPE | GET /uploads/:id finalize: the stored Content-Type isn't in the allow-list (mp4, mov, webm, avi, mkv, jpg, png, webp, heic, gif). The S3 object is deleted before this response. |
| 429 | RATE_LIMIT_EXCEEDED | Per-key rate limit (60 req/min). Response carries `Retry-After` and `X-RateLimit-*` headers. |
| 429 | QUOTA_EXCEEDED | Monthly per-org request quota for the plan tier is used up. `details.upgrade_url` deep-links the user to billing. |
| 429 | UPLOAD_QUOTA_EXCEEDED | Free-tier per-user post cap (5/month) reached on POST /posts. `details.upgrade_url` deep-links the user to billing. |
| 429 | DAILY_LIMIT_REACHED | The workspace's daily posting limit for that platform is used up (see /docs/platforms/limits). Resets at midnight UTC. Scheduled posts can be moved to the next free slot instead. |
| 400 | X_POST_TOO_LARGE | X only: the post needs more units than a whole day has (20), such as a link in both the post and its first comment. Remove a link, or connect your own X app. |
| 400 | LIKE_UNSUPPORTED | POST /inbox/conversations/:id/like on a YouTube thread. The Data API v3 has no comment-like endpoint. Also raised for DM threads (only comment threads can be liked). |
| 403 | PLATFORM_SCOPE_MISSING | The connected platform account is missing a scope this operation needs. `details.platform` + `details.scope` identify which. Example: liking an Instagram comment without instagram_manage_engagement (only granted via the Facebook Login for Business upgrade). `details.upgrade_url`, when present, is the link the user opens to grant it. Don't retry until they have. |
| 500 | INTERNAL_ERROR | Something blew up on our side. We log it. Safe to retry. |
Partial failure on POST /posts
Multi-target fanout has special semantics. Request-shape errors (missing required fields, invalid upload_id, malformed targets) return 400 and create nothing.
Per-target operational failures (a connection's token expired, a platform rejected the post, etc.) do not fail the whole call. You'll get 201 with one post object per target. The failed ones carry status: "failed" and an error object on the post itself.
Always iterate data and check each post's status instead of relying solely on the HTTP code.
Retries
- Safe to retry: 5xx errors, network timeouts.
- Don't retry: 4xx errors (the request is wrong; retrying won't help). Fix the request first.
- Retry after backoff:
429 RATE_LIMIT_EXCEEDED. The response carriesRetry-After(seconds) plusX-RateLimit-Limit,X-RateLimit-Remaining, andX-RateLimit-Resetheaders. Default cap is 60 requests/minute per key. - Don't retry until next month:
429 QUOTA_EXCEEDED. The organization's plan-tier monthly quota is exhausted. Upgrade the plan or wait for the next UTC month. - Don't retry until midnight UTC:
429 DAILY_LIMIT_REACHED. The platform's daily posting limit for the workspace is used up. Limits per platform are on Daily posting limits.