Posting
POST /v1/posts publishes one post to many accounts. Each account can get its own text and options, every network's limits are checked before anything goes out, and each network reports its own result.The post body
Pick the accounts, write the text, attach media and choose one mode: publishNow, scheduledFor, addToQueue or saveAsDraft. With none of them the post is saved as a draft.
curl -X POST "https://postkea.com/api/v1/posts" \
-H "Authorization: Bearer $POSTKEA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"content": "Kiln day. Every piece survived, every glaze did something new.",
"mediaItems": [
{
"type": "image",
"url": "https://cdn.example.com/kiln-1.jpg",
"altText": "Glazed mugs cooling on a rack"
}
],
"platforms": [
{
"accountId": "acc_ig_5t1p",
"platformSpecificData": {
"collaborators": [
"clayclub"
]
}
},
{
"accountId": "acc_x_8f2k",
"content": "Kiln day. Every piece survived."
},
{
"accountId": "acc_pin_2c7d",
"platformSpecificData": {
"boardId": "1084663020000000",
"link": "https://studiolumen.com/shop"
}
}
],
"scheduledFor": "2026-11-04T13:00",
"timezone": "Europe/Berlin",
"firstComment": "Shop the mugs at studiolumen.com",
"tags": [
"kiln",
"product"
]
}'const res = await fetch("https://postkea.com/api/v1/posts", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.POSTKEA_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
content: "Kiln day. Every piece survived, every glaze did something new.",
mediaItems: [
{
type: "image",
url: "https://cdn.example.com/kiln-1.jpg",
altText: "Glazed mugs cooling on a rack",
},
],
platforms: [
{
accountId: "acc_ig_5t1p",
platformSpecificData: {
collaborators: ["clayclub"],
},
},
{
accountId: "acc_x_8f2k",
content: "Kiln day. Every piece survived.",
},
{
accountId: "acc_pin_2c7d",
platformSpecificData: {
boardId: "1084663020000000",
link: "https://studiolumen.com/shop",
},
},
],
scheduledFor: "2026-11-04T13:00",
timezone: "Europe/Berlin",
firstComment: "Shop the mugs at studiolumen.com",
tags: ["kiln", "product"],
}),
});
const { data } = await res.json();
console.log(data);import os, requests
r = requests.post(
"https://postkea.com/api/v1/posts",
headers={"Authorization": f"Bearer {os.environ['POSTKEA_API_KEY']}"},
json={
"content": "Kiln day. Every piece survived, every glaze did something new.",
"mediaItems": [
{
"type": "image",
"url": "https://cdn.example.com/kiln-1.jpg",
"altText": "Glazed mugs cooling on a rack",
},
],
"platforms": [
{
"accountId": "acc_ig_5t1p",
"platformSpecificData": {
"collaborators": ["clayclub"],
},
},
{
"accountId": "acc_x_8f2k",
"content": "Kiln day. Every piece survived.",
},
{
"accountId": "acc_pin_2c7d",
"platformSpecificData": {
"boardId": "1084663020000000",
"link": "https://studiolumen.com/shop",
},
},
],
"scheduledFor": "2026-11-04T13:00",
"timezone": "Europe/Berlin",
"firstComment": "Shop the mugs at studiolumen.com",
"tags": ["kiln", "product"],
},
)
data = r.json()["data"]
print(data)The response is 202 with the created post and any validation warnings in issues. When addToQueue is used, posts lists one post per account and post is the first of them.
Media items
Media must be reachable by a public URL. Upload files first with POST /v1/media and use the mediaItem it returns, or pass any public URL. Sending sizes, dimensions and duration lets validation catch problems before publishing; library items include them automatically. See Media.
Per-platform text
Each entry in platforms is one account. Use content to give that account its own text, for example a longer LinkedIn version and a short X version of the same announcement.
Platform options
Pass these inside platformSpecificData of a platform entry. Every option is optional unless marked required.
X x
Text over 280 characters needs X Premium on the posting account.
Instagram instagram
One image is a photo post, one video is a Reel, several items are a carousel. Instagram needs business or creator accounts.
Facebook facebook
Posts go to Facebook Pages. One video is a video post, images become a photo or album post, otherwise a text or link post.
Threads threads
Supports text, images, videos, carousels and threads.
TikTok tiktok
One video, or up to 35 photos as a photo post. Check the creator's allowed settings with the creatorInfo helper first.
YouTube youtube
Needs one video. A vertical video of 3 minutes or less becomes a Short.
LinkedIn linkedin
Posts to a member profile or an organization page. Supports one video, up to 20 images, a PDF document or a link card.
Pinterest pinterest
One pin with up to 5 images or one video. The text becomes the description, up to 800 characters.
Bluesky bluesky
Text, up to 4 images or one video, and threads. Images larger than 1 MB are compressed for you.
Mastodon mastodon
Works with any Mastodon server. Supports threads and polls.
Google Business googlebusiness
Posts to a Google Business Profile location, with up to one photo given by a public URL.
Reddit reddit
Text posts, or link posts when there is a URL or media. Media is submitted as a link to its URL.
Telegram telegram
Posts to the channel or group the bot was connected to.
Discord discord
Posts through the channel's webhook.
Slack slack
Posts through the channel's incoming webhook.
Tumblr tumblr
Text, images and one video per post, published to the blog you connected.
DEV devto
Markdown articles on DEV. The first image is the cover; other images are added at the end.
Hashnode hashnode
Markdown posts on a Hashnode blog. The API needs the blog on the Hashnode Pro plan.
WordPress wordpress
Posts on a self-hosted WordPress site. Markdown is converted to HTML, the first image becomes the featured image and other images follow the text.
Ghost ghost
Posts on a Ghost site. Markdown is converted to HTML and images are uploaded to Ghost; the first is the feature image.
Medium medium
Markdown stories on Medium. Works only with integration tokens created before 2023. Medium's API cannot delete or edit stories.
Lemmy lemmy
Posts to a Lemmy community from your account. One attached image is uploaded and used as the post link.
Listmonk listmonk
An email campaign on your Listmonk. Markdown is converted to HTML.
Farcaster farcaster
Casts through Neynar, up to 1,024 bytes with up to two embeds (attached media count).
Twitch twitch
Chat messages in your own channel, up to 500 characters. Text only.
Dribbble dribbble
Shots with one image of exactly 400 x 300 or 800 x 600 pixels. Larger 4:3 images are scaled down.
Custom webhook accounts receive platformSpecificData as options in the JSON they are sent, so you can define your own.
Threads
On X, Threads, Bluesky and Mastodon, threadItems are published as replies to the first post, in order. Each item can have its own media. Other networks publish only the main post and you get a thread_unsupported warning.
{
"content": "We rebuilt our scheduler from scratch. Here is what we learned.",
"threadItems": [
{
"content": "1. Time zones are the whole problem. Store the wall clock time and the zone, not just UTC."
},
{
"content": "2. Queues beat cron. Every post is its own delayed job, so one slow network never blocks another."
}
],
"platforms": [
{
"accountId": "acc_x_8f2k"
},
{
"accountId": "acc_bsky_1a2b"
}
],
"publishNow": true
}With autoThread: true, text that is longer than the smallest limit of the threaded networks is split on paragraphs, then sentences, then words, and numbered like 1/3. Networks without threads keep the full text. To preview the split, or to split text yourself, use the free split endpoint:
curl -X POST "https://postkea.com/api/v1/posts/thread-split" \
-H "Authorization: Bearer $POSTKEA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"text": "A long announcement...",
"platform": "x",
"numbered": true
}'const res = await fetch("https://postkea.com/api/v1/posts/thread-split", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.POSTKEA_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
text: "A long announcement...",
platform: "x",
numbered: true,
}),
});
const { data: parts } = await res.json();
console.log(parts);import os, requests
r = requests.post(
"https://postkea.com/api/v1/posts/thread-split",
headers={"Authorization": f"Bearer {os.environ['POSTKEA_API_KEY']}"},
json={
"text": "A long announcement...",
"platform": "x",
"numbered": True,
},
)
parts = r.json()["data"]
print(parts)First comment
firstComment is posted as the first comment or reply right after the post, which is where many accounts put links and hashtags. Supported on X, Instagram, Facebook, Threads, YouTube, LinkedIn, Bluesky, Mastodon, Reddit. On other networks it is skipped with a warning. If the comment fails, the post still counts as published and the failure is listed in the platform's warnings.
Validation and dry run
Before a post is saved, Postkea checks it against every target network: text length (X counts links as 23 characters), media count and mix, video length and size, image size, aspect ratio, titles, hashtags and required options. Send the same body to POST /v1/posts/validate, or add dryRun: true, to run the checks without saving anything. Both are free.
curl -X POST "https://postkea.com/api/v1/posts/validate" \
-H "Authorization: Bearer $POSTKEA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"content": "A very long post...",
"platforms": [
{
"accountId": "acc_x_8f2k"
},
{
"accountId": "acc_pin_2c7d"
}
]
}'const res = await fetch("https://postkea.com/api/v1/posts/validate", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.POSTKEA_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
content: "A very long post...",
platforms: [
{
accountId: "acc_x_8f2k",
},
{
accountId: "acc_pin_2c7d",
},
],
}),
});
const { data: check } = await res.json();
console.log(check);import os, requests
r = requests.post(
"https://postkea.com/api/v1/posts/validate",
headers={"Authorization": f"Bearer {os.environ['POSTKEA_API_KEY']}"},
json={
"content": "A very long post...",
"platforms": [
{
"accountId": "acc_x_8f2k",
},
{
"accountId": "acc_pin_2c7d",
},
],
},
)
check = r.json()["data"]
print(check){
"success": true,
"data": {
"dryRun": true,
"valid": false,
"policy": "auto",
"targets": [
{
"accountId": "acc_x_8f2k",
"platform": "x"
},
{
"accountId": "acc_pin_2c7d",
"platform": "pinterest"
}
],
"issues": [
{
"level": "error",
"platform": "x",
"accountId": "acc_x_8f2k",
"code": "text_too_long",
"message": "X: the text has 412 characters and the limit is 280. Shorten it, or split it into a thread."
},
{
"level": "error",
"platform": "pinterest",
"accountId": "acc_pin_2c7d",
"code": "media_required",
"message": "Pinterest: this platform needs at least one image or video."
},
{
"level": "error",
"platform": "pinterest",
"accountId": "acc_pin_2c7d",
"code": "option_required",
"message": "Pinterest: needs a board. Set platformSpecificData.boardId (list boards with the Pinterest boards helper)."
}
]
}
}Errors block the post with 422 validation_error and the full list in error.details.issues, unless the post is a draft or you send skipValidation: true. Warnings never block. The codes:
Results, partial posts and retries
Every platform entry of a post reports its own status, success, platformPostId, platformPostUrl, error, errorCode, warnings, attempts, metrics and creditsCharged. The post itself moves through these statuses:
Temporary network errors are retried automatically, up to 3 attempts with a growing delay. After that the platform is marked failed. Fix the cause (for example reconnect the account) and retry only the failed platforms, now or at a new scheduledFor:
curl -X POST "https://postkea.com/api/v1/posts/post_8f2k1x9q0m3v7n4b2c6d/retry" \
-H "Authorization: Bearer $POSTKEA_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'const res = await fetch("https://postkea.com/api/v1/posts/post_8f2k1x9q0m3v7n4b2c6d/retry", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.POSTKEA_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({}),
});
const { data: post } = await res.json();
console.log(post);import os, requests
r = requests.post(
"https://postkea.com/api/v1/posts/post_8f2k1x9q0m3v7n4b2c6d/retry",
headers={"Authorization": f"Bearer {os.environ['POSTKEA_API_KEY']}"},
json={},
)
post = r.json()["data"]
print(post)Idempotency
Networks fail, connections drop and jobs get retried. Send an idempotencyKey (for example your own record id) with every create request. If a post with that key already exists in the workspace, the response is 200 with replayed: true and the existing post, and nothing is published twice.
Editing and managing posts
GET /v1/postslists posts. Filter bystatus(comma separated),platform,accountId,profileId,tag,q(text search),fromandto; sort withsort=newest|oldest|scheduled; paginate withcursor.GET /v1/posts/{id}returns one post with every platform result and metrics.PUT /v1/posts/{id}edits a draft, scheduled, pending or failed post: text, media, accounts, time, first comment, thread, tags or notes. Setstatustodraftto unschedule it or toscheduledto schedule a draft.DELETE /v1/posts/{id}deletes the post from Postkea. AddfromPlatforms=trueto also delete the published copies where the network allows it.POST /v1/posts/{id}/duplicatecopies a post as a new draft.GETandPOST /v1/posts/{id}/notesread and add team notes.POST /v1/posts/bulkcreates up to 200 posts in one request, each with the same body as a single post, and reports a result per item. Use it for CSV imports; addstopOnError: trueto stop at the first failure.
Platform limits
These are the limits validation uses. GET /v1/platforms returns them as JSON.