Overview
The Create Post endpoint allows you to publish a new post. Supports plain text, polls, and media attachments.Authentication
Requires a valid API key with a connected X account.Input
| Field | Type | Description |
|---|---|---|
text | string | Required. The post text (max 280 characters) |
poll_options | string[] | Poll choices (2-4 options) |
poll_duration_minutes | number | Poll duration in minutes (5-10080) |
media_ids | string[] | Pre-uploaded media IDs to attach (max 4) |
Polls
To create a poll, provide bothpoll_options and poll_duration_minutes:
- Minimum 2 options, maximum 4
- Duration range: 5 minutes to 7 days (10,080 minutes)