Sign in

Post statuses

What each post status means, what moves a post from one to the next, and how to wait for the result without wasting requests. With the fields that tell you where the post landed or why it failed.

A post is created in a moment, but the network can take seconds or many minutes to publish it. The status of the post tells you where it is. When is_final is true, the post has reached its end and will not change on its own.

The statuses

status status_label is_final What it means
scheduled Scheduled false The post waits for its scheduled_at. You can still reschedule or cancel it.
queued Queued false The post is waiting for Linkpost to send it. It also returns to this status while Linkpost waits to try again after a temporary error.
uploading Uploading to Instagram false Linkpost is sending the file or the post to the network. The label names the network.
processing Instagram is processing the video false The network has the post and is preparing it. Linkpost checks with the network until it is ready. The label names what the network prepares: the video, the photo (a photo story), the photos, the carousel, the document, or the post for text and polls.
inbox_delivered Waiting in your TikTok inbox true TikTok inbox mode only. The video is in the creator's TikTok inbox, and the creator finishes the post in the TikTok app.
published Published true The post is live on the network.
failed Failed true The post did not go out. fail_reason says why.
canceled Canceled true The post was canceled before it went out, and its file was deleted.

status_detail gives one sentence about the status, which you can show to people. For published it names the place, like It was published to your LinkedIn profile. For failed it is the same text as fail_reason.

fail_reason is written in the language of the account owner, the one chosen in the app's settings, because Linkpost writes it when the post fails. The status_detail of a failed post repeats it, so it is in that language too. Every other field is in English, like the rest of the API, including status_label and the status_detail of the other statuses. See Why a post failed.

How a post moves

scheduled -> queued -> uploading -> processing -> published
                                               -> inbox_delivered   (TikTok inbox)
any status before the end              ->        failed
scheduled                              ->        canceled

What moves it:

  1. You create the post. Without scheduled_at it starts as queued and Linkpost begins at once. With scheduled_at it starts as scheduled.
  2. The scheduled time comes. Linkpost checks for due posts every minute and moves them to queued. TikTok posts due at the same time on the same account are sent 30 seconds apart.
  3. Linkpost starts sending. The post becomes uploading while the file goes to the network.
  4. The network prepares the post. When the network needs time, as with most videos, the post becomes processing, and Linkpost checks with the network until it is ready.
  5. The network confirms. The post becomes published, or inbox_delivered for a TikTok inbox upload. Linkpost deletes its copy of the file.

Not every post passes through every status. A post the network takes in one call, like a Facebook text post, goes from queued straight to published. A TikTok photo post or an Instagram carousel goes from queued to processing, because the network fetches the files itself.

What ends a post early:

  • The network refuses it. The post becomes failed, with the network's reason in fail_reason.
  • A temporary problem. If the network does not answer or asks Linkpost to slow down, Linkpost tries again up to 3 more times, waiting about 15 seconds, then 1 minute, then 3 minutes. Posts to YouTube, LinkedIn, X, Bluesky and Telegram show queued during the wait. If every attempt fails, the post becomes failed.
  • The network takes too long. Linkpost stops waiting after about 30 minutes on TikTok, about 20 minutes on Instagram and Facebook, and up to about 30 minutes on LinkedIn, X and Bluesky. YouTube and Telegram answer at once: they confirm the post as soon as they receive it, so Linkpost has nothing to wait for. The post becomes failed with a reason like TikTok is taking too long to process the video. Check your TikTok app.
  • The account was disconnected before the post went out. The post becomes failed.
  • You cancel it while it is scheduled. It becomes canceled.

A failed post is final, with one exception: when it is retried, with Retry in the app or with POST /api/v1/posts/{id}/retry, it goes back to queued and starts again. For a post with files, a retry works while Linkpost still keeps the file, which is for 24 hours after the post was due. It also needs an account that does not need reconnecting. After that, create a new post instead.

Fields that tell you the result

Field What it tells you
is_final true once the post is published, inbox_delivered, failed or canceled. Stop following the post then.
finished_at When the post reached its final status, in UTC.
provider_post_id The post's id on the network, once it is published.
fail_reason Why the post failed, in words you can show to people, in the account owner's language. null unless the post failed.
status_detail One sentence about the current status. For a failed post it is fail_reason, in the account owner's language. Otherwise in English.

Find the post on the network

provider_post_id is the id the network gave the post. Its form depends on the network, and it can be null even on a published post. The API does not return a link to the post, but for some networks you can build one from the id.

Network What provider_post_id holds Link you can build
TikTok The video id. TikTok does not always return it. null for inbox uploads. https://www.tiktok.com/@{username}/video/{id}, with the username from creator info.
Instagram The media id from Instagram's API. It is not the code you see in the post's web address. None.
Facebook The id of the Page post or video. None.
YouTube The video id, like Ks9vQ2mXr4E. https://www.youtube.com/watch?v={id}
LinkedIn The post URN, like urn:li:share:7262618447195271168 or urn:li:ugcPost:7262618447195271168. https://www.linkedin.com/feed/update/{urn}/
X The id of the post, or of the first post of a thread. https://x.com/i/status/{id}
Bluesky The at:// address of the post, or of the first post of a thread, like at://did:plc:4hq2e6xv7ak3nnzv5u3wzthq/app.bsky.feed.post/3l6oveex3ii2l. https://bsky.app/profile/{did}/post/{last part}
Telegram The channel id and the message id, joined by a slash, like -1001876543210/42. None.

Recipes has a script that waits for a post and prints its link.

Why a post failed

fail_reason is written for people. It says what went wrong and, when there is something to do, what to do. Unlike the other API messages, which are in English, it is in the language chosen in the account owner's Linkpost settings. Common reasons, for an account in English:

fail_reason What to do
TikTok access expired or was revoked. Connect the account again. Connect the account again in the app, then publish again. The same message exists for Meta: Meta access expired or was revoked. Connect the account again.
LinkedIn refused Linkpost's access. Connect the account again. The same, for LinkedIn. YouTube, X, Bluesky and Telegram use the same words with their own name.
This app is still in review, so TikTok only accepts posts from private accounts. Set your TikTok account to private and try again, or send the video to your inbox. Make the TikTok account private, or use mode=inbox. See TikTok.
The visibility chosen for this post is no longer available for this TikTok account. Nothing was sent. The creator changed a setting after the post was scheduled. Read creator info and publish again.
This TikTok account can now post up to 5 min and the video is 7 min. Nothing was sent. Shorten the video, or publish to another account.
TikTok could not process the video. Check that the video is a valid MP4, MOV or WebM file. TikTok's own reason may follow in brackets.
Instagram could not use the photo. It needs to be between 4:5 and 1.91:1. Crop the photo to a shape Instagram takes.
This Instagram account reached its daily publishing limit. Try again tomorrow. Wait until the next day.
X rejected the post: ... The network's own words follow the colon. Other networks use the same pattern, like Bluesky rejected the post: ....
The account was disconnected before the post was sent. Connect the account again and publish again.
The file was not delivered in time and was deleted. The post could not be sent within 24 hours of its time, so Linkpost deleted the file. Publish again.
Unexpected error while sending the post. Please try again. Retry in the app, or publish again. If it happens again, contact Linkpost support with the post id.

See Failed posts for more about failures and retrying in the app.

Wait for the result

The API has no webhooks. To learn how a post went, read it with GET /api/v1/posts/{id} until is_final is true.

  • Wait about 10 seconds after you create a post before the first check.
  • Check every 30 seconds at most. Most posts finish within a few minutes, and checking more often does not make them faster.
  • Stop when is_final is true. Then read provider_post_id or fail_reason.
  • Do not check a scheduled post before its time. Start about a minute after scheduled_at.
  • Stop after an hour. Linkpost itself stops waiting for a network after 20 to 30 minutes and marks the post failed, so a post that is still not final an hour after it started needs a look in the app.
  • Follow many posts with one request. Each check counts against the 120 requests a minute of your key. With many posts in flight, list them with GET /api/v1/posts?status=processing (or queued, uploading) instead of reading each one.
  • On 429, wait the seconds in the Retry-After header before the next check.

inbox_delivered is final for Linkpost: TikTok does not tell Linkpost when, or whether, the creator publishes the draft from the inbox.

A polling loop

Each example follows one post, every 30 seconds, for up to an hour, and prints the result.

cURL
# Needs jq (https://jqlang.org).
POST_ID=01m6xardvrc76m2h9pfm7as4wr
FINAL=false
sleep 10

for attempt in $(seq 1 120); do
  POST=$(curl -s "https://linkpost.app/api/v1/posts/$POST_ID" \
    -H "Authorization: Bearer $LINKPOST_KEY")
  echo "$(date +%H:%M:%S) $(echo "$POST" | jq -r '.data.status')"

  FINAL=$(echo "$POST" | jq -r '.data.is_final')
  if [ "$FINAL" = "true" ]; then
    echo "$POST" | jq '.data | {status, provider_post_id, fail_reason}'
    break
  fi

  sleep 30
done

if [ "$FINAL" != "true" ]; then
  echo "Still not final after an hour. Check the post in the app."
fi
JavaScript
const id = "01m6xardvrc76m2h9pfm7as4wr";
const sleep = (seconds) => new Promise((resolve) => setTimeout(resolve, seconds * 1000));
const deadline = Date.now() + 60 * 60 * 1000;

await sleep(10);

while (Date.now() < deadline) {
  const response = await fetch(`https://linkpost.app/api/v1/posts/${id}`, {
    headers: { Authorization: `Bearer ${process.env.LINKPOST_KEY}` },
  });

  if (response.status === 429) {
    await sleep(Number(response.headers.get("retry-after") ?? 60));
    continue;
  }
  if (!response.ok) {
    throw new Error(`${response.status}: ${(await response.json()).message}`);
  }

  const { data: post } = await response.json();
  console.log(new Date().toISOString(), post.status);

  if (post.is_final) {
    console.log(post.status === "failed" ? post.fail_reason : post.provider_post_id);
    process.exit(0);
  }

  await sleep(30);
}

console.log("Still not final after an hour. Check the post in the app.");
Python
import os
import time

import requests

post_id = "01m6xardvrc76m2h9pfm7as4wr"
headers = {"Authorization": f"Bearer {os.environ['LINKPOST_KEY']}"}
deadline = time.monotonic() + 60 * 60

time.sleep(10)

while time.monotonic() < deadline:
    response = requests.get(f"https://linkpost.app/api/v1/posts/{post_id}", headers=headers, timeout=30)

    if response.status_code == 429:
        time.sleep(int(response.headers.get("Retry-After", 60)))
        continue
    response.raise_for_status()

    post = response.json()["data"]
    print(time.strftime("%H:%M:%S"), post["status"])

    if post["is_final"]:
        print(post["fail_reason"] if post["status"] == "failed" else post["provider_post_id"])
        break

    time.sleep(30)
else:
    print("Still not final after an hour. Check the post in the app.")
PHP
<?php
require 'vendor/autoload.php';

$client = new GuzzleHttp\Client([
    'base_uri' => 'https://linkpost.app/api/v1/',
    'headers' => ['Authorization' => 'Bearer '.getenv('LINKPOST_KEY')],
    'http_errors' => false,
]);

$id = '01m6xardvrc76m2h9pfm7as4wr';
$deadline = time() + 60 * 60;

sleep(10);

while (time() < $deadline) {
    $response = $client->get("posts/{$id}");

    if ($response->getStatusCode() === 429) {
        sleep((int) ($response->getHeaderLine('Retry-After') ?: 60));
        continue;
    }

    $body = json_decode((string) $response->getBody(), true);

    if ($response->getStatusCode() !== 200) {
        exit($response->getStatusCode().': '.$body['message'].PHP_EOL);
    }

    $post = $body['data'];
    echo date('H:i:s'), ' ', $post['status'], PHP_EOL;

    if ($post['is_final']) {
        echo $post['status'] === 'failed' ? $post['fail_reason'] : $post['provider_post_id'], PHP_EOL;
        exit(0);
    }

    sleep(30);
}

echo 'Still not final after an hour. Check the post in the app.', PHP_EOL;

The output of a LinkedIn video that went out:

10:20:21 uploading
10:20:51 processing
10:21:21 processing
10:21:51 published
urn:li:ugcPost:7262618447195271168