On this page
Receipts and retries
Every post has a receipt. It says, for each account, if the post is live, the link to it, or the reason it is not.
Get the receipt
GET /v1/posts/{id} answers with the post and its receipt. Each account of the post has one target in targets, with its own status, link and reason.
curl https://api.postsure.dev/v1/posts/<post id> \ -H "Authorization: Bearer $POSTSURE_KEY"const api = "https://api.postsure.dev";const headers = { Authorization: `Bearer ${process.env.POSTSURE_KEY}` };const postId = "<post id>";const post = await fetch(`${api}/v1/posts/${postId}`, { headers }).then((r) => r.json());console.log(post.status);for (const target of post.targets) { console.log(target.account.username, target.status, target.url ?? target.status_text);}import osimport requestsapi = "https://api.postsure.dev"headers = {"Authorization": f"Bearer {os.environ['POSTSURE_KEY']}"}post_id = "<post id>"post = requests.get(f"{api}/v1/posts/{post_id}", headers=headers).json()print(post["status"])for target in post["targets"]: print(target["account"]["username"], target["status"], target["url"] or target["status_text"])Example response200
{ "id": "cmgwb1n6e000bl808v5j0k8ry", "status": "failed", "text": "Hello from Postsure!", "targets": [ { "account_id": "cmgw7k2xq0003l808x9f2h1ab", "account": { "network": "x", "username": "postsure_demo" }, "status": "failed", "url": null, "error_category": "content_policy", "error_reason": "X does not allow posting the same text twice.", "retry_at": null, "status_text": "X does not allow posting the same text twice.", "attempts": [ { "number": 1, "outcome": "failed", "http_status": 403, "details": { "title": "Forbidden", "detail": "You are not allowed to create a Tweet with duplicate content.", "type": "about:blank", "status": 403 }, "started_at": "2026-10-18T12:00:01.512Z", "finished_at": "2026-10-18T12:00:01.904Z" } ] } ]}This post failed on X. error_category names the kind of error, for your code. error_reason says why in plain English, for your user. The try in attempts keeps X's own answer.
To find the posts that need you, list them by status: GET /v1/posts?status=failed,unconfirmed,partially_failed. See Lists and pages.
Post status
The post's status sums up all its accounts:
| Status | What it means |
|---|---|
draft | Saved with draft: true. Nothing is sent until you publish it. |
scheduled | Saved with publish_at. Nothing is sent before that time. See Scheduled posts. |
queued | Saved and in line. No account has started yet. |
publishing | Being sent. It is not done on every account yet. |
waiting | Not done yet. A try failed for a reason that can pass, and Postsure will try again. retry_at is the earliest next try. |
published | Published on every account. |
partially_failed | Published on some accounts, and not on the others. |
failed | Failed on every account. |
unconfirmed | Published on no account for sure, and on at least one the network may have posted it. Check before you post it again. |
cancelled | Stopped with POST /v1/posts/{id}/cancel before sending started. It was never sent, and never will be. |
Once sending starts, Postsure sets the post's status from its targets. It uses the first rule that matches:
- If any target is
queuedorpublishing, the post ispublishing. - Else, if any target is
waiting, the post iswaiting. - Else, if every target is
published, the post ispublished. - Else, if no target is
publishedand any isunconfirmed, the post isunconfirmed. - Else, if no target is
published, the post isfailed. - Else, the post is
partially_failed.
Target status
Each target is the post on one account. Its status is one of these:
| Status | What it means |
|---|---|
queued | Not sent yet. queue_position shows its place in the account's line. |
publishing | Being sent now. |
waiting | A try failed, for example on a rate limit or a network error, or the post is waiting its turn. The next try starts at retry_at. |
published | Live. url is the link, or null when you confirmed it yourself with confirm-posted. A published target never changes. |
failed | The network refused it, or Postsure stopped trying. error_reason says why. You can retry it. |
unconfirmed | The network may have posted it, so Postsure does not try again by itself. Check the account, then retry it or confirm it. See Unconfirmed posts. |
cancelled | Its post was cancelled before this account's send started. It was never sent. |
The four results
Each try on an account ends in one of these four results:
- published
- The post is live on that account. Postsure saves the live link in the receipt.
- waiting
- A try failed for a reason that can pass, like a rate limit or the network being down. Postsure tries again at
retry_at, only when the post cannot already be live. - failed
- The network refused the post, or Postsure stopped trying. The reason says which. Postsure stops, and writes the network's reason in plain English.
- unconfirmed
- Postsure sent the post and the network did not answer. It may be live. Postsure never sends it again by itself, so Postsure does not post it twice.
Why it failed
When a try fails, error_category names the kind of error, so your code can decide what to do. It is set when the status is waiting, failed or unconfirmed.
auth- The connection to the account no longer works: its token expired or was revoked, or the account was suspended. The account's status becomes
needs_reconnect.What to do: Reconnect the account, then retry this account. permission- A right or an access the network needs is missing. For example, Bluesky takes videos only from an account with a confirmed email address.What to do: Give the right the reason names, then retry this account.
rate_limited- The network limits how often this account or app can post.What to do: Wait. Postsure tries again by itself. If the target failed, wait until the limit resets, then retry this account.
usage_cap- A posting cap on the network is used up, for example Bluesky's daily video limit. Postsure does not try again.What to do: Wait until the cap resets, then retry this account.
content_policy- The network refused the content, for example the same text twice, or a text that is too long.What to do: Make a new post, with the text or the files changed as the reason says. A sent post cannot change: only a draft can.
media_format- A file has a format, size or length the network does not take.What to do: Make a new post, with the file changed as the reason says. A sent post cannot change: only a draft can.
server_error- The network had a problem on its side, or Postsure could not reach it. The call posted nothing, so it is safe to try again.What to do: Wait. Postsure tries again by itself. If the target failed, wait a little, then retry this account.
unconfirmed- Postsure sent the post, and the network did not answer. It may be live.What to do: Check the account first, then retry it or confirm it. See Unconfirmed posts.
plan_required- The post was not sent, because your workspace has no plan for posting, for example after the plan ended while the post was scheduled. Postsure stopped before it called the network, so nothing was posted.What to do: Choose a plan on the Billing page, then retry this account. See Pricing.
daily_limit_reached- A scheduled post was not sent to this account: at the post's time, the account was at its daily limit of posts in the 24 hours before it. Postsure stopped before it called the network, so nothing was posted. The reason says when the account has room again.What to do: Wait until the time the reason gives, then retry this account. Or make a new post for a later time.
x_monthly_limit_reached- A scheduled post was not sent to X: your workspace had used its X posts for that month of your plan. Postsure stopped before it called X, so nothing was posted. The reason says when the X limit resets.What to do: Wait until the time the reason gives, then retry this account. Or make a new post for a time after the X limit resets.
x_link_not_allowed- The post was not sent to X, because X posts cannot have links. Postsure checks this when you make the post, and again just before it sends to X. It stopped before it called X. In a thread, the parts before the link stay live, and the rest are not sent.What to do: Make a new post without the link. A retry of this account is refused with
x_link_not_allowed. trial_limit_reached- The post was not sent to this account, because your free trial's posts, or its X posts, were used. Postsure checks this just before each account's first send. It stopped before it called the network, so nothing was posted. The reason says when your plan starts.What to do: Wait until your plan starts, then retry this account. Or make a new post for after the trial. See Free trial limits.
unknown- Any other error.What to do: Do what the reason says.
Postsure never sends a failed post again by itself. When the post itself is fine, retry each failed account with POST /v1/posts/{id}/targets/{targetId}/retry: the other accounts are not sent again. When the text or a file must change, make a new post to the failed accounts only: the others have it, or may have it. See Retry or settle an account.
Retry rules
Postsure tries again by itself only when it is safe: when the try failed for a reason that can pass, and the post cannot already be live.
| When | What Postsure does |
|---|---|
| The network is busy (rate limit) | Tries again after 1 h, 2 h and 4 h, or at the network's own reset time. |
| The network fails and nothing was posted | Tries again after 1 min, 5 min and 15 min, or at the time the network names. |
| A day has passed | Starts no try by itself more than 24 hours after the first try, or after a retry you asked for. |
| The post may be live | No retry by itself. It becomes unconfirmed, and you check the account. |
- Postsure retries two categories only:
rate_limitedandserver_error. Every other category fails at once. - By default, that is 3 more tries at most. A wait for the network's reset time counts as one of them, and lasts at least 1 minute.
- Some networks name their own wait. On Telegram, Discord and Bluesky, a rate limit waits the time the network names, at least 5 seconds, and tries again up to 10 times. When they name no time, the wait is 1 minute on Telegram and Discord, and 5 minutes on Bluesky.
- While a target waits, its status is
waitingandretry_atsays when the next try starts. Itserror_reasonends with "We will try again at" and the time. - When Postsure stops, the target is
failed, and its reason ends with "We stopped trying." After a rate limit, it adds when the limit resets, andretry_athas that time, if the network gave it. - A retry of a thread sends only the parts that are not live yet.
- After Postsure stops, you can retry a failed account yourself. It goes back in the account's line, and its earlier tries stay in
attempts. - If a post is still not done on an account 25 hours after Postsure started to send it there, Postsure stops. The target is
unconfirmedwhen a call may have posted it, andfailedwhen not.
Here X could not be reached on part 2 of a thread. Part 1 is live. The next try sends parts 2 and 3:
A thread waiting to try again200
{ "id": "cmgwb1n6e000bl808v5j0k8ry", "status": "waiting", "retry_at": "2026-10-18T12:01:02.000Z", "text": "1/3 We just shipped threads.", "targets": [ { "account": { "network": "x", "username": "postsure_demo" }, "status": "waiting", "url": "https://x.com/postsure_demo/status/1979234567890123460", "error_category": "server_error", "error_reason": "Part 2 of 3: Could not reach X. We will try again at 2026-10-18T12:01:02Z.", "retry_at": "2026-10-18T12:01:02.000Z", "status_text": "waiting to try again, retry at 2026-10-18T12:01:02Z", "parts": [ { "position": 1, "status": "published", "url": "https://x.com/postsure_demo/status/1979234567890123460" }, { "position": 2, "status": "failed", "url": null, "error_reason": "Could not reach X." }, { "position": 3, "status": "queued", "url": null } ], "attempts": [ { "number": 1, "outcome": "failed", "error_category": "server_error", "started_at": "2026-10-18T12:00:01.002Z", "finished_at": "2026-10-18T12:00:02.104Z" } ] } ]}Unconfirmed posts
unconfirmed means Postsure sent the post, and the network did not answer, so the post may be live. For example, the call timed out after it was sent. Postsure never sends it again by itself, because that could post it twice.
It asks you to check:
- Open the account on the network, and look for the post. Note the
numberof the last attempt. - If it is not there, retry that account with
{ "not_posted": true, "checked_attempt": n }, where n is that number. - If it is there, call
confirm-posted. The target becomespublished, with no link.
Both calls, and their rules, are in Retry or settle an account.
The status can still change once: if a late answer from the network gives the sure result, the target becomes published if the post went out, or failed if it was refused. On Bluesky, a late success does not change it, and a late refusal changes it only when no read back has started.
On Bluesky, Postsure checks first. It picks each part's key (rkey) and saves it before the call. When Bluesky's answer is lost, Postsure looks for the post by that key. If the post is not there, Postsure sends it once more with the same key. Bluesky does not take two posts with one key, so this cannot post twice. If Postsure still cannot tell, the target is unconfirmed: look for a post with that rkey on the account.
A post is unconfirmed when no account has it for sure. When one account has it and another is unconfirmed, the post is partially_failed, as here:
Published on one account, unconfirmed on the other200
{ "id": "cmgwb1n6e000bl808v5j0k8ry", "status": "partially_failed", "targets": [ { "account": { "network": "x", "username": "postsure_demo" }, "status": "published", "url": "https://x.com/postsure_demo/status/1979234567890123456", "error_category": null, "error_reason": null }, { "account": { "network": "x", "username": "postsure_news" }, "status": "unconfirmed", "url": null, "error_category": "unconfirmed", "error_reason": "We sent the post but did not get an answer from the network. Check the account before posting again.", "attempts": [ { "number": 1, "outcome": "unconfirmed", "http_status": null, "details": null, "started_at": "2026-10-18T12:00:01.530Z", "finished_at": "2026-10-18T12:00:31.112Z" } ] } ]}The try took about 30 seconds and got no answer. X may have the post on postsure_news.
Receipt fields
Each target has these fields. The API reference has every field and its type.
status- See Target status.
url- The link to the post on the network, once it is live. For a thread: the link to part 1.
platform_post_id- The post's id on the network. For a thread: the id of part 1, set as soon as part 1 is live. On Bluesky: the post's
at://URI. error_category- The kind of error, for your code. See Why it failed.
error_reason- The reason in plain English, which you can show to your user.
retry_at- On
waiting: when the next try starts. Onfailedafter a rate limit: when the limit resets, if known. published_at- When the post was live. For a thread: when every part was live. For a target you confirmed: when you confirmed it.
confirmed_at- When you said with
confirm-postedthat the post is live. Postsure did not check it on the network, so the part has no id and no link.nullwhen Postsure saw the result itself. status_text- The status in plain English, which you can show to your user. For example:
waiting for rate limit, retry at 2026-10-18T15:30:00Z. queue_position- On
queued: the post's place in the account's line. An account gets its posts one at a time, oldest first.1means it goes next.nullwhen the post is not in the line. warnings- Notes on the parts that are live. See Warnings.
parts- Every part of the post on this account. A post with one text has one part. See Parts of a thread.
attempts- Every try on this account, first one first. See Attempts.
Attempts
An attempt is one call to the network: when it was sent, and what the network answered.
number: 1 for the first try, then 2, 3 and so on.outcome:success,failedorunconfirmed.nullwhile the call is still running.http_status: the network's HTTP status, when it answered with an error.error_categoryanderror_reason: the same as on the target, for this try.details: what the network answered, exactly as it sent it. When it did not answer, the error, ascause: for example{ "cause": { "code": "ECONNRESET", "message": "read ECONNRESET" } }. For a thread, the answer to each part.started_atandfinished_at: when the post was sent to the network, and when the network answered or Postsure stopped waiting.
Parts of a thread
A thread has one part for each item you sent in thread. Each target lists every part, first part first, with its position, status, url and error_reason. A part is queued, publishing, published, failed or unconfirmed. A retry sends only the parts that are not live yet, as in the thread above.
Warnings
A warning is a note on a part that is live: it went out without something it asked for, like an image's alt text, or the account changed on the way. Postsure does not try again for it, so the post is not sent twice.
Each warning has a code, a message you can show to your user, and a media_id when it is about a file. In a thread, each message starts with its part: "Part 2 of 3: ...". The codes are alt_text_not_added, alt_text_not_confirmed, chat_moved, not_a_reply, everyone_not_pinged, link_preview_not_set, text_not_shown and thumbnail_not_set.
Use a webhook
Asking for the receipt again and again works for a test. In your app, add a webhook. Postsure sends a signed event when a post starts to wait (post.waiting, once per post, and once per retry you ask for), and when it is done: post.published, post.partially_failed, post.failed or post.unconfirmed. The body has the post's status and every target, with its status_text, but not the text or the attempts. See Webhooks.