Publishing
One endpoint publishes to every network, with a result per platform.
POST /v1/posts publishes, schedules or saves a draft. One request can go to many accounts on different networks.
Publish now
curl -X POST https://api.postkey.dev/v1/posts \
-H "x-access-key: $POSTKEY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"content": "We just shipped dark mode",
"mediaItems": [
{ "type": "image", "url": "https://cdn.example.com/dark-mode.png", "altText": "The app in dark mode" }
],
"platforms": [
{ "platform": "instagram", "accountId": "int_ig_123" },
{ "platform": "linkedin", "accountId": "int_li_456" },
{ "platform": "twitter", "accountId": "int_x_789" }
],
"publishNow": true
}'{
"success": true,
"postId": "post_8f21c",
"status": "published",
"platforms": [
{ "platform": "instagram", "accountId": "int_ig_123", "success": true, "platformPostUrl": "https://www.instagram.com/p/…" },
{ "platform": "linkedin", "accountId": "int_li_456", "success": true, "platformPostUrl": "https://www.linkedin.com/feed/update/…" },
{ "platform": "twitter", "accountId": "int_x_789", "success": true, "platformPostUrl": "https://x.com/acme/status/…" }
]
}Request fields
| Field | Meaning |
|---|---|
content | The text of the post. |
mediaItems | Optional. A list of { type, url, altText?, thumbnail? }. type is image, video, gif or document. The url must be public, or come from Media upload. |
platforms | The accounts to post to. Each item is { platform, accountId, content?, platformSpecificData? }. |
publishNow | true to publish right away. |
scheduledFor + timezone | Publish later. See Scheduling. |
saveAsDraft | true to save without publishing. |
Pick one mode: publishNow, scheduledFor or saveAsDraft.
Different text per platform
Networks talk differently. Put content inside a platform item to override the top-level text for that platform only.
{
"content": "Dark mode is here. 20 seconds to see it.",
"mediaItems": [{ "type": "video", "url": "https://cdn.example.com/dark-mode.mp4" }],
"platforms": [
{ "platform": "instagram", "accountId": "int_ig_123", "platformSpecificData": { "shareToFeed": true } },
{ "platform": "twitter", "accountId": "int_x_789", "content": "Dark mode is live. Settings > Appearance." }
],
"publishNow": true
}Platform options
platformSpecificData holds options only one network has. Some examples:
| Platform | Options |
|---|---|
twitter | threadItems, replyToTweetId, replySettings, poll, communityId |
instagram | contentType (story for a Story; videos post as Reels), shareToFeed, collaborators, coverUrl, locationId |
facebook | contentType, link, videoThumbnailUrl |
linkedin | visibility, mentions, documentTitle, articleUrl |
tiktok | privacyLevel, disableComment, disableDuet, disableStitch, isAigc |
youtube | title, visibility, tags, playlistId, madeForKids, firstComment |
pinterest | boardId, title, link, altText |
googlebusiness | topicType (update, offer, event), callToActionType, callToActionUrl, event and offer fields |
The full list for every platform is in the API reference.
Partial success
Each platform publishes on its own. One failure never stops the others.
The post's overall status is:
| Status | Meaning |
|---|---|
published | Every platform worked. |
partial | Some worked, some failed. success is still true. |
failed | Every platform failed. success is false. |
publishing | Still in progress, usually video. The final result comes by webhook. |
scheduled | Waiting for its time. |
draft | Saved, not published. |
Each item in platforms has its own success, and either a platformPostUrl or a plain error:
{
"success": true,
"postId": "post_8f21c",
"status": "partial",
"platforms": [
{ "platform": "instagram", "accountId": "int_ig_123", "success": false, "error": "This is a personal account. Instagram only publishes to Business or Creator accounts." },
{ "platform": "linkedin", "accountId": "int_li_456", "success": true, "platformPostUrl": "https://www.linkedin.com/feed/update/…" },
{ "platform": "twitter", "accountId": "int_x_789", "success": true, "platformPostUrl": "https://x.com/acme/status/…" }
]
}Refunds
Credits are charged per platform. A platform that fails gets its credits back automatically. In the example above, only LinkedIn and X are charged.
Retry the failed platforms
Fix the cause, then retry. Only the failed platforms are sent again. Platforms that already published are never posted twice.
curl -X POST https://api.postkey.dev/v1/posts/post_8f21c/retry \
-H "x-access-key: $POSTKEY_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'To retry later, send { "scheduledFor": "2026-12-01T18:00:00", "timezone": "America/New_York" }. A retry is charged again, and refunded again if it fails.
Drafts
Save a post without publishing. Drafts need no accounts and cost no credits.
{ "content": "Q1 launch post, waiting for sign-off", "platforms": [], "saveAsDraft": true }Later, edit it with PUT /v1/posts/{postId} and publish or schedule it.
Other post calls
| Call | What it does |
|---|---|
GET /v1/posts | List posts. Filter by status, platform, profile and time. |
GET /v1/posts/{postId} | One post with its per-platform results. |
PUT /v1/posts/{postId} | Edit a draft or scheduled post. |
DELETE /v1/posts/{postId} | Delete a post. |
POST /v1/posts/sync-external | Import recent posts made outside Postkey, for analytics. |
Rate limits
Every network limits how much an account can post. Postkey queues posts to stay inside those limits, so you don't have to track them yourself.