Pages in Guides

Error Codes

Every error has the same body on every endpoint, and MCP tools return the same body as an error result. Branch on error.code; the message is for people and may change.

400 VALIDATION_FAILED
{
  "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\""
        }
      ]
    }
  }
}
CodeHTTPMeaning
INVALID_REQUEST400The body is not JSON, or the multipart form cannot be read.
VALIDATION_FAILED400A 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_LONG400The effective text is longer than the platform allows.
UNSUPPORTED_MEDIA_TYPE400The platform does not accept this media type.
UNSUPPORTED_MEDIA_CONFIG400The platform does not accept this combination of media.
MIXED_MEDIA_NOT_SUPPORTED400The platform cannot mix images and videos in one post.
INVALID_PLACEMENT400The placement does not fit the media. details.available lists the allowed values.
MEDIA_FETCH_FAILED400Ampost 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_CONNECTED400The platform set has no active account for a requested platform. Connect one with accounts_connect, or target another set.
TOO_MANY_ROWS400posts_import_csv: the file has more rows than the plan imports at once. details has rows, maxRows and tier; split the file.
UNAUTHORIZED401The API key is missing, invalid or revoked (on MCP also an expired or revoked OAuth access token).
INSUFFICIENT_SCOPE403The API key or connected app lacks the scope this operation needs. details.requiredScope names it.
PLATFORM_SET_NOT_ALLOWED403The API key is restricted to other platform sets. details.platformSetId names the refused set (null when creating a set).
UPGRADE_REQUIRED403The 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_SOON403The 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_REACHED403Scheduling (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_REACHED403The 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_BLOCKED403accounts_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_SUSPENDED403Ampost 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_REQUIRED403Approval 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_REQUIRED403Approval 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_REVOKED403webhooks_update cannot turn on a webhook with disabledReason: "key_revoked"; the user turns it on in the dashboard.
ANALYTICS_NOT_ENABLED403No matching account has analytics enabled (X needs accounts_set_analytics; LinkedIn is coming soon). details.accounts[] gives each account's reason.
NOT_FOUND404No endpoint at this path.
POST_NOT_FOUND404No post with this id belongs to you.
ACCOUNT_NOT_FOUND404No account with this id belongs to you.
PLATFORM_SET_NOT_FOUND404No platform set with this id belongs to you.
CONNECT_REQUEST_NOT_FOUND404No connection request with this id belongs to you.
MEDIA_UPLOAD_NOT_FOUND404No media upload with this id belongs to you.
WEBHOOK_NOT_FOUND404No webhook with this id belongs to you.
DELIVERY_NOT_FOUND404No delivery with this id belongs to the webhook.
METHOD_NOT_ALLOWED405The path exists but not with this method. details.allowed and the Allow header list the methods.
NOT_PENDING_APPROVAL409posts_approve or posts_reject: the post does not wait for approval (approval.status is not pending). details.approvalStatus gives where it stands.
INVALID_STATUS_TRANSITION409The post's status does not allow this action, for example posts_update on a published post.
IDEMPOTENCY_KEY_REUSED409The idempotency key was already used for a different request. Send a new key for a new action.
IDEMPOTENCY_REQUEST_IN_PROGRESS409A request with this idempotency key is still running. Retry with the same key a few seconds later.
QUEUE_EMPTY409useQueue: the platform set's queue has no slots. Add slots with queue_update.
QUEUE_FULL409useQueue: every slot of the queue in the next 366 days is taken.
QUEUE_SLOT_TAKEN409useQueue: concurrent requests kept taking the free slots. Retry.
ACCOUNT_NEEDS_RECONNECT409The 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_REACHED409You already have the maximum number of platform sets.
LAST_PLATFORM_SET409Your last platform set cannot be deleted.
PLATFORM_SET_IN_USE409An account was connected to the platform set while it was being deleted. Retry the delete.
WEBHOOK_LIMIT_REACHED409You already have the maximum number of webhooks. details.limit gives it.
PLATFORM_ALREADY_CONNECTED409accounts_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_PROGRESS409accounts_connect: the user is finishing a connection for this platform and set right now. Poll the open request, then try again.
SOCIAL_ACCOUNT_IN_USE409Free 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_LARGE413The 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_PLATFORM422The platform has no analytics (Discord). details.platforms names it.
QUOTA_EXCEEDED429A 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_REACHED429A 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_LIMITED429Too many requests. Wait Retry-After seconds (details.retryAfterSeconds), then retry.
INTERNAL_ERROR500Something failed on Ampost's side. Retry later, and quote the response's X-Request-Id if you contact support.
MEDIA_UPLOAD_FAILED502Ampost could not store a media file for the post. Retry later.
PLATFORM_REQUEST_FAILED502The 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_CONFIGURED503accounts_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.

AUTH_EXPIREDThe account's platform login expired. Reconnect it with accounts_connect and its accountId, then posts_retry.
AUTH_REVOKEDThe user revoked Ampost's access on the platform. Reconnect, then retry.
REFRESH_TOKEN_EXPIREDThe platform login ended and cannot be renewed. Reconnect, then retry.
PERMISSION_MISSINGThe account was connected without a permission this action needs (e.g. Threads threads_delete for posts_unpublish). Reconnect to grant it.
PAGE_IDENTITY_CONFIRMATION_REQUIREDFacebook: a Page manager must confirm their identity in the Facebook app before the Page can publish.
PRIVACY_LEVEL_UNAVAILABLETikTok: the creator does not allow this options.tiktok.privacyLevel. Check platformMetadata on the account.
ACCOUNT_LIMIT_REACHEDAfter a downgrade the account is beyond the plan's account limit; only the accounts connected first publish.
UPGRADE_REQUIREDA 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_SOONThe 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_REACHEDThe account's daily publish limit is used up; Ampost retries after the reset.
QUOTA_EXCEEDEDA platform allowance is used up: the monthly X units, or Bluesky's daily video uploads (Ampost retries those later).
RATE_LIMITEDThe 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_FAILEDAmpost could not download the media to upload it.
MEDIA_TRANSFORM_FAILEDThe media could not be converted to the platform's limits.
VIDEO_PROCESSING_FAILEDThe platform could not process the video.
PUBLISH_OUTCOME_UNKNOWNThe platform stopped answering and Ampost cannot check whether the post went out. Check the account before posts_retry.
PUBLISH_FAILEDThe platform refused the post; the message says why.
PLATFORM_ERRORAny other platform failure; the message has the platform's answer, platformCode its code.
UNPUBLISH_NOT_SUPPORTEDOn 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_SUPPORTEDOn 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_SUPPORTEDOn firstComment.error: the platform takes no comment from Ampost on this post. The post stays published.
THREAD_NOT_SUPPORTEDOn 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.

USER_CANCELLEDThe user cancelled or declined consent on the platform. Create a new request if they want to try again.
SUPERSEDEDA newer connection request for this platform and set replaced this one. Use the newer link.
REQUEST_EXPIREDThe link was not finished in time. Create a new request.
API_KEY_REVOKEDThe API key that created the request was revoked before the user finished.
PLATFORM_SET_NOT_FOUNDThe platform set was deleted while the user was connecting.
ACCOUNT_LIMIT_REACHEDThe plan's social account limit is reached.
PLATFORM_ALREADY_CONNECTEDThe set already has an account for this platform. Connect into another set, or disconnect the first.
ACCOUNT_ALREADY_CONNECTEDThis social account is already connected in your workspace, in this set or another.
ACCOUNT_MISMATCHA reconnect or a request with expectedUsername or expectedPlatformAccountId: the user signed in to a different account.
SOCIAL_ACCOUNT_IN_USEFree plan: the social account is in another Ampost workspace, or left one less than 30 days ago.
OAUTH_DENIEDThe platform refused the sign-in.
REQUIRED_PERMISSIONS_MISSINGThe platform did not grant a permission Ampost needs. Connect again and allow every requested permission.
CONNECTION_FAILEDThe platform or Ampost failed while connecting. Try again later.

Account health codes

health.issues[].code of an account. error: the account cannot publish; warning: it publishes, but needs attention soon.

ACCOUNT_REVOKEDerror. The account is disconnected. Reconnect it with accounts_connect and its accountId.
TOKEN_EXPIREDerror. 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_EXPIRINGwarning. The token expires within 7 days and Ampost cannot renew it. Reconnect before then.
REFRESH_TOKEN_EXPIRINGwarning. The platform login ends within 7 days; after that the account needs a reconnect.
ACCOUNT_LIMIT_REACHEDerror. 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_SOONerror. 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_SELECTEDwarning. Pinterest: no default board, so every post needs options.pinterest.boardId. Pick one with accounts_set_board (no reconnect needed).