Post to X via API — Schedule, Publish, Analyze
Publish videos, images, and text to X (Twitter) with reply permission controls and alt text — scheduled precisely, delivered reliably.
X-specific API controls
Reply permissions, alt text, and three post types from one endpoint.
post_type: videoUpload video natively to X — plays inline in the timeline rather than as an external link, improving engagement.
post_type: imageUp to 4 images per tweet. Images are uploaded via the X media upload API and attached to the post.
post_type: textPlain text posts up to 280 characters (or 25,000 for X Premium). Supports hashtags, mentions, and URLs.
x_reply_settingsSet to 'following' so only accounts you follow can reply, or 'mentionedUsers' to restrict replies to tagged users only.
x_alt_textAdd descriptive alt text to images for screen reader accessibility — required for brand accessibility compliance.
Tweet with reply restrictions
Schedule a tweet with an image, accessible alt text, and restricted replies — only users you mention can respond.
# Post to X with reply restrictions
curl -X POST \
https://api.codivupload.com/v1/posts \
-H 'Authorization: Bearer YOUR_API_KEY' \
-d '{
"profile_name": "my-brand",
"platforms": ["x"],
"post_type": "image",
"description": "Announcing our Spring 2026 collection",
"media_urls": ["https://cdn.example.com/spring-drop.jpg"],
"x_reply_settings": "mentionedUsers",
"x_alt_text": "Model in floral dress at rooftop" }'Getting started with X
X requires a Bring Your Own Keys (BYOK) setup — you connect your own X Developer App rather than using a shared one. This takes about 5 minutes the first time, and it means your rate limits and API costs are entirely under your control.
Create a Developer App
Go to developer.x.com, create a project and app, then enable OAuth 2.0 with read and write permissions. Copy your Client ID and Client Secret. The free tier of the X API is sufficient for posting — no paid plan required.
Enter keys in CodivUpload
Open the Integrations tab in your CodivUpload dashboard, click Connect X, and paste your Client ID and Client Secret. CodivUpload encrypts these credentials with AES-256-GCM before storage — they are never exposed in plaintext after submission.
Authorize and post
After entering your keys, CodivUpload redirects you to X for OAuth authorization. Once approved, you can immediately start composing and scheduling posts from the dashboard or via the API. Token refresh is handled automatically.
Why X requires Bring Your Own Keys (BYOK)
Unlike most platforms, X charges API access per-app rather than per-user. A shared app serving thousands of users would quickly hit rate limits (1,500 posts per 15 minutes at the free tier) and incur significant costs. With BYOK, each CodivUpload user connects their own X Developer App, which means:
- Your rate limits are isolated — other CodivUpload users cannot affect your posting capacity
- You control your own API tier — upgrade to Basic ($100/mo) or Pro ($5,000/mo) if you need higher limits
- Full transparency — you can monitor your own usage in the X Developer Portal
X content tips
X rewards brevity, timeliness, and visual content. Here are the patterns that consistently drive engagement on the platform.
280 characters, every word counts
Standard accounts get 280 characters. X Premium extends this to 25,000, but shorter posts still outperform long ones in engagement. Front-load your key message — many users scroll fast and only read the first line. For longer content, use threads from the dashboard.
Always add alt text to images
Alt text makes your images accessible to screen reader users and improves searchability. Use the x_alt_text parameter to add descriptive text. Keep descriptions specific: “Bar chart showing Q1 revenue at $2.4M” is better than “chart”.
Best times: Mon-Fri, 8-10 AM
X engagement peaks on weekday mornings between 8:00 AM and 10:00 AM in your target audience's time zone. A secondary peak occurs around lunch (12-1 PM). Use CodivUpload's scheduled_date parameter to hit these windows consistently across time zones.
Threads for long-form storytelling
Threads (reply chains of 3-10 tweets) are one of the highest-engagement formats on X. They let you tell a story, share a tutorial, or break down a complex topic. Thread creation is available from the CodivUpload dashboard — the API supports single-post publishing for now.
Schedule a video tweet
Native video on X plays inline in the timeline, driving significantly higher engagement than external video links. CodivUpload uploads the video via X's chunked media upload API and attaches it to the tweet automatically.
All X-specific parameters use the x_ prefix. See the full API reference for every supported parameter.
# Schedule a video tweet on X
curl -X POST \
https://api.codivupload.com/v1/posts \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"profile_name": "my-brand",
"platforms": ["x"],
"post_type": "video",
"description": "60-second product demo",
"media_urls": [
"https://cdn.example.com/demo.mp4"
],
"x_reply_settings": "following",
"scheduled_date": "2026-04-07T09:00:00Z" }'Related guides
X BYOK setup guide
Step-by-step walkthrough for creating your X Developer App, enabling OAuth 2.0, and connecting it to CodivUpload in under 5 minutes.
Cross-post to 12 platforms
Learn how to compose a single post and distribute it across X, Facebook, Instagram, TikTok, YouTube, LinkedIn, Threads, Bluesky, and Pinterest.
Full API reference
Complete documentation for every endpoint, parameter, and response code including X-specific fields like x_reply_settings and x_alt_text.
Start posting to X for free
2 profiles, 10 uploads/mo on the free plan. Upgrade for unlimited.