MastodonUpdated
Mastodon API errors and how to fix them, by HTTP status
Mastodon has no numeric error codes. Read the HTTP status, then the JSON error string: 401 is a bad or revoked token, 403 an action the account may not take, 404 a missing record, 422 a status the server refused, 429 a rate limit (300 requests per 5 minutes by default), 503 a temporary problem. Siar, a unified social media API, keeps Mastodon’s own code and message on the post and adds the fix below.
Jump to a status: 400, 401, 403, 404, 422, 429, 503, Media processing.
Codes and messages are what Mastodon returns. Where Mastodon documents a code, this page follows its docs.
400 · ParameterMissing · a required parameter is missing
The server rejected the call because a required parameter is missing. Fix: compare the request with the method's parameters in Mastodon's docs and add the missing one. Don't retry unchanged.
What Siar does with it: Siar keeps Mastodon's code and message on the post, word for word, marks it "don't retry" or "unknown", and still publishes to the other networks in the post. Fix the cause, then call POST /post/{id}/retry: only the failed networks are sent again, and the retry doesn't count as another post.
401 · This API requires an authenticated user · the token is missing, invalid or revoked
The access token is missing, expired or revoked, or the user removed the app from their account. OAuth failures come as "error": "invalid_grant" with an error_description. Fix: run the OAuth flow on that server again for a new token.
What Siar does with it: Siar refreshes the token itself where Mastodon allows it. If that fails, Siar marks the account as needing reconnection and keeps this error on the post. Later posts to the account stop with "Reconnect this account, then retry the post." until your customer reconnects through the same connect link.
403 · This action is not allowed · the account may not do this
The token is valid, but the account can't take this action: the login is disabled, the email is unconfirmed, the account is waiting for approval, or the action isn't permitted. Fix: resolve the account state on the server, or ask its moderators.
What Siar does with it: Siar keeps Mastodon's code and message on the post, word for word, marks it "don't retry" or "unknown", and still publishes to the other networks in the post. Fix the cause, then call POST /post/{id}/retry: only the failed networks are sent again, and the retry doesn't count as another post.
404 · RecordNotFound · the status or account doesn't exist for you
The record doesn't exist, or the account isn't in its audience (a private status). Fix: check the id and that the connected account can see it. Deleted statuses stay gone.
What Siar does with it: Siar keeps Mastodon's code and message on the post, word for word, marks it "don't retry" or "unknown", and still publishes to the other networks in the post. Fix the cause, then call POST /post/{id}/retry: only the failed networks are sent again, and the retry doesn't count as another post.
422 · RecordInvalid · the server refused the status
The server could not create the status, for example text over the server's character limit (500 by default), unsupported media, or a duplicate. Fix: read the error message, which names the problem, and correct it.
What Siar does with it: Siar checks text against 500 characters when you create the post, so an over-long status gets a 400 with an issues entry before Mastodon sees it. A duplicate is marked as a duplicate; anything else keeps Mastodon's message on the post.
429 · Too many requests · the rate limit is used up
The account or IP has used its allowance. By default every endpoint allows 300 calls per 5 minutes per account and per IP, media uploads 30 per 30 minutes, and deletes 30 per 30 minutes. Fix: read X-RateLimit-Remaining and wait for X-RateLimit-Reset before retrying.
What Siar does with it: Siar treats it as temporary and tries again on its own, up to three attempts in all, 30 seconds and then 60 seconds apart. These attempts don't use the post's manual retries.
503 · There was a temporary problem serving your request · the server or a remote server failed
The server, or a remote server it was contacting, failed temporarily (UnexpectedResponseError, NetworkingError and similar). Fix: retry with backoff.
What Siar does with it: Siar treats it as temporary and tries again on its own, up to three attempts in all. It waits for Mastodon's reset time when Siar can read one from the response, otherwise 30 seconds, then 60. These attempts don't use the post's manual retries. If the last attempt fails too, the error stays on the post.
Media processing · Mastodon did not finish processing the media in time · the upload is still processing
Mastodon processes large media after upload and answers 202 until it is ready. This message is Siar's, not Mastodon's: Siar polled for about two minutes and the file was still processing. Fix: retry the post; large videos on busy servers can take longer.
What Siar does with it: Marked retryable; retry the post and Siar uploads again.
Source: Mastodon, Error entity and rate limits, checked 12 November 2026.
Where to see a Mastodon error in Siar
Read a failed post with GET /post/{id}. The error field sums it up, errors lists the result per network, and errorsVerbose keeps Mastodon's own code, message and HTTP status, a plain-English message, and a retry verdict: retryable, non_retryable or unknown. A signed post.published webhook fires when the post has published or failed, with each network's result. Fix the cause and retry with POST /post/{id}/retry.
Siar, a unified social media API, publishes to Facebook, Instagram, Threads, X, LinkedIn profiles, Bluesky, Mastodon, Discord and Slack today. See each network's status, or go back to Post to Mastodon via API.
Error codes for other networks
The same pattern, for each network Siar is built for: social media API error codes, by network. For errors from Siar's own API (a 401 for a missing key, a 429 rate limit), see Siar API errors and status codes.
TikTok API error codes · YouTube API error codes · Instagram API error codes · Facebook API error codes · X (Twitter) API error codes · Threads API error codes · LinkedIn API error codes · Pinterest API error codes · Reddit API error codes · Discord API error codes · Slack API error codes · Bluesky API error codes · Google Business Profile API error codes · Snapchat API error codes
Frequently asked questions
Does Mastodon have API error codes?
No numeric ones. Mastodon uses HTTP status codes, and the JSON body has an error string with a human-readable message, plus error_description on OAuth errors. Read the status first: 401 is the token, 422 the content, 429 the rate limit. The rest of this page covers each status.
Should I retry a failed Mastodon API request?
Only if the error is temporary. Rate limits (429 and Mastodon's own rate-limit codes) and 5xx errors can be retried after the reset time. Token, permission, duplicate and content errors fail the same way every time, so fix the cause first. Each entry on this page says which kind it is.
Why does the Mastodon API reject a request that looks right?
Usually because of something outside the request body: an expired token, a permission the user didn't grant, the account's daily limit, or text the account posted recently. Read the code and message first, then match it to an entry on this page. Validating length and media before sending catches most of the rest.
Does Siar retry failed Mastodon posts automatically?
For temporary errors, yes: Siar tries up to three times in all, waiting for the network's reset time when it can read one. Other errors stay on the post with Mastodon's own code and message. Fix the cause and retry: only the failed networks are sent again, and the retry doesn't count as another post.
Will retrying a failed post publish it twice?
Not through Siar's retry. Each network in a post is claimed once, and only the networks that failed are sent again. An interrupted send is checked against the account before anything is re-sent. But calling the create endpoint again makes a new post: Siar has no client idempotency key, so check your own records first.
Your first post is one request away.
Start with 20 free posts to try. No card. A one-time allowance, with no time limit.