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. |
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 a request_id and processes in the background. See Upload Status. |
Important: If you set
async_upload
tofalse
but the upload takes longer than 59 seconds, it will automatically switch to asynchronous processing to avoid timeouts. In that case, use therequest_id
with the Upload Status endpoint to check the upload status and result.
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. When false (default), it creates a thread if text is long. | false |
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 link to the Graph API and Facebook may render a preview card. | - |
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. 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:
- 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. | - |
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