Pogton
Docs Publishing

API reference

Publishing

Publish now, schedule, queue or draft posts to ten social platforms with one endpoint. Media, per-platform text and options, threads, first comments, statuses and retries.

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

ModeBodyWhat happens
Publish nowneither scheduled_at, queue nor draftPublished 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": trueScheduled into the user's next free queue slot. Status pending. Sends post.scheduled.
Draft"draft": trueStored, 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 from GET /accounts. Use this when a user has more than one account on a platform.
  • user_id and platforms: the user's connected account on each platform. Returns 404 account_not_found when 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

FieldTypeDescription
account_idsstringUp to 50 accounts. Or use user_id + platforms.
user_idstringYour ID for the user. Required with platforms.
platformsstringPlatform slugs, e.g. ["linkedin", "instagram"].
contentstringThe text or caption. Required unless there is media.
mediaarrayImages, videos, GIFs or documents in order. See Media.
platform_contentobjectText per platform that replaces content, e.g. { "twitter": "Shorter text" }.
platform_optionsobjectSettings per platform. See Platform options.
threadarrayFollow-up posts published as replies, on platforms that support threads.
first_commentstringA comment posted right after publishing.
metadataobjectYour own data, up to 4 KB of JSON. Returned with the post and in webhooks.
scheduled_atstringPublish at this time.
queuebooleanUse the next free queue slot. Can't be combined with scheduled_at.
draftbooleanSave without publishing.
media_urlsstringFirst-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" }
  ]
}
FieldDescription
urlPublic URL the platforms can download from.
typeimage, video, gif or document. Inferred from the extension when omitted, so set it for URLs without one.
alt_textUp to 1,500 characters, on platforms that support alt text. Elsewhere it is ignored with a warning.
thumbnail_urlVideo 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_failed with the issues in data.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

StatusMeaning
draftSaved, not scheduled.
pendingWaiting for scheduled_at, or for an automatic retry (then scheduled_at is the retry time).
processingBeing published, or a platform is still processing a video.
publishedEvery target was published.
partially_publishedSome targets were published and at least one failed for good.
failedNo target could be published.
cancelledA draft or scheduled post that was cancelled.
deletedDeleted 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..."
QueryDescription
user_idOnly this user's posts.
statusdraft, pending, processing, published, partially_published, failed or cancelled.
limit1 to 100, default 25.
cursornext_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_at with a time schedules a draft or moves a scheduled post.
  • "scheduled_at": null turns a scheduled post back into a draft.
  • account_ids replaces the targets (same user).
  • "first_comment": null removes 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.cancelled is sent, and the response has "action": "cancelled".
  • A published post is deleted from each platform that supports deleting (deletePost in GET /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.