---
title: "Error codes"
description: "Typed preflight validation issues and delivery failure codes returned by the PubNio API, SDK, CLI, and MCP server."
---

> Documentation Index
> Fetch the complete documentation index at: https://pubnio.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Error codes

PubNio returns typed error codes from `POST /api/v1/posts/{postId}/validate`
(preflight validation) and `GET /api/v1/posts/{postId}` (per-target delivery
status). Fix preflight issues before publishing to avoid failed attempts and
provider rate-limit waste.

## Platform error references

- [**Facebook Pages errors**](https://pubnio.com/docs/errors/facebook/) — Meta Graph permissions, token expiry, Reel, and Story failures.
- [**Instagram errors**](https://pubnio.com/docs/errors/instagram/) — Business/Creator prerequisites, container polling, and media validation.
- [**LinkedIn errors**](https://pubnio.com/docs/errors/linkedin/) — OAuth expiry, caption limits, and 100 MB PDF document validation.
- [**Pinterest errors**](https://pubnio.com/docs/errors/pinterest/) — Board readiness, required image media, and token revocation.
- [**TikTok errors**](https://pubnio.com/docs/errors/tiktok/) — Creator privacy levels, commercial disclosures, and upload errors.
- [**X (Twitter) errors**](https://pubnio.com/docs/errors/x/) — Character limits, thread splitting, OAuth expiry, and API fees.
- [**YouTube errors**](https://pubnio.com/docs/errors/youtube/) — Video readiness, privacyStatus validation, and Google OAuth quotas.

## Complete preflight issue catalog

Every code below comes directly from `@pubnio/protocol` (`PostIssue.code`):

### Post & target structure

| Code                      | Retryable | Root cause                                                                       | Fix                                                                         |
| ------------------------- | --------- | -------------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
| `no_targets`              | No        | The post has zero destination targets.                                           | Add at least one `targets[]` entry referencing an enabled account ID.       |
| `duplicate_target`        | No        | Two targets reference the same `accountId` and `placement`.                      | Remove the duplicate target or choose a different placement.                |
| `schedule_out_of_range`   | No        | `scheduledAt` is in the past or outside the allowed future window.               | Provide a future ISO 8601 timestamp with explicit UTC offset.               |
| `queue_and_time_conflict` | No        | Both `scheduledAt` and weekly queue assignment were supplied on the same target. | Pick either an explicit `scheduledAt` timestamp or `queue: true`, not both. |
| `settings_conflict`       | No        | Provider-specific target `settings` contain mutually exclusive options.          | Inspect `issue.path` and remove the conflicting setting key.                |

### Account & authorization

| Code                          | Retryable       | Root cause                                                                        | Fix                                                                               |
| ----------------------------- | --------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- |
| `account_not_found`           | No              | The `accountId` does not exist in the workspace.                                  | Call `GET /api/v1/integrations` to select a valid account ID.                     |
| `provider_mismatch`           | No              | The target's declared `provider` does not match the connected account's provider. | Omit redundant overrides or match the account's actual provider.                  |
| `account_not_ready`           | After reconnect | The connected account's OAuth token is expired, revoked, or disconnected.         | Reconnect the account in the PubNio workspace, then re-validate.                  |
| `account_unverified`          | After check     | Account readiness could not be confirmed with the provider yet.                   | Refresh account readiness via `GET /api/v1/integrations/accounts/{accountId}`.    |
| `publishing_not_supported`    | No              | The chosen provider or placement does not support publishing yet.                 | Inspect `GET /api/v1/integrations/capabilities` and choose a supported placement. |
| `publish_permission_required` | After reconnect | The OAuth grant is missing a required publishing scope.                           | Re-authorize the account in the workspace with publish permissions enabled.       |

### Content & media

| Code                    | Retryable | Root cause                                                                                 | Fix                                                                                                      |
| ----------------------- | --------- | ------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------- |
| `empty_content`         | No        | Neither text nor media was provided for a target that requires content.                    | Add caption text or attach a ready media ID.                                                             |
| `caption_too_long`      | No        | Text exceeds the destination placement's character limit (`caption.limit`).                | Shorten the caption or add a shorter target-specific text override.                                      |
| `media_required`        | No        | Placement (such as Instagram Feed/Reel, Pinterest Pin, TikTok, or YouTube) requires media. | Import or upload media and attach its `mediaId` to the target.                                           |
| `media_unresolved`      | No        | A referenced `mediaId` was not found in the workspace.                                     | Upload or import the asset first and pass the returned `mediaId`.                                        |
| `media_not_ready`       | Yes       | Media import or verification is still in progress.                                         | Poll `GET /api/v1/media/{mediaId}/status` until it reports `ready`, then re-validate.                    |
| `media_count`           | No        | Attached media count is below minimum or above the placement's maximum.                    | Adjust the `media` array (for example, 1 video for Reels/YouTube, 2–20 for carousels).                   |
| `media_type`            | No        | Media kind (image, video, document) does not match the placement.                          | Supply a matching media type for the selected placement.                                                 |
| `media_mime_type`       | No        | File MIME type is rejected by the provider (for example, unsupported codec or container).  | Convert to a supported MIME type (such as `image/jpeg`, `image/png`, `video/mp4`, or `application/pdf`). |
| `media_too_large`       | No        | Asset exceeds the provider's byte-size ceiling (such as 100 MB for LinkedIn PDFs).         | Compress or trim the asset below the platform ceiling and re-import.                                     |
| `media_upload_required` | No        | Provider requires PubNio-staged upload bytes rather than a raw external URL.               | Call `POST /api/v1/media/import` first and reference the returned workspace `mediaId`.                   |
| `media_unverified`      | Yes       | Media dimensions or metadata have not finished inspection.                                 | Wait for `GET /api/v1/media/{mediaId}/status` to report ready metadata before publishing.                |

### TikTok-specific rules

| Code                         | Retryable | Root cause                                                                        | Fix                                                                                 |
| ---------------------------- | --------- | --------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
| `tiktok_privacy_unsupported` | No        | Requested `privacy` level is not permitted for the creator account.               | Inspect allowed privacy levels on the account (unaudited apps require `SELF_ONLY`). |
| `tiktok_disclosure_required` | No        | Commercial/branded content disclosure flag is required for the selected settings. | Set explicit commercial disclosure fields in target `settings`.                     |
| `tiktok_upload_required`     | No        | TikTok target requires staged video or photo upload media.                        | Import media into PubNio first and attach `{ mediaId }` entries.                    |
| `tiktok_too_many_mentions`   | No        | Caption exceeds TikTok's allowed `@mention` count.                                | Reduce the number of `@mentions` in the TikTok target caption.                      |

## Delivery outcome states

Once published, each destination settles independently. Targets and posts use
one vocabulary: `scheduled`, `queued`, `submitting`, `confirming`,
`published`, `provider_draft`, `failed`, `unresolved`, and `cancelled`.
`scheduled` is derived from a queued attempt with a future `scheduledAt`.

- `published`: Confirmed live by the provider with `providerRef: { id, kind }` and an optional `url`.
- `provider_draft`: Saved as a native provider draft (for example, TikTok inbox draft).
- `failed`: Definitive failure (cost `$0`); read `canRetry` and `nextAction`, fix the root cause, and retry only the failed target.
- `unresolved`: Timeout or ambiguous provider response. Read `canReconcile` and `nextAction`; do not blindly create a new post.
- `cancelled`: Unreserved scheduled attempt cancelled before execution (cost `$0`).

Source: https://pubnio.com/docs/errors/index.mdx
