One endpoint creates every kind of post: POST /api/v1/posts. A post goes to one or more accounts of one user. Each account is a target that is published on its own, so one platform failing doesn't stop the others.
Create a post
curl -X POST https://pogton.com/api/v1/posts \
-H "Authorization: Bearer pk_3f9a..." \
-H "Content-Type: application/json" \
-H "Idempotency-Key: 4d1e7c3a-launch-post" \
-d '{
"account_ids": ["j97fk2m8q4r1t6v3w8x0y5z2a7b4c9ed", "j97ab3c4d5e6f7g8h9j0k1m2n3p4q5rs"],
"content": "Our spring collection is out today.",
"media": [
{ "url": "https://cdn.example.com/spring.jpg", "alt_text": "Three jackets on a rail" }
],
"platform_content": {
"twitter": "Spring collection, out today."
},
"first_comment": "Shop the collection: https://example.com/spring",
"metadata": { "campaign_id": "spring-26" }
}'
The response is 201 with the post object. When publishing now, the call waits until every target has a result, so targets already holds each platform's post ID and URL, or its error.
Four ways to create a post
| Mode | Body | What happens |
|---|---|---|
| Publish now | neither scheduled_at, queue nor draft | Published during the request. Status published, partially_published or failed. |
| Schedule | "scheduled_at": "2026-11-01T09:00:00+01:00" | Status pending until then. Sends post.scheduled. |
| Queue | "queue": true | Scheduled into the user's next free queue slot. Status pending. Sends post.scheduled. |
| Draft | "draft": true | Stored, not published. Publish it with POST /posts/{id}/publish or schedule it with PATCH. |
scheduled_at is ISO 8601 with a timezone offset or Z. It must be in the future and within a year. Scheduled posts are published within a minute of their time. A draft can carry scheduled_at, but stays a draft until you publish or schedule it.
Targeting
Choose the accounts in one of two ways:
account_ids: the account IDs fromGET /accounts. Use this when a user has more than one account on a platform.user_idandplatforms: the user's connected account on each platform. Returns404 account_not_foundwhen the user has none on one of them.
All accounts in a post belong to the same user (422 multiple_users otherwise). A test key can only target sandbox accounts and a live key only real ones (403 mode_mismatch). A disconnected account returns 409 account_revoked.
Body fields
| Field | Type | Description |
|---|---|---|
account_ids | string | Up to 50 accounts. Or use user_id + platforms. |
user_id | string | Your ID for the user. Required with platforms. |
platforms | string | Platform slugs, e.g. ["linkedin", "instagram"]. |
content | string | The text or caption. Required unless there is media. |
media | array | Images, videos, GIFs or documents in order. See Media. |
platform_content | object | Text per platform that replaces content, e.g. { "twitter": "Shorter text" }. |
platform_options | object | Settings per platform. See Platform options. |
thread | array | Follow-up posts published as replies, on platforms that support threads. |
first_comment | string | A comment posted right after publishing. |
metadata | object | Your own data, up to 4 KB of JSON. Returned with the post and in webhooks. |
scheduled_at | string | Publish at this time. |
queue | boolean | Use the next free queue slot. Can't be combined with scheduled_at. |
draft | boolean | Save without publishing. |
media_urls | string | First-version field, still accepted. Use media. |
Media
Each media item is a public URL, or an object:
{
"media": [
"https://cdn.example.com/photo-1.jpg",
{
"url": "https://cdn.example.com/clip.mp4",
"type": "video",
"thumbnail_url": "https://cdn.example.com/clip-cover.jpg"
},
{ "url": "https://cdn.example.com/photo-2.jpg", "alt_text": "The team at the spring launch" }
]
}
| Field | Description |
|---|---|
url | Public URL the platforms can download from. |
type | image, video, gif or document. Inferred from the extension when omitted, so set it for URLs without one. |
alt_text | Up to 1,500 characters, on platforms that support alt text. Elsewhere it is ignored with a warning. |
thumbnail_url | Video cover, on platforms that support one. |
Several images make a carousel where the platform supports one. Each platform's media limits (count, types, mixing images and videos) are in GET /api/v1/platforms. Files that aren't online yet can be uploaded to Pogton first.
Per-platform text
content is used everywhere unless platform_content has text for that platform:
{
"content": "We're hiring a senior backend engineer in Stockholm. Remote-friendly, Go and Postgres. Apply by 15 November.",
"platform_content": {
"twitter": "We're hiring: senior backend engineer, Stockholm or remote.",
"bluesky": "We're hiring a senior backend engineer (Stockholm or remote)."
}
}
Text limits are checked per platform with that platform's counting rules. X counts links as 23 characters and some characters, such as emoji and CJK, as 2. Bluesky counts graphemes.
Platform options
Settings that only exist on one platform, such as a privacy level, a board or a video title, go under platform_options.<platform>:
{
"platform_options": {
"pinterest": { "board_id": "987654321" }
}
}
The available options change as platforms gain features, so the source of truth is the API itself. GET /api/v1/platforms returns an options_schema (JSON Schema) for each platform, and the OpenAPI spec has the same schemas under PlatformOptions:
curl https://pogton.com/api/v1/platforms -H "Authorization: Bearer pk_3f9a..." \
| jq '.data[] | {platform, options: .options_schema}'
Options are validated before publishing. An invalid option returns 422 validation_failed with a field such as platform_options.tiktok.privacy_level. Options for a platform that has none are ignored with a warning. IDs such as Pinterest boards or YouTube playlists come from lookup resources.
Threads and first comments
thread posts follow-ups as replies to the first post, on platforms with thread: true in GET /platforms (such as X, Threads and Bluesky):
{
"account_ids": ["j97ab3c4d5e6f7g8h9j0k1m2n3p4q5rs"],
"content": "How we cut our build time in half, in four steps.",
"thread": [
{ "text": "1. We cached dependencies between runs." },
{ "text": "2. We split the test suite across four machines.", "media": ["https://cdn.example.com/chart.png"] }
]
}
A thread sent to a platform without threads fails validation for that platform, so target those accounts in a separate post.
first_comment is posted from the same account right after the post, on platforms with firstComment: true. Its ID is in targets[].first_comment_id. If the post is published but the comment fails, the target stays published.
Validation
Every post is checked against every target platform before anything is stored. Issues have a severity:
- Errors block the post. The API returns
422 validation_failedwith the issues indata.error.details, and nothing is published on any platform. - Warnings don't. They are returned in
warnings, e.g. alt text on a platform that ignores it.
{
"field": "media",
"code": "media_required",
"message": "Instagram requires an image",
"severity": "error",
"platform": "instagram",
"account_id": "j97fk2m8q4r1t6v3w8x0y5z2a7b4c9ed"
}
Common codes: text_too_long, text_required, media_required, too_many_media, video_not_supported, image_not_supported, document_not_supported, mixed_media, thread_not_supported, first_comment_not_supported, invalid_option, alt_text_ignored, options_ignored.
To check a post without creating it, send the same body to the validation endpoint:
curl -X POST https://pogton.com/api/v1/posts/validate \
-H "Authorization: Bearer pk_3f9a..." \
-H "Content-Type: application/json" \
-d '{ "user_id": "user_123", "platforms": ["twitter", "instagram"], "content": "No image here" }'
{
"valid": false,
"results": [
{ "account_id": "j97ab3c4d5e6f7g8h9j0k1m2n3p4q5rs", "platform": "twitter", "valid": true, "issues": [] },
{
"account_id": "j97fk2m8q4r1t6v3w8x0y5z2a7b4c9ed",
"platform": "instagram",
"valid": false,
"issues": [{ "field": "media", "code": "media_required", "message": "Instagram requires an image", "severity": "error" }]
}
]
}
Use it to show errors in your composer as the user types.
Statuses
Post status
| Status | Meaning |
|---|---|
draft | Saved, not scheduled. |
pending | Waiting for scheduled_at, or for an automatic retry (then scheduled_at is the retry time). |
processing | Being published, or a platform is still processing a video. |
published | Every target was published. |
partially_published | Some targets were published and at least one failed for good. |
failed | No target could be published. |
cancelled | A draft or scheduled post that was cancelled. |
deleted | Deleted from every platform it was published on. |
The post status is derived from its targets. Webhooks fire when it changes: post.published, post.partially_published, post.failed, post.cancelled and post.deleted.
Target status
Each entry in targets has its own status (pending, processing, published, failed, cancelled, deleted), platform_post_id, url, error, attempts and next_attempt_at.
{
"id": "m17c3d4e5f6g7h8j9k0m1n2p3q4r5s6t",
"account_id": "j97fk2m8q4r1t6v3w8x0y5z2a7b4c9ed",
"platform": "instagram",
"status": "failed",
"platform_post_id": null,
"url": null,
"error": { "code": "media_error", "message": "The image could not be downloaded (HTTP 403)" },
"attempts": 1,
"next_attempt_at": null,
"published_at": null,
"first_comment_id": null
}
Partial failure
A post to LinkedIn and Instagram where Instagram can't fetch the image is partially_published: the LinkedIn target is published with its URL, the Instagram target is failed with the error. The API call itself still returns 201. Check status and targets[].error rather than the HTTP status, or listen for post.partially_published. Fix the cause and retry the failed target.
Automatic retries
Temporary failures (rate_limited, platform_error, network) are retried automatically: up to 3 attempts per target, 1 minute and then 5 minutes apart, or after the platform's Retry-After. While a retry is waiting the target is pending with next_attempt_at, and the post is pending. Other errors fail the target right away.
When a platform rejects the account's token (auth_expired), the target fails and the account becomes needs_reauth. See Reconnecting an account.
Some platforms, such as TikTok and YouTube, process videos after accepting them. The target stays processing until the platform finishes. Pogton checks every minute, and fails the target if it isn't done within 24 hours.
The post object
{
"id": "k57c2d9e1f3g5h7j9k1m3n5p7q9r2s4t",
"status": "published",
"user_id": "user_123",
"content": "Our spring collection is out today.",
"media": [
{ "url": "https://cdn.example.com/spring.jpg", "type": null, "alt_text": "Three jackets on a rail", "thumbnail_url": null }
],
"thread": null,
"first_comment": "Shop the collection: https://example.com/spring",
"platform_content": { "twitter": "Spring collection, out today." },
"platform_options": null,
"metadata": { "campaign_id": "spring-26" },
"account_ids": ["j97fk2m8q4r1t6v3w8x0y5z2a7b4c9ed", "j97ab3c4d5e6f7g8h9j0k1m2n3p4q5rs"],
"targets": [
{
"id": "m17c3d4e5f6g7h8j9k0m1n2p3q4r5s6t",
"account_id": "j97fk2m8q4r1t6v3w8x0y5z2a7b4c9ed",
"platform": "linkedin",
"status": "published",
"platform_post_id": "urn:li:share:7234567890",
"url": "https://www.linkedin.com/feed/update/urn:li:share:7234567890",
"error": null,
"attempts": 1,
"next_attempt_at": null,
"published_at": "2026-10-21T09:00:03.000Z",
"first_comment_id": "urn:li:comment:(urn:li:share:7234567890,7234567999)"
},
{
"id": "m17d4e5f6g7h8j9k0m1n2p3q4r5s6t7u",
"account_id": "j97ab3c4d5e6f7g8h9j0k1m2n3p4q5rs",
"platform": "twitter",
"status": "published",
"platform_post_id": "1848012345678901234",
"url": "https://x.com/acme/status/1848012345678901234",
"error": null,
"attempts": 1,
"next_attempt_at": null,
"published_at": "2026-10-21T09:00:02.000Z",
"first_comment_id": "1848012345678909999"
}
],
"platform_post_ids": {},
"error": null,
"scheduled_at": null,
"published_at": "2026-10-21T09:00:03.000Z",
"created_at": "2026-10-21T09:00:00.000Z",
"updated_at": "2026-10-21T09:00:03.000Z",
"source": "api",
"test": false
}
source is api for posts created through the REST API and mcp for posts created through the MCP server. error summarises target errors. The POST /posts response also has warnings, and a results object keyed by platform for clients of the first API version. platform_post_ids is from the first version too; use targets.
List posts
curl "https://pogton.com/api/v1/posts?user_id=user_123&status=failed&limit=50" \
-H "Authorization: Bearer pk_3f9a..."
| Query | Description |
|---|---|
user_id | Only this user's posts. |
status | draft, pending, processing, published, partially_published, failed or cancelled. |
limit | 1 to 100, default 25. |
cursor | next_cursor from the previous page. |
{ "data": [{ "id": "k57c2d9e1f3g5h7j9k1m3n5p7q9r2s4t", "status": "failed", "...": "..." }], "next_cursor": null, "has_more": false }
Newest first. The response also has posts and count for the first API version.
Get a post
curl https://pogton.com/api/v1/posts/k57c2d9e1f3g5h7j9k1m3n5p7q9r2s4t \
-H "Authorization: Bearer pk_3f9a..."
Edit a post
Drafts and scheduled posts can be edited. Send only the fields you change:
curl -X PATCH https://pogton.com/api/v1/posts/k57c2d9e1f3g5h7j9k1m3n5p7q9r2s4t \
-H "Authorization: Bearer pk_3f9a..." \
-H "Content-Type: application/json" \
-d '{ "content": "Our spring collection is out on Friday.", "scheduled_at": "2026-10-24T09:00:00+02:00" }'
scheduled_atwith a time schedules a draft or moves a scheduled post."scheduled_at": nullturns a scheduled post back into a draft.account_idsreplaces the targets (same user)."first_comment": nullremoves the first comment.
The post is validated again as it will look after the edit. Editing a post that is publishing or already published returns 409 post_not_editable.
Publish a draft or scheduled post now
curl -X POST https://pogton.com/api/v1/posts/k57c2d9e1f3g5h7j9k1m3n5p7q9r2s4t/publish \
-H "Authorization: Bearer pk_3f9a..."
Returns the post with its results, like publishing now with POST /posts. Other statuses return 409 post_not_publishable.
Retry
After fixing the cause of a failure, for example after the user reconnected an account:
curl -X POST https://pogton.com/api/v1/posts/k57c2d9e1f3g5h7j9k1m3n5p7q9r2s4t/retry \
-H "Authorization: Bearer pk_3f9a..." \
-H "Content-Type: application/json" \
-d '{ "account_ids": ["j97fk2m8q4r1t6v3w8x0y5z2a7b4c9ed"] }'
Publishes the failed targets again, now, with a fresh set of attempts. Without account_ids it retries every failed target. Published targets are left alone, so nothing is posted twice. Only failed and partially_published posts can be retried (409 post_not_retryable).
Cancel or delete
curl -X DELETE https://pogton.com/api/v1/posts/k57c2d9e1f3g5h7j9k1m3n5p7q9r2s4t \
-H "Authorization: Bearer pk_3f9a..."
- A draft or scheduled post is cancelled: status
cancelled,post.cancelledis sent, and the response has"action": "cancelled". - A published post is deleted from each platform that supports deleting (
deletePostinGET /platforms). Add?account_id=to delete it from one account only. The response has"action": "deleted"and a result per account:
{
"id": "k57c2d9e1f3g5h7j9k1m3n5p7q9r2s4t",
"status": "deleted",
"success": true,
"action": "deleted",
"results": [
{ "account_id": "j97fk2m8q4r1t6v3w8x0y5z2a7b4c9ed", "platform": "linkedin", "success": true },
{ "account_id": "j97ab3c4d5e6f7g8h9j0k1m2n3p4q5rs", "platform": "twitter", "success": true }
],
"...": "..."
}
success is false if any platform refused; that target stays published. post.deleted is sent when at least one deletion worked. A post that is publishing right now returns 409 post_processing.
Batch
Create up to 50 posts in one request, for example one per user:
curl -X POST https://pogton.com/api/v1/posts/batch \
-H "Authorization: Bearer pk_3f9a..." \
-H "Content-Type: application/json" \
-d '{
"posts": [
{ "user_id": "user_123", "platforms": ["linkedin"], "content": "Week 43 update", "queue": true },
{ "user_id": "user_456", "platforms": ["instagram"], "content": "Week 43 update" }
]
}'
{
"results": [
{ "index": 0, "success": true, "post": { "id": "k57c...", "status": "pending", "...": "..." }, "status": "pending" },
{
"index": 1,
"success": false,
"error": {
"code": "validation_failed",
"message": "The post does not meet the rules of one or more platforms",
"details": [{ "field": "media", "code": "media_required", "message": "Instagram requires an image", "severity": "error", "platform": "instagram" }]
}
}
],
"summary": { "total": 2, "succeeded": 1, "failed": 1 }
}
Each item is a POST /posts body and fails on its own; the batch returns 200 either way. Items are processed in order. An item counts as failed when it was rejected or when its post ended failed.
First-version endpoint
POST /api/v1/posts/schedule takes the same body with a required scheduled_at. It is kept for existing integrations and also returns postId, scheduledAt and accountCount. Use POST /posts for new code.
