The REST API will include a response with a list of errors if applicable.Documentation Index
Fetch the complete documentation index at: https://www.ayrshare.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
Errors have a returned status code of 400, 401, 402, 403, 404, 429, 500, 502, 503, or 504. Success has a returned
status code 200. See here for details.
- The
errorsfield contains the array of errors, one per social network that had an error. - The
actionrefers to the type of error returned. - The top-level
statusfield will be “error” if the API call failed. For example, for a /post call if all social network posting were successful thestatusfield will be “success”, else the status field will be “error”. - The
codefield contains the Ayrshare reference error code. - The
messagefield is the specific details of the error.
Handling Errors
You should handle any error responses and take the appropriate action. An error occurred if:- The response return code is not
200 - The JSON response status is
error
400 Bad Request response code.
400 Bad Request response code:
Instagram-Specific Error Codes
The following error codes provide specific details about Instagram posting failures, replacing the generic error 138 where possible. Code 435 — Instagram Rate Limit (HTTP 429) Instagram professional (Business / Creator) accounts are subject to a 50-post rolling 24-hour limit on Meta’s Content Publishing API (personal accounts cannot publish via API at all and therefore never hit this limit). When the cap is exceeded, Meta returns a rate-limit error. Ayrshare also surfacescode: 435 when Meta’s publish endpoint returns HTTP 429 directly or when the underlying error subcode (1390008) indicates a post / comment throttle.
Retry-After header, the value (in seconds) is passed through on the details field — wait at least that long before resubmitting.
Code 436 — Instagram Media Processing Timeout (HTTP 400)
Instagram took too long to process the uploaded media. This can happen with large video files or during periods of high load on Meta’s servers.
instagramOptions.trialParams is provided on a /post request but graduationStrategy is missing, null, or an empty string. Trial reels require an explicit graduation strategy — see Trial Reels.
instagramOptions.trialParams.graduationStrategy to either "MANUAL" or "SS_PERFORMANCE" and retry, or remove trialParams if you did not intend to publish a trial reel.
Code 448 — Instagram Trial Reels: Invalid graduationStrategy (HTTP 400)
Returned when graduationStrategy is present but is not exactly "MANUAL" or "SS_PERFORMANCE". The check is case-sensitive — values like "manual" or "ss_performance" are rejected. The details field echoes the rejected input (truncated to 64 characters) to aid debugging.
graduationStrategy as exactly "MANUAL" or "SS_PERFORMANCE" (uppercase, string type).
Code 449 — Instagram Trial Reels: Incompatible Media (HTTP 400)
Returned when the media or post shape is not eligible for a trial reel. Trial reels must be a single .mp4 or .mov video — carousels (more than one URL), stories (instagramOptions.stories: true), and non-video extensions are all rejected. The details field disambiguates which sub-case fired.
.mp4 or .mov video URL with no stories: true flag. Drop additional mediaUrls entries, or remove trialParams if you intended a regular carousel/story post.
Retry Available
Sometimes the social networks have a unrecoverable error, such as their are having server issues, and the call ultimately fails even after numerous retries. In those cases, our system will determine if the error is retryable and if so, theretryAvailable field will be true.
X/Twitter BYO Key Errors
The following error codes are specific to X/Twitter BYO (Bring Your Own) key operations: Code 272 - Failed to Verify BYO Twitter Identity (HTTP 400) Ayrshare could not confirm your X/Twitter identity using your BYO consumer keys and the OAuth tokens stored at link time. The response shape varies by which call triggered it; both forms map to the same three sub-cases below. Verify which one applies by logging into x.com with the account that owns the BYO Developer App. The post path emits a minimal response:details field carrying X’s raw error string:
details mirrors the X-side hint and is the most reliable single signal for which sub-case below applies.
Account suspended. Logging into x.com shows a suspension notice. Action: Contact X support. Re-linking will not restore access until X reinstates the account.
Account locked. Logging into x.com presents an unlock challenge (CAPTCHA, phone verification, etc.). Action: Complete the unlock challenge on x.com, then retry the request. No re-link is required.
Identity or key mismatch. Your X account is in good standing on x.com, but your BYO consumer keys belong to a different X Developer App than the OAuth tokens stored at link time. Action: Re-link X under Social Accounts and authorize with the same X account that owns the BYO Developer App.
Code 416 — X Credits Depleted (HTTP 402)
Your X Developer account has no API credits loaded. All X API calls require credits.
x-access-level: read, which confirms your Access Token was generated with read-only permissions.
Action: In the X Developer Console, update your app permissions to Read and write and Direct message, then regenerate your Access Token under Keys and tokens. The new token will inherit the updated permissions. See the X BYO Key Setup Guide for details.
Code 419 - Missing BYO Credentials (HTTP 400)
X/Twitter operations require BYO API credentials in the request headers. Ayrshare returns code 419 when both headers are missing, and also when only one of the pair is present. The message string varies depending on which header(s) are missing.
When both X-Twitter-OAuth1-Api-Key and X-Twitter-OAuth1-Api-Secret are missing:
X-Twitter-OAuth1-Api-Key and X-Twitter-OAuth1-Api-Secret on every X-bound request. If you provide one without the other, the request is rejected with the same code. See the X BYO Keys Header Reference for the full header list.
Caption Enhancement Errors
Code 441 — Caption Enhancement Failed (HTTP 502) Returned when a caption enhancement (for exampleshortenLinks) fails for one or more platforms while preparing a post. Each affected platform appears in the errors array with source: "handlePostAdditions" and code: 441.
When only some platforms fail, the other platforms still post successfully and their results appear in postIds. In that case the top-level status is "error" but postIds is non-empty — clients should treat status and errors[] as complementary rather than mutually exclusive.
code: 441 with HTTP 502 and no post is created:
- If
postIdsis non-empty (some platforms posted successfully), do not resubmit the full platform set — that would duplicate the post on the successful platforms. Instead, inspecterrors[]to identify the failed platforms and retry the request with only those platforms, or rely on your own idempotent retry flow. - If
postIdsis empty or missing (total failure at schedule/post time), safely retry the full request. - If the failure persists, submit the post without the enhancement flag (for example, drop
shortenLinks) or contact support.
Media Fetch / Crawler Access Errors
Code 440 — Social Network Could Not Download Media (HTTP 400) Returned when the platform’s publishing crawler cannot download themediaUrl you provided — most commonly because robots.txt or a WAF / bot-fight rule is blocking the crawler (for example, Meta’s facebookexternalhit). The details string comes from the upstream platform and is often the Meta/Instagram error 2207052 text.
details string typically contains "Restricted by robots.txt" or "HTTP error code 403". Code 138 is also used for aspect-ratio / format issues and other generic Instagram errors, so the media-fetch variant is identifiable by the details string.
mediaUrl. The Threads API does not return detail strings, so diagnosis usually requires checking for a co-occurring Instagram 440 or 138 in the same publish.
robots.txt snippets and a verification command.
Facebook Analytics Rate Limit
Code 444 — Facebook Page Analytics Rate Limit (HTTP 429) Returned when a Facebook Page has exceeded Meta’s per-Page rate limit on the analytics endpoint. The underlying Meta error is80001 (“There have been too many calls to this Page account.”). The Page remains linked and publishing continues to work — only the analytics fan-out for that Page is throttled.
When the throttle is detected for a single post in a /history/facebook or analytics response, each affected post carries code: 444 at facebook.code with errCode: 80001:
Image Format Conversion Errors
Ayrshare automatically converts WebP, HEIC, and AVIF images to JPEG before posting to platforms that don’t accept them (Instagram, LinkedIn, TikTok, Google My Business, Threads, and Snapchat for WebP; all platforms for HEIC and AVIF). Conversion runs transparently at send time. The three errors below fire only when the conversion pipeline itself can’t complete; if the source image is already in a supported format, no conversion is attempted and these codes will not surface. Code 450 — Image Format Conversion Failed (HTTP 400) The image was downloaded but could not be re-encoded as JPEG. Most common causes are a corrupt source file, an unexpected internal format inside the container, or an image that exceeds the conversion size cap.mediaUrl directly in a browser to confirm it renders. If it does, re-export the image to a clean JPEG or PNG and retry the post.
Code 451 — Image Download Failed for Conversion (HTTP 400)
The conversion pipeline could not fetch the source image. Typical causes include a 4xx/5xx response from the origin, a network timeout, a redirect chain that exceeds the hop limit, or a URL that resolves to a non-public address (blocked by the SSRF guard). The details field, when present, carries the underlying cause string.
mediaUrl is publicly reachable (no auth, no robots.txt blocks, resolves over HTTPS). If the URL redirects, ensure the final destination is also public and not on a private network.
Code 452 — Converted Image Upload Failed (HTTP 500)
Conversion succeeded but Ayrshare could not stage the converted JPEG to its temporary storage bucket. This is an internal failure on the Ayrshare side and is retryable.
mediaUrl and approximate timestamp.
YouTube Transient Upload Errors
The following error codes provide specific signals for YouTube upload failures that are typically transient and safe to retry. Both responses includeretryAvailable: true, so integrations can branch on that boolean rather than on the HTTP status code.
Most prior code: 176 responses for YouTube uploads now route to 453 (transient timeout) or 454 (transient service unavailable), both with retryAvailable: true. If your integration filters on HTTP 500 to retry YouTube uploads, switch to filtering on the retryAvailable field on the response body.
Code 453 — YouTube Upload Timed Out (HTTP 504)
Returned when Google’s YouTube ingest pipeline timed out while accepting the upload. This is typically transient and resolves on its own within a minute or two.
retryAvailable field on the response body rather than HTTP status to detect retryable failures. You can use the retry post endpoint to resubmit the same payload.
Code 454 — YouTube Upload Service Temporarily Unavailable (HTTP 503)
Returned when YouTube’s upload endpoint returns a 5xx status, or when the connection to YouTube was reset or timed out at the socket layer (ECONNRESET, ETIMEDOUT, ESOCKETTIMEDOUT). These conditions are transient.
retryAvailable field on the response body rather than HTTP status to detect retryable failures. You can use the retry post endpoint to resubmit the same payload.
Error Message Translation
The API error message response can be automatically translated to the language of your choice. This is useful if you want to display the error directly to your user in their preferred language. See here if you want to choose the language of the social linking page. In the header include:Language_Code is one of the available language codes.
For example, the following will translate the error to French.
