# Error codes

Source: https://ampost.io/docs/errors · Full reference: https://ampost.io/llms-full.txt

## Errors

```json
{
  "error": {
    "code": "VALIDATION_FAILED",
    "message": "media[0].type: Invalid option: expected one of \"image\"|\"video\"",
    "details": {
      "issues": [
        {
          "path": "media[0].type",
          "message": "Invalid option: expected one of \"image\"|\"video\""
        }
      ]
    }
  }
}
```

```json
{
  "error": {
    "code": "INVALID_PLACEMENT",
    "message": "\"instagram\" does not support placement \"reel\" with current media (single-image). Available: feed, story",
    "details": {
      "platform": "instagram",
      "placement": "reel",
      "mediaShape": "single-image",
      "available": [
        "feed",
        "story"
      ]
    }
  }
}
```

```json
{
  "error": {
    "code": "QUOTA_EXCEEDED",
    "message": "Post limit reached (15 posts in 30 days). It resets at 2026-11-05T09:00:00.000Z.",
    "details": {
      "quota": "postsPerMonth",
      "limit": 15,
      "used": 15,
      "resetsAt": "2026-11-05T09:00:00.000Z",
      "tier": "free",
      "upgradeUrl": "https://ampost.io/app/settings/billing"
    }
  }
}
```

| Code | HTTP | Meaning |
|---|---:|---|
| `INVALID_REQUEST` | 400 | The body is not JSON, or the multipart form cannot be read. |
| `VALIDATION_FAILED` | 400 | A field is missing, has the wrong type or breaks a platform rule, or an id is not a UUID. `details.issues` lists each problem with its path. |
| `CONTENT_TOO_LONG` | 400 | The effective text is longer than the platform allows. |
| `UNSUPPORTED_MEDIA_TYPE` | 400 | The platform does not accept this media type. |
| `UNSUPPORTED_MEDIA_CONFIG` | 400 | The platform does not accept this combination of media. |
| `MIXED_MEDIA_NOT_SUPPORTED` | 400 | The platform cannot mix images and videos in one post. |
| `INVALID_PLACEMENT` | 400 | The placement does not fit the media. `details.available` lists the allowed values. |
| `MEDIA_FETCH_FAILED` | 400 | Ampost could not download a media URL: it failed, timed out, redirected too often or led to a private address. `details.field` names the item. |
| `PLATFORM_NOT_CONNECTED` | 400 | The platform set has no active account for a requested platform. Connect one with `accounts_connect`, or target another set. |
| `TOO_MANY_ROWS` | 400 | `posts_import_csv`: the file has more rows than the plan imports at once. `details` has `rows`, `maxRows` and `tier`; split the file. |
| `UNAUTHORIZED` | 401 | The API key is missing, invalid or revoked (on MCP also an expired or revoked OAuth access token). |
| `INSUFFICIENT_SCOPE` | 403 | The API key or connected app lacks the scope this operation needs. `details.requiredScope` names it. |
| `PLATFORM_SET_NOT_ALLOWED` | 403 | The API key is restricted to other platform sets. `details.platformSetId` names the refused set (null when creating a set). |
| `UPGRADE_REQUIRED` | 403 | The plan does not include this feature (scheduling and queues, X publishing and X analytics). `details` has `feature` or `platform`, and `tier`, plus `upgradeUrl` (the billing page; not on Scale) to give the user. |
| `PLATFORM_COMING_SOON` | 403 | The platform is coming soon (`availability: "coming_soon"` in `platforms_list`) and not open to this account yet. Connecting it (`accounts_connect`), posting to it (`posts_create`, `posts_update` targets, `posts_import_csv` rows, `posts_publish`, `posts_retry`), editing or deleting its posts (`posts_edit_published`, `posts_unpublish`), filtering posts by it (`posts_list`) and its analytics are refused; `posts_validate` reports it per platform. `details.platform` names it. Leave the platform out of the request. |
| `SCHEDULED_POSTS_LIMIT_REACHED` | 403 | Scheduling (`scheduledFor` or `useQueue` on `posts_create`, `posts_update` on a draft, a `posts_import_csv` row) would go over the plan's scheduled posts at a time (Pro 100, Max 500 and Scale 5,000). `details` has `limit`, `used` and `tier`. After a downgrade the posts already scheduled stay and publish; new ones fit once enough have gone out. |
| `ACCOUNT_LIMIT_REACHED` | 403 | The plan's social account limit is reached (`accounts_connect`). `details` has `limit`, `used`, `tier` and `upgradeUrl` (the billing page; not on Scale). Also a platform post's `error.code` (code and message only, no `details`) and an account's health issue when the account is beyond the limit after a downgrade or a smaller plan: only the accounts connected first, up to the limit, publish until the user disconnects some or upgrades. |
| `CONNECT_LINKS_BLOCKED` | 403 | `accounts_connect`: someone reported one of this account's hosted connection links, so new links are paused until Ampost reviews the report. Write to support@ampost.io. |
| `ACCOUNT_SUSPENDED` | 403 | Ampost suspended this account, usually after an abuse report: API keys, connected apps and the dashboard stop working, and scheduled posts fail with this code instead of publishing. Write to support@ampost.io. |
| `APPROVAL_REQUIRED` | 403 | Approval mode: this caller's posts need an approver (an API key or app with only `posts:propose`, or an Editor in a workspace whose posts need approval), or the post waits for approval. Publishing, scheduling, retrying, unpublishing, editing a published post and changing a scheduled post are refused; submit the draft with `posts_submit` (`posts_create` with `publishNow` or `scheduledFor` submits it for you). |
| `APPROVER_ROLE_REQUIRED` | 403 | Approval mode: `posts_approve` and `posts_reject` need the Owner, Admin or Approver role in the workspace (and `posts:write`), with access to every account of the post. |
| `WEBHOOK_KEY_REVOKED` | 403 | `webhooks_update` cannot turn on a webhook with `disabledReason: "key_revoked"`; the user turns it on in the dashboard. |
| `ANALYTICS_NOT_ENABLED` | 403 | No matching account has analytics enabled (X needs `accounts_set_analytics`; LinkedIn is coming soon). `details.accounts[]` gives each account's `reason`. |
| `NOT_FOUND` | 404 | No endpoint at this path. |
| `POST_NOT_FOUND` | 404 | No post with this id belongs to you. |
| `ACCOUNT_NOT_FOUND` | 404 | No account with this id belongs to you. |
| `PLATFORM_SET_NOT_FOUND` | 404 | No platform set with this id belongs to you. |
| `CONNECT_REQUEST_NOT_FOUND` | 404 | No connection request with this id belongs to you. |
| `MEDIA_UPLOAD_NOT_FOUND` | 404 | No media upload with this id belongs to you. |
| `WEBHOOK_NOT_FOUND` | 404 | No webhook with this id belongs to you. |
| `DELIVERY_NOT_FOUND` | 404 | No delivery with this id belongs to the webhook. |
| `METHOD_NOT_ALLOWED` | 405 | The path exists but not with this method. `details.allowed` and the `Allow` header list the methods. |
| `NOT_PENDING_APPROVAL` | 409 | `posts_approve` or `posts_reject`: the post does not wait for approval (`approval.status` is not `pending`). `details.approvalStatus` gives where it stands. |
| `INVALID_STATUS_TRANSITION` | 409 | The post's status does not allow this action, for example `posts_update` on a published post. |
| `IDEMPOTENCY_KEY_REUSED` | 409 | The idempotency key was already used for a different request. Send a new key for a new action. |
| `IDEMPOTENCY_REQUEST_IN_PROGRESS` | 409 | A request with this idempotency key is still running. Retry with the same key a few seconds later. |
| `QUEUE_EMPTY` | 409 | `useQueue`: the platform set's queue has no slots. Add slots with `queue_update`. |
| `QUEUE_FULL` | 409 | `useQueue`: every slot of the queue in the next 366 days is taken. |
| `QUEUE_SLOT_TAKEN` | 409 | `useQueue`: concurrent requests kept taking the free slots. Retry. |
| `ACCOUNT_NEEDS_RECONNECT` | 409 | The account is disconnected, or the platform no longer accepts its access (`accounts_list_boards`, `accounts_set_board`). Reconnect it with `accounts_connect` and its id as `accountId`. |
| `PLATFORM_SET_LIMIT_REACHED` | 409 | You already have the maximum number of platform sets. |
| `LAST_PLATFORM_SET` | 409 | Your last platform set cannot be deleted. |
| `PLATFORM_SET_IN_USE` | 409 | An account was connected to the platform set while it was being deleted. Retry the delete. |
| `WEBHOOK_LIMIT_REACHED` | 409 | You already have the maximum number of webhooks. `details.limit` gives it. |
| `PLATFORM_ALREADY_CONNECTED` | 409 | `accounts_connect`: the platform set already has an active account for this platform. A set holds one account per platform: connect the second account into another set, or disconnect the first. |
| `CONNECT_IN_PROGRESS` | 409 | `accounts_connect`: the user is finishing a connection for this platform and set right now. Poll the open request, then try again. |
| `SOCIAL_ACCOUNT_IN_USE` | 409 | Free plan: the social account is connected in another Ampost workspace, or was disconnected from one less than 30 days ago. A paid plan can connect it. |
| `PAYLOAD_TOO_LARGE` | 413 | The request body is over 4 MB; send large files with a media upload. A body over 4.5 MB never reaches Ampost: the hosting edge answers a plain-text 413 `FUNCTION_PAYLOAD_TOO_LARGE`. |
| `ANALYTICS_NOT_AVAILABLE_ON_PLATFORM` | 422 | The platform has no analytics (Discord). `details.platforms` names it. |
| `QUOTA_EXCEEDED` | 429 | A 30-day count is used up: the plan's API requests (`details.quota` is `apiRequestsPerMonth`; Free 1,000, Pro 50,000, Max 200,000 and Scale 1,000,000; `docs_search` and `feedback_submit` are free and still work) or a post count (see Post quota under Rate Limits). `details` has `limit`, `used` and `resetsAt`; `Retry-After` says how long to wait (until the reset) and `details.upgradeUrl` is the billing page. For a social account's post count, `details.scope` is `socialAccount` and `details.accountId` names the account. The plan's media storage (`details.quota` is `storedMediaBytes`) refuses a file or a new media upload that would not fit; it has no reset and frees up as posts are discarded or publish. |
| `DAILY_PUBLISH_LIMIT_REACHED` | 429 | A platform post's `error.code` when the account's daily publish limit is used up: accounts younger than 7 days publish at most 20 times a day on Free and 100 on a paid plan. `details` has `limit`, `used` and `resetsAt`; Ampost retries the post by itself after the reset. |
| `RATE_LIMITED` | 429 | Too many requests. Wait `Retry-After` seconds (`details.retryAfterSeconds`), then retry. |
| `INTERNAL_ERROR` | 500 | Something failed on Ampost's side. Retry later, and quote the response's `X-Request-Id` if you contact support. |
| `MEDIA_UPLOAD_FAILED` | 502 | Ampost could not store a media file for the post. Retry later. |
| `PLATFORM_REQUEST_FAILED` | 502 | The platform refused or failed a request Ampost made for this operation (`accounts_list_boards`, `accounts_set_board`). The message says what the platform answered. Retry later. |
| `PLATFORM_NOT_CONFIGURED` | 503 | `accounts_connect`: Ampost cannot connect this platform at the moment. Try again later or contact support. |

### Codes on a post's accounts

A platform's answer while publishing does not fail the request: it is stored on `platformPosts[].error` (or `notice`, `firstComment.error`, `thread[].error`) with one of these codes. Request codes above can appear there too, such as `VALIDATION_FAILED` when the platform refuses the content.

| Code | Meaning |
|---|---|
| `AUTH_EXPIRED` | The account's platform login expired. Reconnect it with `accounts_connect` and its `accountId`, then `posts_retry`. |
| `AUTH_REVOKED` | The user revoked Ampost's access on the platform. Reconnect, then retry. |
| `REFRESH_TOKEN_EXPIRED` | The platform login ended and cannot be renewed. Reconnect, then retry. |
| `PERMISSION_MISSING` | The account was connected without a permission this action needs (e.g. Threads `threads_delete` for `posts_unpublish`). Reconnect to grant it. |
| `PAGE_IDENTITY_CONFIRMATION_REQUIRED` | Facebook: a Page manager must confirm their identity in the Facebook app before the Page can publish. |
| `PRIVACY_LEVEL_UNAVAILABLE` | TikTok: the creator does not allow this `options.tiktok.privacyLevel`. Check `platformMetadata` on the account. |
| `ACCOUNT_LIMIT_REACHED` | After a downgrade the account is beyond the plan's account limit; only the accounts connected first publish. |
| `UPGRADE_REQUIRED` | A scheduled post came due after the plan lost scheduling (a cancel or a downgrade to Free), so it was not published. `posts_retry` publishes it now, or upgrade and schedule it again. |
| `PLATFORM_COMING_SOON` | The platform is coming soon and not open to this account yet, so a scheduled post to it was not published. Nothing is retried. |
| `DAILY_PUBLISH_LIMIT_REACHED` | The account's daily publish limit is used up; Ampost retries after the reset. |
| `QUOTA_EXCEEDED` | A platform allowance is used up: the monthly X units, or Bluesky's daily video uploads (Ampost retries those later). |
| `RATE_LIMITED` | The platform's rate limit; Ampost retries by itself (`pending` with `nextAttemptAt`). On `notice`: the account's daily edits and deletes of published YouTube videos are used up (10 a day per channel, 3 on Free); the message says when they free up. |
| `MEDIA_FETCH_FAILED` | Ampost could not download the media to upload it. |
| `MEDIA_TRANSFORM_FAILED` | The media could not be converted to the platform's limits. |
| `VIDEO_PROCESSING_FAILED` | The platform could not process the video. |
| `PUBLISH_OUTCOME_UNKNOWN` | The platform stopped answering and Ampost cannot check whether the post went out. Check the account before `posts_retry`. |
| `PUBLISH_FAILED` | The platform refused the post; the message says why. |
| `PLATFORM_ERROR` | Any other platform failure; the message has the platform's answer, `platformCode` its code. |
| `UNPUBLISH_NOT_SUPPORTED` | On `notice`: the platform has no API to delete a published post (Instagram, TikTok). The post stays published; delete it in the platform's app. |
| `EDIT_NOT_SUPPORTED` | On `notice`: the platform has no API to edit a published post (Instagram, Threads, TikTok, Bluesky, X, Facebook stories). The post keeps its text. |
| `FIRST_COMMENT_NOT_SUPPORTED` | On `firstComment.error`: the platform takes no comment from Ampost on this post. The post stays published. |
| `THREAD_NOT_SUPPORTED` | On `thread[].error`: the platform took no reply from Ampost. |

### Connection request codes

`error.code` of a connection request (`accounts_connect_status`) that ended `failed` or `expired`:

| Code | Meaning |
|---|---|
| `USER_CANCELLED` | The user cancelled or declined consent on the platform. Create a new request if they want to try again. |
| `SUPERSEDED` | A newer connection request for this platform and set replaced this one. Use the newer link. |
| `REQUEST_EXPIRED` | The link was not finished in time. Create a new request. |
| `API_KEY_REVOKED` | The API key that created the request was revoked before the user finished. |
| `PLATFORM_SET_NOT_FOUND` | The platform set was deleted while the user was connecting. |
| `ACCOUNT_LIMIT_REACHED` | The plan's social account limit is reached. |
| `PLATFORM_ALREADY_CONNECTED` | The set already has an account for this platform. Connect into another set, or disconnect the first. |
| `ACCOUNT_ALREADY_CONNECTED` | This social account is already connected in your workspace, in this set or another. |
| `ACCOUNT_MISMATCH` | A reconnect or a request with `expectedUsername` or `expectedPlatformAccountId`: the user signed in to a different account. |
| `SOCIAL_ACCOUNT_IN_USE` | Free plan: the social account is in another Ampost workspace, or left one less than 30 days ago. |
| `OAUTH_DENIED` | The platform refused the sign-in. |
| `REQUIRED_PERMISSIONS_MISSING` | The platform did not grant a permission Ampost needs. Connect again and allow every requested permission. |
| `CONNECTION_FAILED` | The platform or Ampost failed while connecting. Try again later. |

### Account health codes

`health.issues[].code` of an account; `error` means it cannot publish, `warning` that it needs attention soon:

| Code | Severity | Meaning |
|---|---|---|
| `ACCOUNT_REVOKED` | error | The account is disconnected. Reconnect it with `accounts_connect` and its `accountId`. |
| `TOKEN_EXPIRED` | error | The platform login expired and Ampost cannot renew it. Reconnect. |
| `MISSING_SCOPE:<scope>` | error or warning | A permission was not granted, e.g. `MISSING_SCOPE:w_member_social`. An error when publishing needs it; a warning when only analytics do. Reconnect and allow every permission. |
| `TOKEN_EXPIRING` | warning | The token expires within 7 days and Ampost cannot renew it. Reconnect before then. |
| `REFRESH_TOKEN_EXPIRING` | warning | The platform login ends within 7 days; after that the account needs a reconnect. |
| `ACCOUNT_LIMIT_REACHED` | error | The account is beyond the plan's social account limit (after a downgrade or a smaller plan): only the accounts connected first publish. Disconnect others or upgrade; no reconnect needed. |
| `PLATFORM_COMING_SOON` | error | The platform is coming soon and not open to this account yet: the account stays connected but does not publish or collect analytics. No reconnect helps. |
| `BOARD_NOT_SELECTED` | warning | Pinterest: no default board, so every post needs `options.pinterest.boardId`. Pick one with `accounts_set_board` (no reconnect needed). |

Row errors of `posts_import_csv` (`rows[].errors[].code`) are the codes above, plus `NOT_PROCESSED` for rows the import had no time left for; send those rows again in a new import.
