# X API for threads, polls and X Articles

Publish X posts, multi-part threads, polls, quotes, Communities and X Articles from one REST API with weighted character checks, replies and analytics.

Skip X’s developer portal tiers, chunked media uploads and manual thread reply chaining. PostSyncer gives you one REST endpoint to publish single posts, multi-post threads, polls, quote posts, X Communities, long-form X Articles, reply management and analytics.

**REST API:** https://postsyncer.com/api/v1 · **MCP server:** https://postsyncer.com/mcp · **Docs:** https://postsyncer.com/docs/platforms/x

## Example X request

```bash
curl -X POST "https://postsyncer.com/api/v1/posts" \
  -H "Authorization: Bearer $POSTSYNCER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "workspace_id": 4815,
    "schedule_type": "schedule",
    "schedule_for": {
      "date": "2026-12-08",
      "time": "09:00",
      "timezone": "America/Los_Angeles"
    },
    "content": [
      {
        "text": "Three things we changed in our espresso blend this spring."
      },
      {
        "text": "1. Shifted to a lighter washed Guji roast so citrus notes stay crisp in milk."
      },
      {
        "text": "Taste it at Halden Coffee all week: haldencoffee.example/menu",
        "is_first_comment": true,
        "first_comment_delay": 0
      }
    ],
    "accounts": [
      {
        "id": 16234,
        "settings": {
          "reply_settings": "following"
        }
      }
    ]
  }'
```

```json
{
  "id": 81416,
  "status": "SCHEDULED",
  "platforms": [
    {
      "account_id": 16234,
      "platform": "twitter",
      "status": "PENDING",
      "settings": {
        "reply_settings": "following"
      }
    }
  ],
  "skipped_accounts": [],
  "needs_media": []
}
```

## Quick start

1. **Connect X accounts without API tiers.** Authorize standard or X Premium accounts in PostSyncer or send a hosted connect link from POST /accounts/connect-links.

2. **Send single posts, threads, polls or Articles.** Pass one or more content[] items to POST /posts along with optional X settings for reply_settings, polls, quotes, Communities or X Articles.

3. **Read replies and engagement metrics.** Track impressions, likes, reposts, quotes and bookmarks via /analytics, sync and answer replies to your posts via /comments, or inspect public posts with POST /posts/analyze-twitter.

## X endpoints

- `POST /api/v1/posts` (`posts:create / schedule / publish`): Create, schedule or publish X posts, multi-part threads, polls, quotes, Community posts and X Articles.

- `GET /api/v1/accounts/{id}` (`accounts:read`): Inspect account capabilities including can_publish_articles for X Premium accounts.

- `POST /api/v1/posts/analyze-twitter` (`posts:read`): Analyze a public X post and its replies with AI (paid plans).

- `GET /api/v1/comments` (`comments:read`): List X replies synced 2 hours after publishing and daily for 2 days, or on demand via /comments/sync.

- `PATCH /api/v1/comments/{id}/hide` (`comments:update`): Hide an unwanted reply on X (X does not support unhiding).

- `GET /api/v1/analytics/posts/{id}` (`analytics:read`): Read impressions, likes, comments, reposts (shares), quotes and saves.

## X media and text specs

- **Mixed media** (JPG, PNG, GIF, WebP, MP4, MOV, WebM, Up to 20 files per post): Photos, videos and GIFs can be mixed in one post in exact order; each thread item has its own media.

- **Photos & GIFs** (JPG, PNG, WebP · GIF, 5 MB photo · 15 MB GIF): Validated before saving so oversized assets return 422 immediately.

- **Videos** (MP4, MOV, WebM, Up to 500 MB each): WebM or clips over 1920 × 1200, above 60 fps or non-H.264/AAC are re-encoded to MP4.

- **Text count** (Weighted X characters, 280 standard · 25,000 Premium): Emoji count as 2, links count as 23. Over-limit posts return 422 on schedule/publish (drafts unchecked).

- **Polls** (2–4 options, 25 chars/option · 5–10,080 min): Polls cannot be combined with media in the same X post (returns 422).

- **platform key:** twitter (displayed as X across PostSyncer)

- **Threads:** Each content[] item after the first publishes automatically as a reply to the previous item.

- **First comment:** Published as a reply at the end of the thread; first_comment_delay: 0 sends it inline with the thread.

- **Deleting posts:** DELETE /posts/{id} deletes the first post on X; remaining thread replies stay live.

- **Comments API:** Read on every plan (daily allowance on Free); reply with media and hide (no unhide). Delete removes a reply only when the account wrote it on X; any other reply is hidden instead.

- **Analytics metrics:** impressions, likes, comments, shares (reposts), quotes and saves (clicks and profile_visits are null).

## X capabilities and settings

PostSyncer supports X’s full modern publishing surface — from multi-item threads and polls to Communities and X Premium Articles — with exact weighted length validation.

- **Automatic thread chaining.** Pass an array of items in content[] and PostSyncer publishes each entry as a reply to the previous tweet ID while keeping each post’s own text and media intact.

- **Weighted X character validation.** Before scheduling or publishing, every post in a thread is counted using X’s exact rules (emoji = 2, URLs = 23, 280 for standard, 25,000 for Premium) and rejected with an actionable 422 pointing to the exact thread item.

- **Polls, quotes & reply threading.** Attach 2–4 option polls up to 7 days long, quote an existing post with quote_tweet_id, or reply directly into an existing conversation using reply.in_reply_to_tweet_id.

- **X Communities & audience locks.** Target an X Community via community_id (with share_with_followers toggle), restrict replies with reply_settings, or limit visibility with for_super_followers_only.

- **Long-form X Articles.** Publish structured long-form X Articles from eligible X Premium and Premium+ accounts (checked via can_publish_articles on GET /accounts/{id}) with a title and cover image.

- **Cross-post without truncation surprises.** Use accounts[].settings.text to supply a concise X-only hook while LinkedIn, Facebook and Instagram receive your longer copy in the very same API request.

- `text` (string): X-specific text for the first post, overriding content[0].text when cross-posting.

- `reply_settings` (string): Who may reply: everyone (default), following, mentionedUsers or subscribers.

- `poll` (object): Poll with enabled, options (2–4 choices, ≤ 25 chars), duration_minutes (5–10080) and reply_settings. No media allowed.

- `quote_tweet_id` (string): Numeric ID of an existing X post to quote.

- `reply` ({ in_reply_to_tweet_id }): Publish the first post as a reply to an existing X post ID.

- `community_id` (string): Post inside a specific X Community; pair with share_with_followers (default true).

- `article` ({ enabled, title, cover }): Publish a long-form X Article on X Premium accounts with title and media library cover ID.

- `for_super_followers_only` (boolean): Restrict post visibility exclusively to Super Followers.

- `media` (number[]): Replace the first item’s media with X-specific media library IDs.

## Exact X character validation before anything hits the queue

Standard string length checks fail on X because every URL is wrapped to 23 characters and emojis count as 2. Scheduling a thread that passes your local strlen check only to fail mid-thread on X leaves half-published threads on your timeline.

PostSyncer runs X’s weighted counter across every item in content[] whenever schedule_type is schedule or publish_now. If item 2 hits 291 characters on a non-Premium account, POST /posts returns HTTP 422 naming content.1.text and suggesting either shortening it, passing accounts[].settings.text or splitting the thread. Drafts bypass length checks so editors and AI pipelines can refine copy before scheduling.

## Threads, X Articles and mutually exclusive rules

When publishing an X Article on an eligible Premium account, X receives only the Article (plus an optional first comment reply), allowing any additional items in content[] to publish cleanly to other networks in the same cross-post call. Check can_publish_articles on GET /accounts/{id} before toggling settings.article.

Polls cannot share a post with photos, videos or GIFs. PostSyncer enforces that constraint up front with a clear 422 response rather than silently stripping your poll or dropping your attachments.

## Replies, hiding behavior and X analytics nuances

PostSyncer reads X replies two hours after publishing and daily for two days, with on-demand refreshes available via POST /comments/sync (throttled to one read per 5 minutes per post). Replies posted through POST /comments support attachments under the same media rules as posts.

Keep two X platform realities in mind when building moderation tools: X supports hiding replies via PATCH /comments/{id}/hide, but never unhiding (hidden: false returns 422). Deleting a reply removes it from X only when the account wrote it on X itself; any other reply, one sent from PostSyncer included, is hidden on X instead. For analytics, X exposes impressions, likes, comments, reposts, quotes and saves, while private X accounts return analytics_unavailable.reason: x_private.

## Draft X threads, polls and replies from ChatGPT, Claude or Cursor

Connect your AI agent to PostSyncer’s MCP server to write voice-matched X threads, inspect public X posts with analyze-twitter-post and schedule replies without touching raw HTTP.

Related pages: [X MCP](https://postsyncer.com/x-mcp), [X scheduler](https://postsyncer.com/twitter-scheduler), [Unified social media API](https://postsyncer.com/unified-social-media-api).

## Limits and plans

| Plan | Social accounts | Posts | API posts a day, per network |
| --- | --- | --- | --- |
| Free | 2 | 20 a month | Within the 20 |
| Starter ($29 a month) | 10 | Unlimited | Unlimited |
| Pro ($49 a month) | 30 | Unlimited | Unlimited |
| Agency ($99 a month) | 100, then $1/mo each | Unlimited | Unlimited |

Every plan: 60 requests a minute for each PostSyncer user, across all their keys, the API and the MCP server together.

## FAQ

### What platform key does X use in API responses?

Connected X accounts report platform: "twitter" in JSON payloads for backward compatibility, while the app and docs refer to the network as X.

### How do I publish a multi-post thread through the X API?

Pass multiple objects in the content[] array of POST /api/v1/posts. PostSyncer publishes each entry as a reply to the previous post, preserving per-post media.

### Does PostSyncer support X Premium long posts and X Articles?

Yes. Connected X Premium accounts accept up to 25,000 characters per post and can publish long-form X Articles via accounts[].settings.article when can_publish_articles is true.

### Can I publish a poll with images on X?

No. X does not allow combining a poll and media in the same post. PostSyncer returns a 422 validation error if both are supplied.

### Are X comments available on the Free plan?

Yes. X replies are read on every plan, with a daily allowance on the Free plan. Paid plans also unlock AI-powered X post analysis via POST /api/v1/posts/analyze-twitter.

### What happens when I delete a thread via DELETE /api/v1/posts/{id}?

PostSyncer asks X to delete the first post of the thread. Any subsequent thread replies and first comments stay live on X.

---

Page: https://postsyncer.com/x-api · Updated 2026-11-27
