Posts
Create posts for every network and format, with the files in the request, by link or from an upload, on one account or several at once, with complete examples in cURL, JavaScript, Python and PHP. Schedule them, list them, read one, reschedule, retry, remove and cancel.
One endpoint, POST /api/v1/posts, publishes every kind of post to every network. The account you send it to decides which fields the post needs and which limits apply. This page lists them all, with a complete example for each format.
How creating a post works
- Linkpost checks everything first. The rules are the same as in the app. If anything is wrong, the answer is
422with a message for each field, and nothing is stored. See Errors. - A valid post answers
201 Createdwith the post. Withoutscheduled_atits status isqueuedand Linkpost starts sending it at once. Withscheduled_atits status isscheduled. - Linkpost sends the post in the background. The network can take from seconds to many minutes. Read the post to follow it. See Post statuses.
- One post goes to one account. To publish the same content on several accounts in one request, all or none, see Publish on several accounts at once.
- Posts cannot be edited. You can move a scheduled post to another time. To change anything else, cancel it and create a new one.
- Files can come three ways: in the request, as public links Linkpost downloads, or sent first from your computer. See Files by link or from your computer.
- Files stay private. Linkpost keeps the file on private storage until the post goes out, then deletes it. A failed post keeps its file for 24 hours so you can retry it.
- Every request counts against the new-post limits: 10 a minute and 100 a day per user, refused requests included. See Rate limits.
- One request can carry up to 520 MB in total. Give your HTTP client a long timeout for large files.
Parameters for every post
| Parameter | Required | What it is |
|---|---|---|
account_id |
Yes | The account to publish to. Get it from List accounts. |
consent |
Yes | 1 (or true in JSON). It confirms that the owner of the account wants this exact post published. Only send it when that is true. |
format |
Depends | What kind of post it is. Required on Instagram and Facebook, and for every format that is not a video. For a video on TikTok, YouTube, LinkedIn, X, Bluesky and Telegram you can leave it out or send video. YouTube also takes short, explained below. |
media |
For videos and stories | The video, or the photo of a story. One file. A video is checked against the video_limits of its format in List accounts before anything is uploaded: one outside them answers 422 on media. |
files[] |
For photos, carousels and documents | The files, in the order they should appear. A single file can also go as media. |
media_url, media_urls |
Instead of media and files[] |
Public links to the files, which Linkpost downloads. See Files by link or from your computer. |
upload_id, upload_ids |
Instead of media and files[] |
The ids of files you sent first from your computer. See Send a file from your computer. |
title |
Depends | The text of the post: its caption, description or message. Required for text posts and polls. Ignored for stories and TikTok inbox uploads. |
scheduled_at |
No | When to publish. Leave it out to publish now. See Schedule a post. |
timezone |
No | The timezone for a scheduled_at without an offset. |
Each network adds its own fields, explained in the sections below.
Choose a format
| Network | format |
Files | Longest title |
Available |
|---|---|---|---|---|
| TikTok | video, or leave it out |
1 video | 2200 | Yes |
| TikTok | image |
1 to 35 photos | 4000 | Pending certification |
reel |
1 video | 2200 | Yes | |
story |
1 video or 1 JPEG photo | No text | Yes | |
image |
1 photo | 2200 | Pending certification | |
carousel |
2 to 10 photos or videos | 2200 | Pending certification | |
video |
1 video | 5000 | Yes | |
story |
1 video or 1 JPEG photo | No text | Yes | |
image |
1 to 10 photos | 5000 | Pending certification | |
text |
None | 5000 | Pending certification | |
| YouTube | video or short, or leave it out |
1 video | 5000 | Yes |
video, or leave it out |
1 video | 3000 | Yes | |
text |
None | 3000 | Pending certification | |
image |
1 to 20 photos | 3000 | Pending certification | |
document |
1 PDF, PowerPoint or Word file | 3000 | Pending certification | |
poll |
None | 140, the question | Pending certification | |
| X | video, or leave it out |
1 video | 280 | Yes |
| X | text |
None | 280 | Pending certification |
| X | image |
1 to 4 photos | 280 | Pending certification |
| X | poll |
None | 280, the question | Pending certification |
| Bluesky | video, or leave it out |
1 video | 300 | Yes |
| Bluesky | text |
None | 300 | Pending certification |
| Bluesky | image |
1 to 4 photos | 300 | Pending certification |
| Telegram | video, or leave it out |
1 video | 1024 | Yes |
| Telegram | text |
None | 4096 | Pending certification |
| Telegram | image |
1 to 10 photos | 1024 | Pending certification |
| Telegram | document |
1 PDF, PowerPoint or Word file | 1024 | Pending certification |
| Telegram | poll |
None | 300, the question | Pending certification |
Characters are counted as Unicode characters. X and Bluesky count some characters, such as links and emoji, in their own way, so a text close to the limit can still be refused by the network.
For what each format looks like on the network, see Formats.
Publish a video
A video goes in media, as one file. The file name must end in an extension the network takes, such as clip.mp4: Linkpost checks both the name and the content of the file.
| Network | format |
File types | Largest file | Length |
|---|---|---|---|---|
| TikTok | video, or leave it out |
MP4, MOV, WebM | 512 MB | Up to the creator's max_video_duration_seconds |
reel |
MP4, MOV | 300 MB | 3 seconds to 15 minutes | |
video |
MP4, MOV | 300 MB | 3 seconds to 15 minutes | |
| YouTube | video or short, or leave it out |
MP4, MOV | 512 MB | Up to 12 hours |
video, or leave it out |
MP4, MOV | 500 MB | 3 seconds to 30 minutes | |
| X | video, or leave it out |
MP4, MOV | 512 MB | Up to 140 seconds |
| Bluesky | video, or leave it out |
MP4, MOV | 100 MB | Up to 3 minutes |
| Telegram | video, or leave it out |
MP4, MOV | 50 MB | No limit |
Stories have their own rules. See Publish a story.
TikTok video
TikTok has two modes. direct publishes the video to the profile with the settings you send. inbox sends the video to the creator's TikTok inbox: the creator gets a notification and finishes the post in the TikTok app, where they write the caption and choose the settings. Read creator info right before every TikTok post.
direct needs direct_post_available to be true in creator info. Until TikTok approves Linkpost, it is false for public accounts, which can only take inbox. In both modes, the video must be 360 to 4096 pixels on each side and 23 to 60 frames per second: Linkpost refuses any other video with a 422 error on media, before sending it to TikTok.
| Parameter | Required | What it is |
|---|---|---|
mode |
Yes | direct or inbox. It must be in the account's post_options.mode. |
privacy_level |
For direct |
One of the creator's privacy_level_options, chosen by the person who posts. There is no default. |
allow_comment |
No | 1 to allow comments. Off unless you send it. Refused if the creator turned comments off. |
allow_duet |
No | 1 to allow duets. Off unless you send it. Refused if the creator turned duets off. |
allow_stitch |
No | 1 to allow stitches. Off unless you send it. Refused if the creator turned stitches off. |
commercial_toggle |
No | 1 when the video promotes a brand, product or service. Then send brand_organic, brand_content or both. |
brand_organic |
With commercial_toggle |
1: you promote yourself or your own business. TikTok labels the video "Promotional content". |
brand_content |
With commercial_toggle |
1: you promote a third party. TikTok labels the video "Paid partnership". It cannot be combined with SELF_ONLY. |
title |
No | The caption, up to 2200 characters. Ignored in inbox mode. |
On TikTok, consent=1 also confirms TikTok's Music Usage Confirmation, and TikTok's Branded Content Policy when brand_content=1. Tell the person who posts before you send it.
curl https://linkpost.app/api/v1/posts \
-H "Authorization: Bearer $LINKPOST_KEY" \
-F account_id=7 \
-F mode=direct \
-F media=@studio.mp4 \
-F title="Behind the scenes of the new collection #design" \
-F privacy_level=PUBLIC_TO_EVERYONE \
-F allow_comment=1 \
-F consent=1
import { readFile } from "node:fs/promises";
const form = new FormData();
form.append("account_id", "7");
form.append("mode", "direct");
form.append("title", "Behind the scenes of the new collection #design");
form.append("privacy_level", "PUBLIC_TO_EVERYONE");
form.append("allow_comment", "1");
form.append("consent", "1");
form.append("media", new Blob([await readFile("studio.mp4")], { type: "video/mp4" }), "studio.mp4");
const response = await fetch("https://linkpost.app/api/v1/posts", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.LINKPOST_KEY}` },
body: form,
});
console.log(response.status, await response.json());
import os
import requests
with open("studio.mp4", "rb") as video:
response = requests.post(
"https://linkpost.app/api/v1/posts",
headers={"Authorization": f"Bearer {os.environ['LINKPOST_KEY']}"},
data={
"account_id": 7,
"mode": "direct",
"title": "Behind the scenes of the new collection #design",
"privacy_level": "PUBLIC_TO_EVERYONE",
"allow_comment": 1,
"consent": 1,
},
files={"media": ("studio.mp4", video, "video/mp4")},
timeout=600,
)
print(response.status_code, response.json())
<?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,
]);
$response = $client->post('posts', [
'multipart' => [
['name' => 'account_id', 'contents' => '7'],
['name' => 'mode', 'contents' => 'direct'],
['name' => 'title', 'contents' => 'Behind the scenes of the new collection #design'],
['name' => 'privacy_level', 'contents' => 'PUBLIC_TO_EVERYONE'],
['name' => 'allow_comment', 'contents' => '1'],
['name' => 'consent', 'contents' => '1'],
['name' => 'media', 'contents' => fopen('studio.mp4', 'r'), 'filename' => 'studio.mp4'],
],
]);
echo $response->getStatusCode(), PHP_EOL, $response->getBody(), PHP_EOL;
{
"data": {
"id": "01m6xagxm8ngfnaq3ps9ke35e5",
"status": "queued",
"status_label": "Queued",
"status_detail": "It may take a few minutes for the content to process and be visible on your profile.",
"is_final": false,
"platform": "tiktok",
"type": "TikTok post",
"mode": "direct",
"format": "video",
"account_id": 7,
"account_name": "Mara Costa",
"title": "Behind the scenes of the new collection #design",
"privacy_level": "PUBLIC_TO_EVERYONE",
"scheduled_at": null,
"timezone": null,
"created_at": "2026-11-08T10:16:05Z",
"finished_at": null,
"provider_post_id": null,
"fail_reason": null,
"source": "api"
}
}
To send the video to the inbox instead, send mode=inbox and leave out privacy_level and the other settings. The post comes back with "type": "TikTok inbox" and "privacy_level": null, and it ends as inbox_delivered. See TikTok for what the creator sees.
YouTube video
| Parameter | Required | What it is |
|---|---|---|
video_title |
Yes | The video title, up to 100 characters. |
title |
No | The video description, up to 5000 characters. |
privacy_level |
Yes | public, unlisted or private. |
made_for_kids |
Yes | yes or no. YouTube requires every channel to say whether each video is made for kids. Ask the person; do not guess. |
format |
No | video, the default, or short to refuse a video that YouTube would not show as a Short. |
YouTube shows a square or vertical video of up to 3 minutes as a Short, and its API has no setting for it. So Linkpost reads the video and answers with what it will be: "format": "short" and "type": "YouTube Short", or "format": "video". Send format=short when the post has to be a Short: a video that is wider than it is tall, longer than 3 minutes, or whose size Linkpost cannot read, is refused with a 422 on format and nothing is uploaded.
curl https://linkpost.app/api/v1/posts \
-H "Authorization: Bearer $LINKPOST_KEY" \
-F account_id=18 \
-F media=@tutorial.mp4 \
-F video_title="How we print our fabric" \
-F title="A ten-minute tour of our print workshop, from screen to finished roll." \
-F privacy_level=unlisted \
-F made_for_kids=no \
-F consent=1
import { readFile } from "node:fs/promises";
const form = new FormData();
form.append("account_id", "18");
form.append("video_title", "How we print our fabric");
form.append("title", "A ten-minute tour of our print workshop, from screen to finished roll.");
form.append("privacy_level", "unlisted");
form.append("made_for_kids", "no");
form.append("consent", "1");
form.append("media", new Blob([await readFile("tutorial.mp4")], { type: "video/mp4" }), "tutorial.mp4");
const response = await fetch("https://linkpost.app/api/v1/posts", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.LINKPOST_KEY}` },
body: form,
});
console.log(response.status, await response.json());
import os
import requests
with open("tutorial.mp4", "rb") as video:
response = requests.post(
"https://linkpost.app/api/v1/posts",
headers={"Authorization": f"Bearer {os.environ['LINKPOST_KEY']}"},
data={
"account_id": 18,
"video_title": "How we print our fabric",
"title": "A ten-minute tour of our print workshop, from screen to finished roll.",
"privacy_level": "unlisted",
"made_for_kids": "no",
"consent": 1,
},
files={"media": ("tutorial.mp4", video, "video/mp4")},
timeout=600,
)
print(response.status_code, response.json())
<?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,
]);
$response = $client->post('posts', [
'multipart' => [
['name' => 'account_id', 'contents' => '18'],
['name' => 'video_title', 'contents' => 'How we print our fabric'],
['name' => 'title', 'contents' => 'A ten-minute tour of our print workshop, from screen to finished roll.'],
['name' => 'privacy_level', 'contents' => 'unlisted'],
['name' => 'made_for_kids', 'contents' => 'no'],
['name' => 'consent', 'contents' => '1'],
['name' => 'media', 'contents' => fopen('tutorial.mp4', 'r'), 'filename' => 'tutorial.mp4'],
],
]);
echo $response->getStatusCode(), PHP_EOL, $response->getBody(), PHP_EOL;
{
"data": {
"id": "01m6xakgmgp804bd7m37y17839",
"status": "queued",
"status_label": "Queued",
"status_detail": "It may take a few minutes for the content to process and be visible on your profile.",
"is_final": false,
"platform": "youtube",
"type": "YouTube video",
"mode": "direct",
"format": "video",
"account_id": 18,
"account_name": "Costa Studio",
"title": "A ten-minute tour of our print workshop, from screen to finished roll.",
"privacy_level": "unlisted",
"scheduled_at": null,
"timezone": null,
"created_at": "2026-11-08T10:17:30Z",
"finished_at": null,
"provider_post_id": null,
"fail_reason": null,
"source": "api"
}
}
The response shows the description in title. The video title is not part of the response.
LinkedIn, X, Bluesky and Telegram video
These networks take the video in media and the text in title. LinkedIn also needs privacy_level:
| Network | Extra parameters |
|---|---|
privacy_level, required: PUBLIC (anyone) or CONNECTIONS (your connections only). |
|
| X | Optional thread[] to add replies. See Publish a thread. |
| Bluesky | Optional thread[] to add replies. See Publish a thread. |
| Telegram | None. The video goes to the channel with title as its caption. |
X, Bluesky and Telegram refuse privacy_level, and every network except YouTube refuses video_title and made_for_kids. The example publishes a LinkedIn video. For X, Bluesky or Telegram, change account_id and leave out privacy_level.
curl https://linkpost.app/api/v1/posts \
-H "Authorization: Bearer $LINKPOST_KEY" \
-F account_id=21 \
-F media=@launch.mp4 \
-F title="Our autumn collection is out today. Here is how we made it." \
-F privacy_level=PUBLIC \
-F consent=1
import { readFile } from "node:fs/promises";
const form = new FormData();
form.append("account_id", "21");
form.append("title", "Our autumn collection is out today. Here is how we made it.");
form.append("privacy_level", "PUBLIC");
form.append("consent", "1");
form.append("media", new Blob([await readFile("launch.mp4")], { type: "video/mp4" }), "launch.mp4");
const response = await fetch("https://linkpost.app/api/v1/posts", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.LINKPOST_KEY}` },
body: form,
});
console.log(response.status, await response.json());
import os
import requests
with open("launch.mp4", "rb") as video:
response = requests.post(
"https://linkpost.app/api/v1/posts",
headers={"Authorization": f"Bearer {os.environ['LINKPOST_KEY']}"},
data={
"account_id": 21,
"title": "Our autumn collection is out today. Here is how we made it.",
"privacy_level": "PUBLIC",
"consent": 1,
},
files={"media": ("launch.mp4", video, "video/mp4")},
timeout=600,
)
print(response.status_code, response.json())
<?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,
]);
$response = $client->post('posts', [
'multipart' => [
['name' => 'account_id', 'contents' => '21'],
['name' => 'title', 'contents' => 'Our autumn collection is out today. Here is how we made it.'],
['name' => 'privacy_level', 'contents' => 'PUBLIC'],
['name' => 'consent', 'contents' => '1'],
['name' => 'media', 'contents' => fopen('launch.mp4', 'r'), 'filename' => 'launch.mp4'],
],
]);
echo $response->getStatusCode(), PHP_EOL, $response->getBody(), PHP_EOL;
{
"data": {
"id": "01m6xardvrc76m2h9pfm7as4wr",
"status": "queued",
"status_label": "Queued",
"status_detail": "It may take a few minutes for the content to process and be visible on your profile.",
"is_final": false,
"platform": "linkedin",
"type": "LinkedIn post",
"mode": "direct",
"format": "video",
"account_id": 21,
"account_name": "Mara Costa",
"title": "Our autumn collection is out today. Here is how we made it.",
"privacy_level": "PUBLIC",
"scheduled_at": null,
"timezone": null,
"created_at": "2026-11-08T10:20:11Z",
"finished_at": null,
"provider_post_id": null,
"fail_reason": null,
"source": "api"
}
}
Instagram reel and Facebook video
Instagram and Facebook always need format. On Instagram a video is a reel. On a Facebook Page it is a video. The caption goes in title: up to 2200 characters on Instagram, and up to 5000 on Facebook. The example publishes an Instagram reel. For a Facebook Page, use the Page's account_id and format=video.
curl https://linkpost.app/api/v1/posts \
-H "Authorization: Bearer $LINKPOST_KEY" \
-F account_id=12 \
-F format=reel \
-F media=@reel.mp4 \
-F title="Three ways to wear one scarf" \
-F consent=1
import { readFile } from "node:fs/promises";
const form = new FormData();
form.append("account_id", "12");
form.append("format", "reel");
form.append("title", "Three ways to wear one scarf");
form.append("consent", "1");
form.append("media", new Blob([await readFile("reel.mp4")], { type: "video/mp4" }), "reel.mp4");
const response = await fetch("https://linkpost.app/api/v1/posts", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.LINKPOST_KEY}` },
body: form,
});
console.log(response.status, await response.json());
import os
import requests
with open("reel.mp4", "rb") as video:
response = requests.post(
"https://linkpost.app/api/v1/posts",
headers={"Authorization": f"Bearer {os.environ['LINKPOST_KEY']}"},
data={"account_id": 12, "format": "reel", "title": "Three ways to wear one scarf", "consent": 1},
files={"media": ("reel.mp4", video, "video/mp4")},
timeout=600,
)
print(response.status_code, response.json())
<?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,
]);
$response = $client->post('posts', [
'multipart' => [
['name' => 'account_id', 'contents' => '12'],
['name' => 'format', 'contents' => 'reel'],
['name' => 'title', 'contents' => 'Three ways to wear one scarf'],
['name' => 'consent', 'contents' => '1'],
['name' => 'media', 'contents' => fopen('reel.mp4', 'r'), 'filename' => 'reel.mp4'],
],
]);
echo $response->getStatusCode(), PHP_EOL, $response->getBody(), PHP_EOL;
{
"data": {
"id": "01m6xag75ghras1sek74sdmft8",
"status": "queued",
"status_label": "Queued",
"status_detail": "It may take a few minutes for the content to process and be visible on your profile.",
"is_final": false,
"platform": "instagram",
"type": "Instagram reel",
"mode": "direct",
"format": "reel",
"account_id": 12,
"account_name": "maracosta",
"title": "Three ways to wear one scarf",
"privacy_level": null,
"scheduled_at": null,
"timezone": null,
"created_at": "2026-11-08T10:15:42Z",
"finished_at": null,
"provider_post_id": null,
"fail_reason": null,
"source": "api"
}
}
A Facebook Page video comes back with "type": "Facebook post" and "format": "video".
On Instagram, a reel can also invite collaborators and tag people. See Invite collaborators and tag people.
Publish a story
Instagram and Facebook take stories: one photo or one video that stays visible for 24 hours. Send format=story and the file in media.
| What | Rule |
|---|---|
| Photo | JPEG only, with a .jpg or .jpeg file name. Convert PNG and WebP photos first. |
| Video | MP4 or MOV, from 3 to 60 seconds, up to 300 MB. |
| Text | None. A story has no caption, so title is ignored. |
| People | On Instagram, tagged_users[] tags people in the story. Stories take no collaborators[]. See Invite collaborators and tag people. |
curl https://linkpost.app/api/v1/posts \
-H "Authorization: Bearer $LINKPOST_KEY" \
-F account_id=12 \
-F format=story \
-F media=@sale.jpg \
-F consent=1
import { readFile } from "node:fs/promises";
const form = new FormData();
form.append("account_id", "12");
form.append("format", "story");
form.append("consent", "1");
form.append("media", new Blob([await readFile("sale.jpg")], { type: "image/jpeg" }), "sale.jpg");
const response = await fetch("https://linkpost.app/api/v1/posts", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.LINKPOST_KEY}` },
body: form,
});
console.log(response.status, await response.json());
import os
import requests
with open("sale.jpg", "rb") as photo:
response = requests.post(
"https://linkpost.app/api/v1/posts",
headers={"Authorization": f"Bearer {os.environ['LINKPOST_KEY']}"},
data={"account_id": 12, "format": "story", "consent": 1},
files={"media": ("sale.jpg", photo, "image/jpeg")},
timeout=300,
)
print(response.status_code, response.json())
<?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,
]);
$response = $client->post('posts', [
'multipart' => [
['name' => 'account_id', 'contents' => '12'],
['name' => 'format', 'contents' => 'story'],
['name' => 'consent', 'contents' => '1'],
['name' => 'media', 'contents' => fopen('sale.jpg', 'r'), 'filename' => 'sale.jpg'],
],
]);
echo $response->getStatusCode(), PHP_EOL, $response->getBody(), PHP_EOL;
{
"data": {
"id": "01m6xax7603cq32v50ajc63b81",
"status": "queued",
"status_label": "Queued",
"status_detail": "It may take a few minutes for the content to process and be visible on your profile.",
"is_final": false,
"platform": "instagram",
"type": "Instagram story",
"mode": "direct",
"format": "story",
"account_id": 12,
"account_name": "maracosta",
"title": null,
"privacy_level": null,
"scheduled_at": null,
"timezone": null,
"created_at": "2026-11-08T10:22:48Z",
"finished_at": null,
"provider_post_id": null,
"fail_reason": null,
"source": "api"
}
}
Publish a text post
Facebook, LinkedIn, X, Bluesky and Telegram take posts with text only. Send format=text and the text in title. A text post takes no files: sending some gives Text posts and polls go without files.
A link in the text shows a preview card. On LinkedIn and Bluesky, Linkpost reads the page of the first link to build the card, because those networks do not build it themselves.
A text post has no files, so you can send it as JSON:
curl https://linkpost.app/api/v1/posts \
-H "Authorization: Bearer $LINKPOST_KEY" \
-H "Content-Type: application/json" \
-d '{
"account_id": 24,
"format": "text",
"title": "Our winter sale starts on Monday. Everything in the shop is 20% off for a week: https://costastudio.example/sale",
"consent": true
}'
const response = await fetch("https://linkpost.app/api/v1/posts", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.LINKPOST_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
account_id: 24,
format: "text",
title: "Our winter sale starts on Monday. Everything in the shop is 20% off for a week: https://costastudio.example/sale",
consent: true,
}),
});
console.log(response.status, await response.json());
import os
import requests
response = requests.post(
"https://linkpost.app/api/v1/posts",
headers={"Authorization": f"Bearer {os.environ['LINKPOST_KEY']}"},
json={
"account_id": 24,
"format": "text",
"title": "Our winter sale starts on Monday. Everything in the shop is 20% off for a week: https://costastudio.example/sale",
"consent": True,
},
timeout=60,
)
print(response.status_code, response.json())
<?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,
]);
$response = $client->post('posts', [
'json' => [
'account_id' => 24,
'format' => 'text',
'title' => 'Our winter sale starts on Monday. Everything in the shop is 20% off for a week: https://costastudio.example/sale',
'consent' => true,
],
]);
echo $response->getStatusCode(), PHP_EOL, $response->getBody(), PHP_EOL;
{
"data": {
"id": "01m6xb1b0rjhdmnqxg2tbf28ee",
"status": "queued",
"status_label": "Queued",
"status_detail": "It may take a few minutes for the content to process and be visible on your profile.",
"is_final": false,
"platform": "x",
"type": "X text post",
"mode": "direct",
"format": "text",
"account_id": 24,
"account_name": "@maracosta",
"title": "Our winter sale starts on Monday. Everything in the shop is 20% off for a week: https://costastudio.example/sale",
"privacy_level": null,
"scheduled_at": null,
"timezone": null,
"created_at": "2026-11-08T10:25:03Z",
"finished_at": null,
"provider_post_id": null,
"fail_reason": null,
"source": "api"
}
}
On LinkedIn, every post takes privacy_level: PUBLIC (anyone) or CONNECTIONS (your connections only). Text, photo, document and poll posts are PUBLIC when you leave it out; a video needs it. Another value is refused with Choose who can see this post.
Publish photos
Send format=image and the photos in files[], in the order they should appear. One photo can also go as media.
| What | Rule |
|---|---|
| How many | Instagram 1, X and Bluesky 1 to 4, Facebook and Telegram 1 to 10, LinkedIn 1 to 20, TikTok 1 to 35. |
| File types | JPEG, PNG or WebP, up to 300 MB each. |
| What Linkpost sends | Every photo becomes a JPEG of at most 2560 pixels on its long side, without the camera's metadata. On Bluesky, each photo is also made smaller than 1 MB. |
| Alt text | alt[], one per photo in the same order, up to 1000 characters each. LinkedIn, X and Bluesky show it to people who use screen readers. |
| The photo must be between 4:5 (portrait) and 1.91:1 (landscape). Instagram refuses other shapes after the upload, and the post fails. | |
| Telegram | Two or more photos go as one album, with the caption on the first photo. The caption is up to 1024 characters. |
The example posts two photos with alt text to LinkedIn:
curl https://linkpost.app/api/v1/posts \
-H "Authorization: Bearer $LINKPOST_KEY" \
-F account_id=21 \
-F format=image \
-F "files[]=@workshop.jpg" \
-F "files[]=@team.png" \
-F "alt[]=Rolls of printed fabric drying on racks in the workshop" \
-F "alt[]=Five people from the studio team standing at a print table" \
-F title="A look inside our print workshop this week." \
-F consent=1
import { readFile } from "node:fs/promises";
const photos = [
{ path: "workshop.jpg", alt: "Rolls of printed fabric drying on racks in the workshop" },
{ path: "team.png", alt: "Five people from the studio team standing at a print table" },
];
const form = new FormData();
form.append("account_id", "21");
form.append("format", "image");
form.append("title", "A look inside our print workshop this week.");
form.append("consent", "1");
for (const photo of photos) {
form.append("files[]", new Blob([await readFile(photo.path)]), photo.path);
form.append("alt[]", photo.alt);
}
const response = await fetch("https://linkpost.app/api/v1/posts", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.LINKPOST_KEY}` },
body: form,
});
console.log(response.status, await response.json());
import os
from contextlib import ExitStack
import requests
photos = [
("workshop.jpg", "Rolls of printed fabric drying on racks in the workshop"),
("team.png", "Five people from the studio team standing at a print table"),
]
with ExitStack() as stack:
response = requests.post(
"https://linkpost.app/api/v1/posts",
headers={"Authorization": f"Bearer {os.environ['LINKPOST_KEY']}"},
data={
"account_id": 21,
"format": "image",
"title": "A look inside our print workshop this week.",
"alt[]": [alt for _, alt in photos],
"consent": 1,
},
files=[("files[]", (path, stack.enter_context(open(path, "rb")))) for path, _ in photos],
timeout=600,
)
print(response.status_code, response.json())
<?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,
]);
$response = $client->post('posts', [
'multipart' => [
['name' => 'account_id', 'contents' => '21'],
['name' => 'format', 'contents' => 'image'],
['name' => 'title', 'contents' => 'A look inside our print workshop this week.'],
['name' => 'consent', 'contents' => '1'],
['name' => 'files[]', 'contents' => fopen('workshop.jpg', 'r'), 'filename' => 'workshop.jpg'],
['name' => 'files[]', 'contents' => fopen('team.png', 'r'), 'filename' => 'team.png'],
['name' => 'alt[]', 'contents' => 'Rolls of printed fabric drying on racks in the workshop'],
['name' => 'alt[]', 'contents' => 'Five people from the studio team standing at a print table'],
],
]);
echo $response->getStatusCode(), PHP_EOL, $response->getBody(), PHP_EOL;
{
"data": {
"id": "01m6xbcr88rp9pvq73kqtckhs9",
"status": "queued",
"status_label": "Queued",
"status_detail": "It may take a few minutes for the content to process and be visible on your profile.",
"is_final": false,
"platform": "linkedin",
"type": "LinkedIn photo post",
"mode": "direct",
"format": "image",
"account_id": 21,
"account_name": "Mara Costa",
"title": "A look inside our print workshop this week.",
"privacy_level": null,
"scheduled_at": null,
"timezone": null,
"created_at": "2026-11-08T10:31:17Z",
"finished_at": null,
"provider_post_id": null,
"fail_reason": null,
"source": "api"
}
}
TikTok photos
A TikTok photo post takes 1 to 35 photos and the same settings as a TikTok video, except duets and stitches: mode, privacy_level, allow_comment, commercial_toggle, brand_organic and brand_content. Read creator info first, as for a video.
The text can be up to 4000 characters. TikTok shows its first line, up to 90 characters, as the title of the post, and the whole text as its description. Linkpost asks TikTok to add music automatically. TikTok downloads the photos from Linkpost rather than receiving an upload, so the post goes straight from queued to processing.
curl https://linkpost.app/api/v1/posts \
-H "Authorization: Bearer $LINKPOST_KEY" \
-F account_id=7 \
-F format=image \
-F mode=direct \
-F privacy_level=PUBLIC_TO_EVERYONE \
-F "files[]=@look-1.jpg" \
-F "files[]=@look-2.jpg" \
-F "files[]=@look-3.jpg" \
-F title="Three looks for autumn" \
-F consent=1
import { readFile } from "node:fs/promises";
const form = new FormData();
form.append("account_id", "7");
form.append("format", "image");
form.append("mode", "direct");
form.append("privacy_level", "PUBLIC_TO_EVERYONE");
form.append("title", "Three looks for autumn");
form.append("consent", "1");
for (const path of ["look-1.jpg", "look-2.jpg", "look-3.jpg"]) {
form.append("files[]", new Blob([await readFile(path)], { type: "image/jpeg" }), path);
}
const response = await fetch("https://linkpost.app/api/v1/posts", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.LINKPOST_KEY}` },
body: form,
});
console.log(response.status, await response.json());
import os
from contextlib import ExitStack
import requests
paths = ["look-1.jpg", "look-2.jpg", "look-3.jpg"]
with ExitStack() as stack:
response = requests.post(
"https://linkpost.app/api/v1/posts",
headers={"Authorization": f"Bearer {os.environ['LINKPOST_KEY']}"},
data={
"account_id": 7,
"format": "image",
"mode": "direct",
"privacy_level": "PUBLIC_TO_EVERYONE",
"title": "Three looks for autumn",
"consent": 1,
},
files=[("files[]", (path, stack.enter_context(open(path, "rb")), "image/jpeg")) for path in paths],
timeout=600,
)
print(response.status_code, response.json())
<?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,
]);
$multipart = [
['name' => 'account_id', 'contents' => '7'],
['name' => 'format', 'contents' => 'image'],
['name' => 'mode', 'contents' => 'direct'],
['name' => 'privacy_level', 'contents' => 'PUBLIC_TO_EVERYONE'],
['name' => 'title', 'contents' => 'Three looks for autumn'],
['name' => 'consent', 'contents' => '1'],
];
foreach (['look-1.jpg', 'look-2.jpg', 'look-3.jpg'] as $path) {
$multipart[] = ['name' => 'files[]', 'contents' => fopen($path, 'r'), 'filename' => $path];
}
$response = $client->post('posts', ['multipart' => $multipart]);
echo $response->getStatusCode(), PHP_EOL, $response->getBody(), PHP_EOL;
{
"data": {
"id": "01m6xc9ww0grkwd4701rdtdxzp",
"status": "queued",
"status_label": "Queued",
"status_detail": "It may take a few minutes for the content to process and be visible on your profile.",
"is_final": false,
"platform": "tiktok",
"type": "TikTok photo post",
"mode": "direct",
"format": "image",
"account_id": 7,
"account_name": "Mara Costa",
"title": "Three looks for autumn",
"privacy_level": "PUBLIC_TO_EVERYONE",
"scheduled_at": null,
"timezone": null,
"created_at": "2026-11-08T10:47:12Z",
"finished_at": null,
"provider_post_id": null,
"fail_reason": null,
"source": "api"
}
}
Publish a carousel
An Instagram carousel takes 2 to 10 photos or videos, mixed in any order, in files[]. Photos can be JPEG, PNG or WebP and must be between 4:5 and 1.91:1. Videos must be MP4 or MOV, not WebM, and last 3 to 60 seconds each. Each file can be up to 300 MB. The caption goes in title, up to 2200 characters.
A video outside 3 to 60 seconds is refused before anything is sent, with Instagram takes carousel videos from 3 s to 60 s. in files.
Instagram processes each item before it publishes the carousel, so a carousel stays in processing for a while. If one item is refused, the whole post fails with Instagram could not process one of the carousel items. Photos need to be between 4:5 and 1.91:1, videos MP4 or MOV.
curl https://linkpost.app/api/v1/posts \
-H "Authorization: Bearer $LINKPOST_KEY" \
-F account_id=12 \
-F format=carousel \
-F "files[]=@cover.jpg" \
-F "files[]=@detail.jpg" \
-F "files[]=@making-of.mp4" \
-F title="The autumn scarf, from sketch to shop. Swipe to see how it is made." \
-F consent=1
import { readFile } from "node:fs/promises";
const form = new FormData();
form.append("account_id", "12");
form.append("format", "carousel");
form.append("title", "The autumn scarf, from sketch to shop. Swipe to see how it is made.");
form.append("consent", "1");
for (const path of ["cover.jpg", "detail.jpg", "making-of.mp4"]) {
form.append("files[]", new Blob([await readFile(path)]), path);
}
const response = await fetch("https://linkpost.app/api/v1/posts", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.LINKPOST_KEY}` },
body: form,
});
console.log(response.status, await response.json());
import os
from contextlib import ExitStack
import requests
paths = ["cover.jpg", "detail.jpg", "making-of.mp4"]
with ExitStack() as stack:
response = requests.post(
"https://linkpost.app/api/v1/posts",
headers={"Authorization": f"Bearer {os.environ['LINKPOST_KEY']}"},
data={
"account_id": 12,
"format": "carousel",
"title": "The autumn scarf, from sketch to shop. Swipe to see how it is made.",
"consent": 1,
},
files=[("files[]", (path, stack.enter_context(open(path, "rb")))) for path in paths],
timeout=900,
)
print(response.status_code, response.json())
<?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,
]);
$multipart = [
['name' => 'account_id', 'contents' => '12'],
['name' => 'format', 'contents' => 'carousel'],
['name' => 'title', 'contents' => 'The autumn scarf, from sketch to shop. Swipe to see how it is made.'],
['name' => 'consent', 'contents' => '1'],
];
foreach (['cover.jpg', 'detail.jpg', 'making-of.mp4'] as $path) {
$multipart[] = ['name' => 'files[]', 'contents' => fopen($path, 'r'), 'filename' => $path];
}
$response = $client->post('posts', ['multipart' => $multipart]);
echo $response->getStatusCode(), PHP_EOL, $response->getBody(), PHP_EOL;
{
"data": {
"id": "01m6xbhperqx4dj0fgn8x7wv0a",
"status": "queued",
"status_label": "Queued",
"status_detail": "It may take a few minutes for the content to process and be visible on your profile.",
"is_final": false,
"platform": "instagram",
"type": "Instagram carousel",
"mode": "direct",
"format": "carousel",
"account_id": 12,
"account_name": "maracosta",
"title": "The autumn scarf, from sketch to shop. Swipe to see how it is made.",
"privacy_level": null,
"scheduled_at": null,
"timezone": null,
"created_at": "2026-11-08T10:33:59Z",
"finished_at": null,
"provider_post_id": null,
"fail_reason": null,
"source": "api"
}
}
Publish a document
LinkedIn and Telegram take one document per post: a PDF, PowerPoint (.pptx or .ppt) or Word (.docx or .doc) file, in files[] or media.
- LinkedIn shows the document as a carousel people can swipe through, with the file name as its title. LinkedIn turns the pages into images first, so the post spends some time in
processing. A document LinkedIn cannot open fails withLinkedIn could not read the document. Check that it opens and has no password.LinkedIn takes documents of up to 100 MB. - Telegram sends the file to the channel, with
titleas its caption, up to 1024 characters. Telegram takes files of up to 50 MB.
A larger file is refused before anything is sent, with LinkedIn takes files of up to 100 MB. or Telegram takes files of up to 50 MB. in files.
curl https://linkpost.app/api/v1/posts \
-H "Authorization: Bearer $LINKPOST_KEY" \
-F account_id=21 \
-F format=document \
-F "files[]=@Autumn lookbook.pdf" \
-F title="Our autumn lookbook: 12 pages of new prints and how to wear them." \
-F consent=1
import { readFile } from "node:fs/promises";
const form = new FormData();
form.append("account_id", "21");
form.append("format", "document");
form.append("title", "Our autumn lookbook: 12 pages of new prints and how to wear them.");
form.append("consent", "1");
form.append("files[]", new Blob([await readFile("Autumn lookbook.pdf")], { type: "application/pdf" }), "Autumn lookbook.pdf");
const response = await fetch("https://linkpost.app/api/v1/posts", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.LINKPOST_KEY}` },
body: form,
});
console.log(response.status, await response.json());
import os
import requests
with open("Autumn lookbook.pdf", "rb") as document:
response = requests.post(
"https://linkpost.app/api/v1/posts",
headers={"Authorization": f"Bearer {os.environ['LINKPOST_KEY']}"},
data={
"account_id": 21,
"format": "document",
"title": "Our autumn lookbook: 12 pages of new prints and how to wear them.",
"consent": 1,
},
files={"files[]": ("Autumn lookbook.pdf", document, "application/pdf")},
timeout=600,
)
print(response.status_code, response.json())
<?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,
]);
$response = $client->post('posts', [
'multipart' => [
['name' => 'account_id', 'contents' => '21'],
['name' => 'format', 'contents' => 'document'],
['name' => 'title', 'contents' => 'Our autumn lookbook: 12 pages of new prints and how to wear them.'],
['name' => 'consent', 'contents' => '1'],
['name' => 'files[]', 'contents' => fopen('Autumn lookbook.pdf', 'r'), 'filename' => 'Autumn lookbook.pdf'],
],
]);
echo $response->getStatusCode(), PHP_EOL, $response->getBody(), PHP_EOL;
{
"data": {
"id": "01m6xbxah052gbn03xbkb254v8",
"status": "queued",
"status_label": "Queued",
"status_detail": "It may take a few minutes for the content to process and be visible on your profile.",
"is_final": false,
"platform": "linkedin",
"type": "LinkedIn document",
"mode": "direct",
"format": "document",
"account_id": 21,
"account_name": "Mara Costa",
"title": "Our autumn lookbook: 12 pages of new prints and how to wear them.",
"privacy_level": null,
"scheduled_at": null,
"timezone": null,
"created_at": "2026-11-08T10:40:20Z",
"finished_at": null,
"provider_post_id": null,
"fail_reason": null,
"source": "api"
}
}
Publish a poll
LinkedIn, X and Telegram take polls. Send format=poll, the question in title, the answers in poll_options[] and, on LinkedIn and X, how long the poll stays open in poll_hours. A poll takes no files.
| Network | Question | Answers | Longest answer | How long it stays open |
|---|---|---|---|---|
| Up to 140 characters | 2 to 4 | 30 characters | poll_hours |
|
| X | Up to 280 characters | 2 to 4 | 25 characters | poll_hours |
| Telegram | Up to 300 characters | 2 to 10 | 100 characters | Until someone stops it in Telegram |
poll_hourstakes24(1 day),72(3 days) or168(1 week). It is required on LinkedIn and X. A Telegram poll needs none: its polls stay open until someone stops them, and apoll_hoursyou send anyway is ignored.- On LinkedIn, the question is the whole post. The post carries no other text. Like every LinkedIn post, a poll takes
privacy_level. - Polls in Telegram channels are anonymous.
curl https://linkpost.app/api/v1/posts \
-H "Authorization: Bearer $LINKPOST_KEY" \
-H "Content-Type: application/json" \
-d '{
"account_id": 24,
"format": "poll",
"title": "Which colour should our next scarf come in?",
"poll_options": ["Rust", "Forest green", "Navy"],
"poll_hours": 72,
"consent": true
}'
const response = await fetch("https://linkpost.app/api/v1/posts", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.LINKPOST_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
account_id: 24,
format: "poll",
title: "Which colour should our next scarf come in?",
poll_options: ["Rust", "Forest green", "Navy"],
poll_hours: 72,
consent: true,
}),
});
console.log(response.status, await response.json());
import os
import requests
response = requests.post(
"https://linkpost.app/api/v1/posts",
headers={"Authorization": f"Bearer {os.environ['LINKPOST_KEY']}"},
json={
"account_id": 24,
"format": "poll",
"title": "Which colour should our next scarf come in?",
"poll_options": ["Rust", "Forest green", "Navy"],
"poll_hours": 72,
"consent": True,
},
timeout=60,
)
print(response.status_code, response.json())
<?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,
]);
$response = $client->post('posts', [
'json' => [
'account_id' => 24,
'format' => 'poll',
'title' => 'Which colour should our next scarf come in?',
'poll_options' => ['Rust', 'Forest green', 'Navy'],
'poll_hours' => 72,
'consent' => true,
],
]);
echo $response->getStatusCode(), PHP_EOL, $response->getBody(), PHP_EOL;
{
"data": {
"id": "01m6xc1fb0bb33vcgjwzcac2jm",
"status": "queued",
"status_label": "Queued",
"status_detail": "It may take a few minutes for the content to process and be visible on your profile.",
"is_final": false,
"platform": "x",
"type": "X poll",
"mode": "direct",
"format": "poll",
"account_id": 24,
"account_name": "@maracosta",
"title": "Which colour should our next scarf come in?",
"privacy_level": null,
"scheduled_at": null,
"timezone": null,
"created_at": "2026-11-08T10:42:36Z",
"finished_at": null,
"provider_post_id": null,
"fail_reason": null,
"source": "api"
}
}
In a form instead of JSON, send each answer as its own poll_options[] field.
Publish a thread
On X and Bluesky, thread[] adds more posts after the first one, each a reply to the one before. The first post is the post you send: a text post, photos, a video or a poll. thread[] takes up to 24 more posts, each of 1 to 280 characters on X or 1 to 300 on Bluesky. Other networks refuse it.
A thread that starts with a video works on every account. A thread that starts with text, photos or a poll needs those formats, which are pending Meta and TikTok certification.
If a thread fails part of the way, Linkpost keeps the parts that already went out. A retry in the app continues from the first part that is missing.
curl https://linkpost.app/api/v1/posts \
-H "Authorization: Bearer $LINKPOST_KEY" \
-H "Content-Type: application/json" \
-d '{
"account_id": 24,
"format": "text",
"title": "How we choose the colours for a new collection. A short thread.",
"thread": [
"1. We start from the photos the team takes on trips during the year.",
"2. We print ten test swatches of each colour on the real fabric.",
"3. The three colours that the whole team likes go into production."
],
"consent": true
}'
const response = await fetch("https://linkpost.app/api/v1/posts", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.LINKPOST_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
account_id: 24,
format: "text",
title: "How we choose the colours for a new collection. A short thread.",
thread: [
"1. We start from the photos the team takes on trips during the year.",
"2. We print ten test swatches of each colour on the real fabric.",
"3. The three colours that the whole team likes go into production.",
],
consent: true,
}),
});
console.log(response.status, await response.json());
import os
import requests
response = requests.post(
"https://linkpost.app/api/v1/posts",
headers={"Authorization": f"Bearer {os.environ['LINKPOST_KEY']}"},
json={
"account_id": 24,
"format": "text",
"title": "How we choose the colours for a new collection. A short thread.",
"thread": [
"1. We start from the photos the team takes on trips during the year.",
"2. We print ten test swatches of each colour on the real fabric.",
"3. The three colours that the whole team likes go into production.",
],
"consent": True,
},
timeout=60,
)
print(response.status_code, response.json())
<?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,
]);
$response = $client->post('posts', [
'json' => [
'account_id' => 24,
'format' => 'text',
'title' => 'How we choose the colours for a new collection. A short thread.',
'thread' => [
'1. We start from the photos the team takes on trips during the year.',
'2. We print ten test swatches of each colour on the real fabric.',
'3. The three colours that the whole team likes go into production.',
],
'consent' => true,
],
]);
echo $response->getStatusCode(), PHP_EOL, $response->getBody(), PHP_EOL;
{
"data": {
"id": "01m6xc5vz0a826gg9t18zbs2ae",
"status": "queued",
"status_label": "Queued",
"status_detail": "It may take a few minutes for the content to process and be visible on your profile.",
"is_final": false,
"platform": "x",
"type": "X text post",
"mode": "direct",
"format": "text",
"account_id": 24,
"account_name": "@maracosta",
"title": "How we choose the colours for a new collection. A short thread.",
"privacy_level": null,
"scheduled_at": null,
"timezone": null,
"created_at": "2026-11-08T10:45:00Z",
"finished_at": null,
"provider_post_id": null,
"fail_reason": null,
"source": "api"
}
}
The response does not repeat the thread. When the post is published, provider_post_id is the id of the first post. To add a thread to a video in a form, send each part as its own thread[] field.
Invite collaborators and tag people
On Instagram, a post can invite collaborators and tag people. Both take Instagram usernames, with or without the @. Linkpost keeps them in lowercase, without the @, and each one once.
| Parameter | Formats | What it does |
|---|---|---|
collaborators[] |
reel, image, carousel |
Up to 3 accounts invited as collaborators. Each one gets an invite in Instagram. Once they accept, the post also shows on their profile. |
tagged_users[] |
reel, story, image |
Up to 20 people tagged in the post. On a photo, Instagram needs a spot for each tag, so Linkpost puts it in the centre. |
- Stories take no collaborators, and carousels take no tagged people.
- A username has up to 30 letters, numbers, periods and underscores.
- The account you post from cannot be a collaborator or be tagged.
- Every other network refuses both fields.
In a form, send each username as its own collaborators[] or tagged_users[] field. In JSON, send a list. One text with the names separated by commas works too. See the messages in Errors.
Instagram checks each username when the post goes out. If it refuses one, the post fails and fail_reason quotes Instagram's own words.
curl https://linkpost.app/api/v1/posts \
-H "Authorization: Bearer $LINKPOST_KEY" \
-F account_id=12 \
-F format=reel \
-F media=@reel.mp4 \
-F title="Three ways to wear one scarf" \
-F "collaborators[]=ana.gomez" \
-F "tagged_users[]=lucia.mz" \
-F consent=1
import { readFile } from "node:fs/promises";
const form = new FormData();
form.append("account_id", "12");
form.append("format", "reel");
form.append("title", "Three ways to wear one scarf");
form.append("collaborators[]", "ana.gomez");
form.append("tagged_users[]", "lucia.mz");
form.append("consent", "1");
form.append("media", new Blob([await readFile("reel.mp4")], { type: "video/mp4" }), "reel.mp4");
const response = await fetch("https://linkpost.app/api/v1/posts", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.LINKPOST_KEY}` },
body: form,
});
console.log(response.status, await response.json());
import os
import requests
with open("reel.mp4", "rb") as video:
response = requests.post(
"https://linkpost.app/api/v1/posts",
headers={"Authorization": f"Bearer {os.environ['LINKPOST_KEY']}"},
data={
"account_id": 12,
"format": "reel",
"title": "Three ways to wear one scarf",
"collaborators[]": ["ana.gomez"],
"tagged_users[]": ["lucia.mz"],
"consent": 1,
},
files={"media": ("reel.mp4", video, "video/mp4")},
timeout=600,
)
print(response.status_code, response.json())
<?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,
]);
$response = $client->post('posts', [
'multipart' => [
['name' => 'account_id', 'contents' => '12'],
['name' => 'format', 'contents' => 'reel'],
['name' => 'title', 'contents' => 'Three ways to wear one scarf'],
['name' => 'collaborators[]', 'contents' => 'ana.gomez'],
['name' => 'tagged_users[]', 'contents' => 'lucia.mz'],
['name' => 'consent', 'contents' => '1'],
['name' => 'media', 'contents' => fopen('reel.mp4', 'r'), 'filename' => 'reel.mp4'],
],
]);
echo $response->getStatusCode(), PHP_EOL, $response->getBody(), PHP_EOL;
{
"data": {
"id": "01m6xd2q8r0b6t4w9y3k5n7p1c",
"status": "queued",
"status_label": "Queued",
"status_detail": "It may take a few minutes for the content to process and be visible on your profile.",
"is_final": false,
"platform": "instagram",
"type": "Instagram reel",
"mode": "direct",
"format": "reel",
"account_id": 12,
"account_name": "maracosta",
"title": "Three ways to wear one scarf",
"privacy_level": null,
"collaborators": ["ana.gomez"],
"tagged_users": ["lucia.mz"],
"scheduled_at": null,
"timezone": null,
"created_at": "2026-11-08T10:52:10Z",
"finished_at": null,
"provider_post_id": null,
"fail_reason": null,
"source": "api"
}
}
A post without collaborators or tagged people answers without these two fields.
Files by link or from your computer
Instead of sending the files in a multipart request, you can give Linkpost links to them, or send them first from your computer and name them by id. Everything else about the post stays the same, and the request can be JSON.
| Parameter | What it is |
|---|---|
media_url |
A public https:// link to the video, or to the JPEG of a story. |
media_urls |
For image, carousel and document: public https:// links to the files, in order. Up to 35. |
upload_id |
Instead of media_url: the id of a file you sent first. See Send a file from your computer. |
upload_ids |
Instead of media_urls: the ids of files you sent first, in order. Up to 35. |
- One way per post. A file in the request and one of these fields answers
422withSend the file in the request, or media_url or upload_id, not both.Links and uploads together answerSend links or upload ids, not both. - Links follow the rules of the MCP server.
https://on the standard port, a public host name and not an IP address, the file itself without a sign-in, up to 100 MB, downloaded within 60 seconds after at most 3 redirects. See From a link. - A link that cannot be used answers
422undermedia_url, with the reason, such asThe URL answered with status 404. - Text posts and polls take no files. A link or upload for them answers
Text posts and polls go without media.
Linkpost downloads the file before it answers, so give your HTTP client a timeout of a couple of minutes.
curl https://linkpost.app/api/v1/posts \
-H "Authorization: Bearer $LINKPOST_KEY" \
-H "Content-Type: application/json" \
-d '{
"account_id": 12,
"format": "reel",
"media_url": "https://cdn.example.com/scarf.mp4",
"title": "Three ways to wear one scarf",
"scheduled_at": "2026-11-20T09:30:00+01:00",
"consent": true
}'
const response = await fetch("https://linkpost.app/api/v1/posts", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.LINKPOST_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
account_id: 12,
format: "reel",
media_url: "https://cdn.example.com/scarf.mp4",
title: "Three ways to wear one scarf",
scheduled_at: "2026-11-20T09:30:00+01:00",
consent: true,
}),
});
console.log(response.status, await response.json());
import os
import requests
response = requests.post(
"https://linkpost.app/api/v1/posts",
headers={"Authorization": f"Bearer {os.environ['LINKPOST_KEY']}"},
json={
"account_id": 12,
"format": "reel",
"media_url": "https://cdn.example.com/scarf.mp4",
"title": "Three ways to wear one scarf",
"scheduled_at": "2026-11-20T09:30:00+01:00",
"consent": True,
},
timeout=120,
)
print(response.status_code, response.json())
<?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,
]);
$response = $client->post('posts', [
'json' => [
'account_id' => 12,
'format' => 'reel',
'media_url' => 'https://cdn.example.com/scarf.mp4',
'title' => 'Three ways to wear one scarf',
'scheduled_at' => '2026-11-20T09:30:00+01:00',
'consent' => true,
],
]);
echo $response->getStatusCode(), PHP_EOL, $response->getBody(), PHP_EOL;
The answer is 201 Created with the post, as with a file in the request. For a carousel, send "format": "carousel" and the links in media_urls, in order.
Send a file from your computer
For a file on your computer that is not online, ask for a link, send the bytes to it, and name its id in the post.
First, POST /api/v1/uploads gives you the link. Its fields are optional: filename is the name the file keeps, and content_type and size, in bytes, are checked now, so a wrong file fails before you send it.
curl https://linkpost.app/api/v1/uploads \
-H "Authorization: Bearer $LINKPOST_KEY" \
-H "Content-Type: application/json" \
-d '{ "filename": "scarf.mp4", "content_type": "video/mp4" }'
{
"data": {
"id": "01m7q4c9w2e8r5t6y3u1i0o9pa",
"upload_url": "https://linkpost.app/api/v1/uploads/01m7q4c9w2e8r5t6y3u1i0o9pa?expires=1795000000&signature=5f0c…",
"method": "PUT",
"headers": { "Content-Type": "video/mp4" },
"link_expires_at": "2026-11-20T10:30:00Z",
"expires_at": "2026-11-21T09:30:00Z",
"max_size_mb": 512
}
}
Then PUT the file to upload_url. The link is its own credential: send no key. Quote the URL, because it has an &. You can also POST a form with the file in a field named file.
curl -T scarf.mp4 -H "Content-Type: video/mp4" "https://linkpost.app/api/v1/uploads/01m7q4c9w2e8r5t6y3u1i0o9pa?expires=1795000000&signature=5f0c…"
Last, create the post with the id in upload_id, or several ids in upload_ids:
curl https://linkpost.app/api/v1/posts \
-H "Authorization: Bearer $LINKPOST_KEY" \
-H "Content-Type: application/json" \
-d '{ "account_id": 12, "format": "reel", "upload_id": "01m7q4c9w2e8r5t6y3u1i0o9pa", "title": "Three ways to wear one scarf", "consent": true }'
- The link works for 60 minutes and takes one file of up to 512 MB.
- The upload stays for 24 hours, and you can use it in as many posts as you like until then. Each post keeps its own copy.
- You can have up to 50 uploads at a time, and 5 GB in all. Asking for a link past that answers
429. - An
upload_idthat does not exist or expired answers422withNo upload with that id, or it expired. Ask for a new one.One whose file did not arrive answersUpload 01m7q4c9w2e8r5t6y3u1i0o9pa has no file yet. Send the file to its upload_url first.
The link answers 201 when the file arrived, 403 when it was changed or its 60 minutes are over, 409 when it already took its file, 410 when the upload is over 24 hours old, 413 when the file is too large and 415 when Linkpost takes no file of that kind. The same uploads serve WhatsApp messages and the MCP server.
Publish on several accounts at once
POST /api/v1/posts/batch publishes or schedules one post on up to 25 accounts in one request, as the composer does when you choose several accounts.
- All or none. Linkpost checks every post with the rules of its own network first. If any of them fails, the answer is
422, nothing is created, and each error names the post by its position inposts, from 0, such asposts.1.collaborators. - Shared fields. Fields beside
posts, such astitle,media_url,scheduled_atorformat, apply to every post that does not set its own. Each post gives itsaccount_id, as a number, and what differs for its network. - Files by link or upload. Send the request as JSON, with the files as links or uploads. A link shared by several posts is downloaded once, and each post keeps its own copy. A post that names its own file does not take the shared one.
- Consent once.
consent: true, besideposts, covers every post. - One account per post. Each post needs the
account_idof a different account. - Limits. Each post counts as one new post against the limits of 10 a minute and 100 a day, and against your plan's monthly posts if you have them. A batch that would go over is refused whole. You can send up to 10 batches a minute.
| Parameter | Required | What it is |
|---|---|---|
posts |
Yes | 1 to 25 objects. Each has account_id and any parameter of a single post, except files in the request. |
consent |
Yes | true. It confirms that the owner of each account wants these posts published. |
| Any other parameter of a post | No | Applies to every post that does not set its own. |
For TikTok, read the creator info of each account first, as for a single post. The example schedules the same video as an Instagram reel, a TikTok video and a LinkedIn video, with its own text on LinkedIn:
curl https://linkpost.app/api/v1/posts/batch \
-H "Authorization: Bearer $LINKPOST_KEY" \
-H "Content-Type: application/json" \
-d '{
"title": "Three ways to wear one scarf",
"media_url": "https://cdn.example.com/scarf.mp4",
"scheduled_at": "2026-11-20T09:30:00+01:00",
"consent": true,
"posts": [
{ "account_id": 12, "format": "reel" },
{ "account_id": 7, "mode": "direct", "privacy_level": "PUBLIC_TO_EVERYONE", "allow_comment": true },
{ "account_id": 21, "privacy_level": "PUBLIC", "title": "Three ways to wear one scarf, and how we made them." }
]
}'
const response = await fetch("https://linkpost.app/api/v1/posts/batch", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.LINKPOST_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
title: "Three ways to wear one scarf",
media_url: "https://cdn.example.com/scarf.mp4",
scheduled_at: "2026-11-20T09:30:00+01:00",
consent: true,
posts: [
{ account_id: 12, format: "reel" },
{ account_id: 7, mode: "direct", privacy_level: "PUBLIC_TO_EVERYONE", allow_comment: true },
{ account_id: 21, privacy_level: "PUBLIC", title: "Three ways to wear one scarf, and how we made them." },
],
}),
});
const body = await response.json();
if (response.status === 201) {
for (const post of body.data) {
console.log(post.account_name, post.id, post.status);
}
} else {
console.log(response.status, body.errors ?? body.message);
}
import os
import requests
response = requests.post(
"https://linkpost.app/api/v1/posts/batch",
headers={"Authorization": f"Bearer {os.environ['LINKPOST_KEY']}"},
json={
"title": "Three ways to wear one scarf",
"media_url": "https://cdn.example.com/scarf.mp4",
"scheduled_at": "2026-11-20T09:30:00+01:00",
"consent": True,
"posts": [
{"account_id": 12, "format": "reel"},
{"account_id": 7, "mode": "direct", "privacy_level": "PUBLIC_TO_EVERYONE", "allow_comment": True},
{"account_id": 21, "privacy_level": "PUBLIC", "title": "Three ways to wear one scarf, and how we made them."},
],
},
timeout=300,
)
body = response.json()
if response.status_code == 201:
for post in body["data"]:
print(post["account_name"], post["id"], post["status"])
else:
print(response.status_code, body.get("errors", body["message"]))
<?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,
]);
$response = $client->post('posts/batch', [
'json' => [
'title' => 'Three ways to wear one scarf',
'media_url' => 'https://cdn.example.com/scarf.mp4',
'scheduled_at' => '2026-11-20T09:30:00+01:00',
'consent' => true,
'posts' => [
['account_id' => 12, 'format' => 'reel'],
['account_id' => 7, 'mode' => 'direct', 'privacy_level' => 'PUBLIC_TO_EVERYONE', 'allow_comment' => true],
['account_id' => 21, 'privacy_level' => 'PUBLIC', 'title' => 'Three ways to wear one scarf, and how we made them.'],
],
],
]);
$body = json_decode((string) $response->getBody(), true);
if ($response->getStatusCode() === 201) {
foreach ($body['data'] as $post) {
echo $post['account_name'], ' ', $post['id'], ' ', $post['status'], PHP_EOL;
}
} else {
echo $response->getStatusCode(), ' ', json_encode($body['errors'] ?? $body['message']), PHP_EOL;
}
The answer is 201 Created with the posts in the order you sent them, and their shared batch_id. Part of the response:
{
"data": [
{ "id": "01m6xag75ghras1sek74sdmft8", "status": "scheduled", "type": "Instagram reel", "account_id": 12, "account_name": "maracosta", "title": "Three ways to wear one scarf", "scheduled_at": "2026-11-20T08:30:00Z", "batch_id": "01m6xag7a2v9p4c8k3r5t7w1yz" },
{ "id": "01m6xagxm8ngfnaq3ps9ke35e5", "status": "scheduled", "type": "TikTok post", "account_id": 7, "account_name": "Mara Costa", "title": "Three ways to wear one scarf", "scheduled_at": "2026-11-20T08:30:00Z", "batch_id": "01m6xag7a2v9p4c8k3r5t7w1yz" },
{ "id": "01m6xbcr88rp9pvq73kqtckhs9", "status": "scheduled", "type": "LinkedIn post", "account_id": 21, "account_name": "Mara Costa", "title": "Three ways to wear one scarf, and how we made them.", "scheduled_at": "2026-11-20T08:30:00Z", "batch_id": "01m6xag7a2v9p4c8k3r5t7w1yz" }
],
"batch_id": "01m6xag7a2v9p4c8k3r5t7w1yz"
}
Each post is a post like any other: follow, reschedule, retry or cancel it by its own id. batch_id is null when posts held a single post.
When a post does not pass, nothing is created and the error names it:
{
"message": "Instagram takes up to 3 collaborators.",
"errors": {
"posts.1.collaborators": ["Instagram takes up to 3 collaborators."]
}
}
Errors about the whole batch:
| Field | Message |
|---|---|
posts |
posts takes 1 to 25 posts, each with its account_id. |
posts |
Each post needs the account_id of a different account. |
consent |
You need to confirm before we publish anything: send consent true. |
posts |
Your plan allows 30 posts a month and you have used them all. Each account counts as one post. |
posts |
Too many posts for now. Wait a moment and try again, or send fewer at once. |
Schedule a post
Add scheduled_at to any post to publish it later. The post comes back with "status": "scheduled", and Linkpost publishes it at that time.
scheduled_at takes a date and a time, with or without seconds, and with or without an offset:
| You send | Linkpost reads it as |
|---|---|
2026-11-20T09:30:00+01:00 |
09:30 at UTC+1, which is 08:30 UTC. |
2026-11-20T08:30:00Z |
08:30 UTC. |
2026-11-20T08:30:00.000Z |
08:30 UTC. This is what JavaScript's toISOString() gives. |
2026-11-20T09:30 with timezone=Europe/Madrid |
09:30 in Madrid. |
2026-11-20 09:30 |
09:30 in your timezone in Settings. |
- A value with an offset (
Z,+01:00,+0100or+01) is read as it is. - A value without an offset is read in
timezone, an IANA name likeEurope/MadridorAmerica/New_York. Withouttimezone, Linkpost uses your timezone in the app settings, or UTC if you never set one. See Settings. - If you never set a timezone, the first
timezoneyou schedule with becomes yours. - The time must be at least a minute from now and at most 90 days ahead.
- The response is always in UTC.
scheduled_atends inZ, andtimezonesays which timezone the time was read in.
To publish across a daylight saving change, send times without an offset and with timezone. Linkpost then applies the offset that is right on that date.
Limits while a post waits:
- Up to 100 scheduled posts per user at the same time.
- Up to 5120 MB of media between all your scheduled posts. The files wait on Linkpost's private storage until their time comes.
What happens at the scheduled time:
- Linkpost checks for due posts every minute, so a post goes out within about a minute of its time.
- TikTok posts due at the same time on the same account go out 30 seconds apart, because TikTok allows few requests a minute per account.
- For a TikTok post, Linkpost reads the creator info again before it sends anything. If the creator changed a setting the post relied on, the post fails and nothing is sent.
The posts you schedule through the API also appear in the app's calendar. See Scheduling.
List posts
GET /api/v1/posts lists your posts, newest first by the time they were created. It includes every post on your account, whether it was made in the app, through the API or through the MCP server. With from or to, it lists the posts of a window of time, as the calendar does.
| Query parameter | What it does |
|---|---|
status |
Only posts with this status: scheduled, queued, uploading, processing, inbox_delivered, published, failed or canceled. |
platform |
Only posts to this network: tiktok, instagram, facebook, youtube, linkedin, x, bluesky or telegram. |
account_id |
Only posts to this account. |
from |
Only posts whose time is at or after this: a date like 2026-11-01, or a date and time like 2026-11-01T09:00:00+01:00. See below. |
to |
Only posts whose time is at or before this. A date covers the whole day. |
per_page |
Posts per page, from 1 to 100. The default is 25. |
page |
The page number, from 1. |
curl "https://linkpost.app/api/v1/posts?status=scheduled&per_page=2" \
-H "Authorization: Bearer $LINKPOST_KEY"
const url = new URL("https://linkpost.app/api/v1/posts");
url.searchParams.set("status", "scheduled");
url.searchParams.set("per_page", "2");
const response = await fetch(url, {
headers: { Authorization: `Bearer ${process.env.LINKPOST_KEY}` },
});
const { data, meta } = await response.json();
console.log(`${meta.total} scheduled posts`);
for (const post of data) {
console.log(post.scheduled_at, post.type, post.title);
}
import os
import requests
response = requests.get(
"https://linkpost.app/api/v1/posts",
headers={"Authorization": f"Bearer {os.environ['LINKPOST_KEY']}"},
params={"status": "scheduled", "per_page": 2},
timeout=30,
)
body = response.json()
print(f"{body['meta']['total']} scheduled posts")
for post in body["data"]:
print(post["scheduled_at"], post["type"], post["title"])
<?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,
]);
$body = json_decode((string) $client->get('posts', ['query' => ['status' => 'scheduled', 'per_page' => 2]])->getBody(), true);
echo $body['meta']['total'], ' scheduled posts', PHP_EOL;
foreach ($body['data'] as $post) {
echo $post['scheduled_at'], ' ', $post['type'], ' ', $post['title'], PHP_EOL;
}
{
"data": [
{
"id": "01m6xbcr88rp9pvq73kqtckhs9",
"status": "scheduled",
"status_label": "Scheduled",
"status_detail": "It goes out at the scheduled time. The file stays on our private storage until then.",
"is_final": false,
"platform": "linkedin",
"type": "LinkedIn photo post",
"mode": "direct",
"format": "image",
"account_id": 21,
"account_name": "Mara Costa",
"title": "A look inside our print workshop this week.",
"privacy_level": null,
"scheduled_at": "2026-11-24T07:00:00Z",
"timezone": "Europe/Madrid",
"created_at": "2026-11-08T10:31:17Z",
"finished_at": null,
"provider_post_id": null,
"fail_reason": null,
"source": "api"
},
{
"id": "01m6xag75ghras1sek74sdmft8",
"status": "scheduled",
"status_label": "Scheduled",
"status_detail": "It goes out at the scheduled time. The file stays on our private storage until then.",
"is_final": false,
"platform": "instagram",
"type": "Instagram reel",
"mode": "direct",
"format": "reel",
"account_id": 12,
"account_name": "maracosta",
"title": "Three ways to wear one scarf",
"privacy_level": null,
"scheduled_at": "2026-11-20T08:30:00Z",
"timezone": "Europe/Madrid",
"created_at": "2026-11-08T10:15:42Z",
"finished_at": null,
"provider_post_id": null,
"fail_reason": null,
"source": "api"
}
],
"links": {
"first": "https://linkpost.app/api/v1/posts?status=scheduled&per_page=2&page=1",
"last": "https://linkpost.app/api/v1/posts?status=scheduled&per_page=2&page=3",
"prev": null,
"next": "https://linkpost.app/api/v1/posts?status=scheduled&per_page=2&page=2"
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 3,
"links": [
{ "url": null, "label": "« Previous", "page": null, "active": false },
{ "url": "https://linkpost.app/api/v1/posts?status=scheduled&per_page=2&page=1", "label": "1", "page": 1, "active": true },
{ "url": "https://linkpost.app/api/v1/posts?status=scheduled&per_page=2&page=2", "label": "2", "page": 2, "active": false },
{ "url": "https://linkpost.app/api/v1/posts?status=scheduled&per_page=2&page=3", "label": "3", "page": 3, "active": false },
{ "url": "https://linkpost.app/api/v1/posts?status=scheduled&per_page=2&page=2", "label": "Next »", "page": 2, "active": false }
],
"path": "https://linkpost.app/api/v1/posts",
"per_page": 2,
"to": 2,
"total": 6
}
}
To read every page, follow links.next until it is null. The link keeps your filters. An unknown status or platform, or a per_page above 100, answers 422.
Without from and to, the list is ordered by creation time, not by scheduled_at. With either of them, it works like the calendar:
- The time of a post is its
scheduled_at, or itscreated_atwhen it was sent right away. The latest time comes first. - A date without a time covers the whole day. A time without an offset is read in your timezone in Settings.
- Without
to, the window runs into the future, so it includes your scheduled posts.
curl "https://linkpost.app/api/v1/posts?from=2026-11-01&to=2026-11-30&per_page=100" \
-H "Authorization: Bearer $LINKPOST_KEY"
A from or to that is not a date answers 422 with from has to be a date like 2030-01-31 or a date and time like 2030-01-31T09:30:00+01:00., and a from after to with from has to be before to.
Get a post
GET /api/v1/posts/{id} returns one post. Use it to follow a post until it is published or fails. See Post statuses for how often to call it.
curl https://linkpost.app/api/v1/posts/01m6xardvrc76m2h9pfm7as4wr \
-H "Authorization: Bearer $LINKPOST_KEY"
const id = "01m6xardvrc76m2h9pfm7as4wr";
const response = await fetch(`https://linkpost.app/api/v1/posts/${id}`, {
headers: { Authorization: `Bearer ${process.env.LINKPOST_KEY}` },
});
const { data: post } = await response.json();
console.log(post.status, post.provider_post_id ?? post.fail_reason ?? "");
import os
import requests
post_id = "01m6xardvrc76m2h9pfm7as4wr"
response = requests.get(
f"https://linkpost.app/api/v1/posts/{post_id}",
headers={"Authorization": f"Bearer {os.environ['LINKPOST_KEY']}"},
timeout=30,
)
post = response.json()["data"]
print(post["status"], post["provider_post_id"] or post["fail_reason"] or "")
<?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,
]);
$post = json_decode((string) $client->get('posts/01m6xardvrc76m2h9pfm7as4wr')->getBody(), true)['data'];
echo $post['status'], ' ', $post['provider_post_id'] ?? $post['fail_reason'] ?? '', PHP_EOL;
{
"data": {
"id": "01m6xardvrc76m2h9pfm7as4wr",
"status": "published",
"status_label": "Published",
"status_detail": "It was published to your LinkedIn profile.",
"is_final": true,
"platform": "linkedin",
"type": "LinkedIn post",
"mode": "direct",
"format": "video",
"account_id": 21,
"account_name": "Mara Costa",
"title": "Our autumn collection is out today. Here is how we made it.",
"privacy_level": "PUBLIC",
"scheduled_at": null,
"timezone": null,
"created_at": "2026-11-08T10:20:11Z",
"finished_at": "2026-11-08T10:21:46Z",
"provider_post_id": "urn:li:ugcPost:7262618447195271168",
"fail_reason": null,
"source": "api"
}
}
Post fields
| Field | What it is |
|---|---|
id |
The post id. |
status |
Where the post is. See Post statuses. |
status_label |
The status in words, as the app shows it, like Uploading to LinkedIn. |
status_detail |
One sentence about the status. For a failed post it is the reason it failed, in the account owner's language like fail_reason. Otherwise in English. |
is_final |
true once the post is published, inbox_delivered, failed or canceled. |
platform |
The network. |
type |
The kind of post in words, like Instagram reel, TikTok inbox or LinkedIn poll. |
mode |
direct, or inbox for a TikTok inbox upload. |
format |
video, short, reel, story, text, image, carousel, document or poll. |
account_id |
The account the post goes to. null if that account was disconnected later. |
account_name |
The account's name when the post was created. |
title |
The text of the post. null for stories and TikTok inbox uploads. |
privacy_level |
The visibility sent for TikTok posts and YouTube videos, and the visibility of every LinkedIn post (PUBLIC when none was sent). null otherwise. |
collaborators |
Instagram only, when the post has them: the usernames invited as collaborators, without the @. |
tagged_users |
Instagram only, when the post has them: the usernames tagged in the post, without the @. |
scheduled_at |
When the post is due, in UTC. null for a post sent right away. |
timezone |
The timezone scheduled_at was read in. null for a post sent right away. |
created_at |
When the post was created, in UTC. |
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. See Post statuses. |
url |
Where the published post can be seen, or null when there is no public link. See Numbers and links. |
stats |
The post's latest numbers on the network, with the time they were read. null until the first reading. See Numbers and links. |
fail_reason |
Why the post failed, in words you can show, in the account owner's language. null unless it failed. |
source |
Where the post was created: web, api or mcp. |
batch_id |
The id shared by the posts made together for several accounts, in the app or with Publish on several accounts at once. null for a post made on its own. |
Another user's post, or an id that does not exist, answers 404 with {"message": "Not found."}.
Reschedule a post
POST /api/v1/posts/{id}/reschedule moves a scheduled post to another time. It takes scheduled_at (required) and timezone (optional), with the same rules as when you create a post. The content of the post does not change.
curl https://linkpost.app/api/v1/posts/01m6xag75ghras1sek74sdmft8/reschedule \
-H "Authorization: Bearer $LINKPOST_KEY" \
-H "Content-Type: application/json" \
-d '{"scheduled_at": "2026-11-21T18:00", "timezone": "Europe/Madrid"}'
const id = "01m6xag75ghras1sek74sdmft8";
const response = await fetch(`https://linkpost.app/api/v1/posts/${id}/reschedule`, {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.LINKPOST_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ scheduled_at: "2026-11-21T18:00", timezone: "Europe/Madrid" }),
});
console.log(response.status, await response.json());
import os
import requests
post_id = "01m6xag75ghras1sek74sdmft8"
response = requests.post(
f"https://linkpost.app/api/v1/posts/{post_id}/reschedule",
headers={"Authorization": f"Bearer {os.environ['LINKPOST_KEY']}"},
json={"scheduled_at": "2026-11-21T18:00", "timezone": "Europe/Madrid"},
timeout=30,
)
print(response.status_code, response.json())
<?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,
]);
$response = $client->post('posts/01m6xag75ghras1sek74sdmft8/reschedule', [
'json' => ['scheduled_at' => '2026-11-21T18:00', 'timezone' => 'Europe/Madrid'],
]);
echo $response->getStatusCode(), PHP_EOL, $response->getBody(), PHP_EOL;
The answer is the post with its new time:
{
"data": {
"id": "01m6xag75ghras1sek74sdmft8",
"status": "scheduled",
"status_label": "Scheduled",
"status_detail": "It goes out at the scheduled time. The file stays on our private storage until then.",
"is_final": false,
"platform": "instagram",
"type": "Instagram reel",
"mode": "direct",
"format": "reel",
"account_id": 12,
"account_name": "maracosta",
"title": "Three ways to wear one scarf",
"privacy_level": null,
"scheduled_at": "2026-11-21T17:00:00Z",
"timezone": "Europe/Madrid",
"created_at": "2026-11-08T10:15:42Z",
"finished_at": null,
"provider_post_id": null,
"fail_reason": null,
"source": "api"
}
}
Only a post with "status": "scheduled" can move. Once it started to go out, or if it was canceled, the answer is 409:
{ "message": "Only scheduled posts can change. This one is processing." }
A time that breaks the rules answers 422 with the reason in errors.scheduled_at, such as Pick a time at least a minute from now.
Retry a failed post
POST /api/v1/posts/{id}/retry sends a failed post again, with the same text, settings and files, like Retry in the app. It takes no parameters. Linkpost keeps the files of a failed post for 24 hours after its scheduled time, or after it was created if it was not scheduled, so you can retry it until then. See Failed posts.
curl -X POST https://linkpost.app/api/v1/posts/01m6xag75ghras1sek74sdmft8/retry \
-H "Authorization: Bearer $LINKPOST_KEY"
const id = "01m6xag75ghras1sek74sdmft8";
const response = await fetch(`https://linkpost.app/api/v1/posts/${id}/retry`, {
method: "POST",
headers: { Authorization: `Bearer ${process.env.LINKPOST_KEY}` },
});
console.log(response.status, await response.json());
import os
import requests
post_id = "01m6xag75ghras1sek74sdmft8"
response = requests.post(
f"https://linkpost.app/api/v1/posts/{post_id}/retry",
headers={"Authorization": f"Bearer {os.environ['LINKPOST_KEY']}"},
timeout=30,
)
print(response.status_code, response.json())
<?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,
]);
$response = $client->post('posts/01m6xag75ghras1sek74sdmft8/retry');
echo $response->getStatusCode(), PHP_EOL, $response->getBody(), PHP_EOL;
The answer is 200 with the post, back in the queue and without its failure reason. Follow it as any other post: see Get a post.
{
"data": {
"id": "01m6xag75ghras1sek74sdmft8",
"status": "queued",
"status_label": "Queued",
"status_detail": "It may take a few minutes for the content to process and be visible on your profile.",
"is_final": false,
"platform": "instagram",
"type": "Instagram reel",
"mode": "direct",
"format": "reel",
"account_id": 12,
"account_name": "maracosta",
"title": "Three ways to wear one scarf",
"privacy_level": null,
"scheduled_at": "2026-11-21T17:00:00Z",
"timezone": "Europe/Madrid",
"created_at": "2026-11-08T10:15:42Z",
"finished_at": null,
"provider_post_id": null,
"fail_reason": null,
"source": "api"
}
}
A post that cannot be retried answers 409 with the reason:
message |
Why |
|---|---|
Only failed posts can be retried. This one is published. |
The post is not failed. The last word is its status. |
The files of this post are no longer kept, so it cannot be retried. Create it again. |
The 24 hours passed and Linkpost deleted the files. |
The account of this post needs to be connected again before it can be retried. |
The account was disconnected or shows Reconnect needed. Reconnect it first, in the app or with Connect or reconnect an account. |
A retry counts against the same per-user limit as creating a post. See Rate limits.
Remove a failed post
POST /api/v1/posts/{id}/remove deletes a failed post from Linkpost, with the files kept for a retry, as Remove post does in the app. It takes no parameters. Use it for a failed post you will not retry. It cannot be undone.
curl -X POST https://linkpost.app/api/v1/posts/01m6xag75ghras1sek74sdmft8/remove \
-H "Authorization: Bearer $LINKPOST_KEY"
const id = "01m6xag75ghras1sek74sdmft8";
const response = await fetch(`https://linkpost.app/api/v1/posts/${id}/remove`, {
method: "POST",
headers: { Authorization: `Bearer ${process.env.LINKPOST_KEY}` },
});
console.log(response.status, await response.json());
import os
import requests
post_id = "01m6xag75ghras1sek74sdmft8"
response = requests.post(
f"https://linkpost.app/api/v1/posts/{post_id}/remove",
headers={"Authorization": f"Bearer {os.environ['LINKPOST_KEY']}"},
timeout=30,
)
print(response.status_code, response.json())
<?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,
]);
$response = $client->post('posts/01m6xag75ghras1sek74sdmft8/remove');
echo $response->getStatusCode(), PHP_EOL, $response->getBody(), PHP_EOL;
{ "data": { "id": "01m6xag75ghras1sek74sdmft8", "removed": true } }
After that, the post answers 404. Only failed posts can be removed. Any other answers 409, for example { "message": "Only failed posts can be removed. This one is scheduled. Cancel a scheduled post instead." }. Posts that went out stay in your list as a record: to delete a published post, do it on the network.
Cancel a scheduled post
DELETE /api/v1/posts/{id} cancels a scheduled post. Linkpost deletes its file and keeps the post as a record with "status": "canceled". Canceling cannot be undone, and a canceled post does not count against your plan's monthly posts.
curl -X DELETE https://linkpost.app/api/v1/posts/01m6xag75ghras1sek74sdmft8 \
-H "Authorization: Bearer $LINKPOST_KEY"
const id = "01m6xag75ghras1sek74sdmft8";
const response = await fetch(`https://linkpost.app/api/v1/posts/${id}`, {
method: "DELETE",
headers: { Authorization: `Bearer ${process.env.LINKPOST_KEY}` },
});
console.log(response.status, await response.json());
import os
import requests
post_id = "01m6xag75ghras1sek74sdmft8"
response = requests.delete(
f"https://linkpost.app/api/v1/posts/{post_id}",
headers={"Authorization": f"Bearer {os.environ['LINKPOST_KEY']}"},
timeout=30,
)
print(response.status_code, response.json())
<?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,
]);
$response = $client->delete('posts/01m6xag75ghras1sek74sdmft8');
echo $response->getStatusCode(), PHP_EOL, $response->getBody(), PHP_EOL;
{
"data": {
"id": "01m6xag75ghras1sek74sdmft8",
"status": "canceled",
"status_label": "Canceled",
"status_detail": "It was canceled before it went out and the file was deleted.",
"is_final": true,
"platform": "instagram",
"type": "Instagram reel",
"mode": "direct",
"format": "reel",
"account_id": 12,
"account_name": "maracosta",
"title": "Three ways to wear one scarf",
"privacy_level": null,
"scheduled_at": "2026-11-21T17:00:00Z",
"timezone": "Europe/Madrid",
"created_at": "2026-11-08T10:15:42Z",
"finished_at": "2026-11-08T11:02:37Z",
"provider_post_id": null,
"fail_reason": null,
"source": "api"
}
}
A post that is no longer scheduled answers 409, for example { "message": "Only scheduled posts can change. This one is published." }. Canceling never removes a post that already went out: delete it on the network itself.