Upload Text
Upload text posts to various social media platforms using this endpoint.
Note: Currently, this endpoint supports X (Twitter), LinkedIn, Facebook, Threads, and Reddit. More platforms will be added in future updates.
Endpoint
POST /api/upload_text
Headers
| Name | Value | Description | 
|---|---|---|
| Authorization | Apikey your-api-key-here | Your API key for authentication | 
Common Parameters
| Name | Type | Required | Description | 
|---|---|---|---|
| user | String | Yes | User identifier | 
| platform[] | Array | Yes | Platform(s) to upload to. Supported values: linkedin, x, facebook, threads, reddit | 
| title | String | Yes | Default text content for the post. | 
| description | String | No | Optional extended body used only on Reddit (becomes the post text). Ignored elsewhere. | 
| scheduled_date | String (ISO-8601) | No | Optional date/time (ISO-8601) to schedule publishing, e.g., "2024-12-31T23:45:00Z". Must be in the future (≤ 365 days). Omit for immediate upload. | 
| async_upload | Boolean | No | If true, the request returns immediately with arequest_idand processes in the background. See Upload Status. | 
Important: If you set
async_uploadtofalsebut the upload takes longer than 59 seconds, it will automatically switch to asynchronous processing to avoid timeouts. In that case, use therequest_idwith the Upload Status endpoint to check the upload status and result.
Scheduling behavior: When you provide
scheduled_date, the API responds with202 Acceptedand includes ajob_id. That samejob_idwill later appear in Upload History to correlate the scheduled job with the publish record.
This endpoint supports simultaneous text uploads to X (Twitter), LinkedIn, Facebook, Threads, and Reddit.
Platform-Specific Titles
The title parameter serves as a fallback. To set a custom title for a particular platform, use the optional [platform]_title parameter. If provided, it will override the main title for that platform.
Example Optional Parameters:
- linkedin_title: "A professional insight on the latest industry trends."
- x_title: "New update out now! 📢"
- facebook_title: "Excited to share this with my Facebook friends."
- threads_title: "Just posted something new on Threads!"
Platform-Specific Parameters
LinkedIn
| Name | Type | Required | Description | Default | 
|---|---|---|---|---|
| linkedin_title | String | No | Specific text for the LinkedIn post. Fallbacks to title. | title | 
| target_linkedin_page_id | String | No | LinkedIn page ID to upload text to an organization's page. If not provided, posts to the user's personal profile. | 
X (Twitter)
| Name | Type | Required | Description | Default | 
|---|---|---|---|---|
| x_title | String | No | Specific text for the tweet. Fallbacks to title. If the text is long, it will be split into a thread. | title | 
| x_long_text_as_post | Boolean | No | For X Premium users. When true, long text is published as a single post. Whenfalse(default), it creates a thread if text is long. | false | 
| reply_settings | String | No | Controls who can reply to the tweet ("following", "mentionedUsers", "subscribers", "verified") | - | 
| quote_tweet_id | String | No | ID of the tweet to quote in a quote tweet. Mutually exclusive with card_uri,poll_*, anddirect_message_deep_link. | - | 
| geo_place_id | String | No | Place ID for adding geographic location to the tweet | - | 
| nullcast | Boolean | No | Whether to publish without broadcasting (promotional/promoted-only posts) | false | 
| for_super_followers_only | Boolean | No | Tweet exclusive for super followers | false | 
| community_id | String | No | Community ID for posting to specific communities | - | 
| share_with_followers | Boolean | No | Share community post with followers | false | 
| direct_message_deep_link | String | No | Link to take the conversation from public timeline to private Direct Message. Mutually exclusive with card_uri,quote_tweet_id, andpoll_*. | - | 
| card_uri | String | No | Card URI for Twitter Cards/ads/promoted content. Mutually exclusive with quote_tweet_id,direct_message_deep_link, andpoll_*. | - | 
| poll_options | Array | No | Array of poll options (2-4 options, max 25 characters each). Mutually exclusive with card_uri,quote_tweet_id, anddirect_message_deep_link. | [] | 
| poll_duration | Integer | No | Poll duration in minutes (5-10080, i.e., 5 minutes to 7 days) | 1440 | 
| poll_reply_settings | String | No | Who can reply to poll ("following", "mentionedUsers", "subscribers", "verified"). Requires poll_options. | - | 
Note: For Twitter uploads, specify the platform as "x" in the platform[] array.
How Twitter Threads Are Created
If your text in the title field is longer than 280 characters, our API automatically creates a Twitter thread. You don't need to do anything special. By default, x_long_text_as_post is false.
How it works:
Our system creates natural-looking threads by intelligently splitting your text:
- It groups paragraphs: The system combines as many paragraphs (text separated by a blank line) as possible into a single tweet without exceeding the character limit.
- It splits long paragraphs: If a single paragraph is too long for one tweet, it's split into smaller parts. The system first tries to split by line breaks and then by words.
This process ensures your threads are easy to read.
Example of a thread creation
If you send this text in the title:
This is the first paragraph. It is short.
This second paragraph is a bit longer. Our API tries to keep paragraphs together in one tweet.
This is a much longer third paragraph. It probably won't fit with the others. It might even be too long for a single tweet. If so, the API will split it. It will first look for line breaks. If a single line is still too long, it will split it by words. This creates a readable and well-structured Twitter thread automatically.
The API will create a thread like this:
Tweet 1:
This is the first paragraph. It is short.
This second paragraph is a bit longer. Our API tries to keep paragraphs together in one tweet.
Tweet 2:
This is a much longer third paragraph. It probably won't fit with the others. It might even be too long for a single tweet. If so, the API will split it. It will first look for line breaks.
Tweet 3:
If a single line is still too long, it will split it by words. This creates a readable and well-structured Twitter thread automatically.
Facebook
| Name | Type | Required | Description | Default | 
|---|---|---|---|---|
| facebook_title | String | No | Specific text for the Facebook post. Fallbacks to title. | title | 
| facebook_page_id | String | Yes | Facebook Page ID where the text will be posted. | - | 
| facebook_link_url | String | No | Optional URL to include for link preview in text posts. If provided, it's sent as linkto the Graph API and Facebook may render a preview card. | - | 
Note: If
facebook_page_idis not provided, we will automatically use the user's only connected Page (if exactly one exists). If multiple Pages are connected, the API returns a helpful error with anavailable_pageslist so you can choose one. Posting to personal Facebook profiles via API is not supported by Meta; only Pages can be posted to.
Threads
| Name | Type | Required | Description | Default | 
|---|---|---|---|---|
| threads_title | String | No | Specific text for the Threads post. Fallbacks to title. | title | 
| threads_long_text_as_post | Boolean | No | If true, long text is published as a single post. Iffalse(default), a thread is created if the text exceeds 500 characters. | false | 
Note: To upload content to Threads, specify the platform as "threads" in the platform[] array.
How Threads Are Created
If the text you provide exceeds 500 characters and threads_long_text_as_post is false, our API will automatically create a thread on Threads, similar to how it works with X (Twitter).
How it works:
Our system creates natural-looking threads by intelligently splitting your text:
- It groups paragraphs: The system combines as many paragraphs as possible into a single post without exceeding the character limit.
- It splits long paragraphs: If a single paragraph is too long for a post, it is split into smaller parts, first trying to break by line breaks, and if that's not enough, by words.
This process ensures that your Threads are coherent and easy to read, replicating the functionality you already enjoy for X.
Reddit
| Name | Type | Required | Description | Default | 
|---|---|---|---|---|
| subreddit | String | Yes | Destination subreddit, without r/(e.g.,python). | - | 
| flair_id | String | No | ID of the flair template to apply to the post. | - | 
If you provide the global description field, it becomes the Markdown body of the Reddit post; otherwise we post only the title.
Note: To upload content to Reddit, specify the platform as "reddit" in the platform[] array.
Example Requests
Upload Text to X (Twitter)
curl \
  -H 'Authorization: Apikey your-api-key-here' \
  -F 'user="test"' \
  -F 'platform[]=x' \
  -F 'title="This is my tweet content!"' \
  -X POST https://api.upload-post.com/api/upload_text
Create a Twitter Thread
curl \
  -H 'Authorization: Apikey your-api-key-here' \
  -F 'user="test"' \
  -F 'platform[]=x' \
  -F 'title="This is the first paragraph of a thread.\n\nThis is the second paragraph. Because this whole text is longer than 280 characters, the API will automatically create a thread. You can also add more paragraphs to create longer and more detailed threads easily."' \
  -X POST https://api.upload-post.com/api/upload_text
Upload Text to LinkedIn (Personal Profile)
curl \
  -H 'Authorization: Apikey your-api-key-here' \
  -F 'user="test"' \
  -F 'platform[]=linkedin' \
  -F 'title="Exciting news to share on LinkedIn!"' \
  -X POST https://api.upload-post.com/api/upload_text
Upload Text to LinkedIn (Organization Page)
curl \
  -H 'Authorization: Apikey your-api-key-here' \
  -F 'user="test"' \
  -F 'platform[]=linkedin' \
  -F 'title="Our company is launching a new product!"' \
  -F 'target_linkedin_page_id="your_linkedin_page_id_here"' \
  -X POST https://api.upload-post.com/api/upload_text
Upload Text to Facebook Page
curl \
  -H 'Authorization: Apikey your-api-key-here' \
  -F 'title="This is a test post to Facebook using the title field for content!"' \
  -F 'user="test2"' \
  -F 'platform[]=facebook' \
  -F 'facebook_page_id="your_facebook_page_id_here"' \
  -F 'facebook_link_url="https://example.com/article"' \
  -X POST https://api.upload-post.com/api/upload_text
Upload Text to Threads and Twitter (X)
curl \
  -H 'Authorization: Apikey your-api-key-here' \
  -F 'title="This is a cross-post to Threads and X!"' \
  -F 'user="test"' \
  -F 'platform[]=threads' \
  -F 'platform[]=x' \
  -X POST https://api.upload-post.com/api/upload_text
Upload Text to Reddit
curl \
  -H 'Authorization: Apikey your-api-key-here' \
  -F 'user="test"' \
  -F 'platform[]=reddit' \
  -F 'title="This is my Reddit post content!"' \
  -F 'subreddit="python"' \
  -X POST https://api.upload-post.com/api/upload_text
Responses
- 200 OK (synchronous, finished fast)
{
  "success": true,
  "results": {
    "x":        { "success": true, "url": "https://x.com/..." },
    "facebook": { "success": false, "error": "Facebook Page ID is required for text posts to Facebook." }
  },
  "usage": { "count": 14, "limit": 100, "last_reset": "..." }
}
- 200 OK (asynchronous/background started or sync→background fallback)
{
  "success": true,
  "message": "Text post initiated successfully in background.",
  "request_id": "1a2b3c4d5e...",
  "total_platforms": 1
}
- 202 Accepted (scheduled)
{
  "success": true,
  "job_id": "scheduler_job_789",
  "scheduled_date": "2025-09-22T10:00:00Z"
}
- 
400 Bad Request - Missing title(content),user,platform[], invalid platforms, Reddit withoutsubreddit, invalidscheduled_date. For Facebook withoutfacebook_page_id, the per-platform result will include an error entry forfacebook.
 
- Missing 
- 
401 Unauthorized: { "success": false, "message": "Invalid or expired token" }
- 
403 Forbidden (plan restrictions) 
- 
404 Not Found (e.g., user not found) 
- 
429 Too Many Requests (monthly limit exceeded; includes current usage) 
{
  "success": false,
  "message": "This upload would exceed your monthly limit.",
  "usage": { "count": 10, "limit": 10, "last_reset": "..." }
}
- 500 Internal Server Error: { "success": false, "error": "Detailed error message" }
Notes
- When async or when sync falls back to background, use GET /api/uploadposts/status?request_id={request_id}to poll progress.
- Per-platform results are returned under results.{platform}and may include fields likeurl, platform-specific IDs, orerror.