Skip to main content

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

NameValueDescription
AuthorizationApikey your-api-key-hereYour API key for authentication

Common Parameters

NameTypeRequiredDescription
userStringYesUser identifier
platform[]ArrayYesPlatform(s) to upload to. Supported values: linkedin, x, facebook, threads, reddit
titleStringYesDefault text content for the post.
descriptionStringNoOptional extended body used only on Reddit (becomes the post text). Ignored elsewhere.
scheduled_dateString (ISO-8601)NoOptional 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_uploadBooleanNoIf true, the request returns immediately with a request_id and processes in the background. See Upload Status.

Important: If you set async_upload to false but the upload takes longer than 59 seconds, it will automatically switch to asynchronous processing to avoid timeouts. In that case, use the request_id with the Upload Status endpoint to check the upload status and result.

Scheduling behavior: When you provide scheduled_date, the API responds with 202 Accepted and includes a job_id. That same job_id will 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

NameTypeRequiredDescriptionDefault
linkedin_titleStringNoSpecific text for the LinkedIn post. Fallbacks to title.title
target_linkedin_page_idStringNoLinkedIn page ID to upload text to an organization's page. If not provided, posts to the user's personal profile.

X (Twitter)

NameTypeRequiredDescriptionDefault
x_titleStringNoSpecific text for the tweet. Fallbacks to title. If the text is long, it will be split into a thread.title
x_long_text_as_postBooleanNoFor X Premium users. When true, long text is published as a single post. When false (default), it creates a thread if text is long.false
reply_settingsStringNoControls who can reply to the tweet ("following", "mentionedUsers", "subscribers", "verified")-
quote_tweet_idStringNoID of the tweet to quote in a quote tweet. Mutually exclusive with card_uri, poll_*, and direct_message_deep_link.-
geo_place_idStringNoPlace ID for adding geographic location to the tweet-
nullcastBooleanNoWhether to publish without broadcasting (promotional/promoted-only posts)false
for_super_followers_onlyBooleanNoTweet exclusive for super followersfalse
community_idStringNoCommunity ID for posting to specific communities-
share_with_followersBooleanNoShare community post with followersfalse
direct_message_deep_linkStringNoLink to take the conversation from public timeline to private Direct Message. Mutually exclusive with card_uri, quote_tweet_id, and poll_*.-
card_uriStringNoCard URI for Twitter Cards/ads/promoted content. Mutually exclusive with quote_tweet_id, direct_message_deep_link, and poll_*.-
poll_optionsArrayNoArray of poll options (2-4 options, max 25 characters each). Mutually exclusive with card_uri, quote_tweet_id, and direct_message_deep_link.[]
poll_durationIntegerNoPoll duration in minutes (5-10080, i.e., 5 minutes to 7 days)1440
poll_reply_settingsStringNoWho 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:

  1. 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.
  2. 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

NameTypeRequiredDescriptionDefault
facebook_titleStringNoSpecific text for the Facebook post. Fallbacks to title.title
facebook_page_idStringYesFacebook Page ID where the text will be posted.-
facebook_link_urlStringNoOptional URL to include for link preview in text posts. If provided, it's sent as link to the Graph API and Facebook may render a preview card.-

Note: If facebook_page_id is 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 an available_pages list so you can choose one. Posting to personal Facebook profiles via API is not supported by Meta; only Pages can be posted to.

Threads

NameTypeRequiredDescriptionDefault
threads_titleStringNoSpecific text for the Threads post. Fallbacks to title.title
threads_long_text_as_postBooleanNoIf true, long text is published as a single post. If false (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:

  1. It groups paragraphs: The system combines as many paragraphs as possible into a single post without exceeding the character limit.
  2. 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

NameTypeRequiredDescriptionDefault
subredditStringYesDestination subreddit, without r/ (e.g., python).-
flair_idStringNoID 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 without subreddit, invalid scheduled_date. For Facebook without facebook_page_id, the per-platform result will include an error entry for facebook.
  • 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 like url, platform-specific IDs, or error.