Create Community Post With Media
POST
/tw-v2/interaction/create-community-post-with-mediaDescription
Post a new tweet with media attachments to a specific Twitter/X community. Supports text content up to 280 characters for non-premium users (or 25,000 for premium users) and up to 4 images or 1 video.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
| authToken | string | required | Twitter authentication token (auth_token cookie value) |
| text | string | required | The text content of the tweet (max 280 characters for non-premium, 25,000 for premium) |
| communityId | string | required | The ID of the community to post to (numeric only) |
| media | array | required | Array of media URLs to attach to the tweet |
| proxy | string | required | Proxy in format 'hostname:port@username:password' (required for better success rates) |
| disableLinkPreview | boolean | optional | When true, disables link preview cards for tweets containing URLs (defaults to false) |
Code Examples
const body = {
authToken: 'YOUR_AUTH_TOKEN',
text: 'Hello community with media!',
communityId: '1234567890',
media: [{"url":"https://example.com/image.jpg"}],
proxy: 'proxy.example.com:8080@user:pass'
};
const response = await fetch('https://api.tweetapi.com/tw-v2/interaction/create-community-post-with-media', {
method: 'POST',
headers: {
'X-API-Key': 'YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify(body)
});
const data = await response.json();
console.log(data);
Response
Success Response (201 Created)
201
{
"data": {
"id": "1879443195093647360",
"action": "create_community_post",
"timestamp": "2025-10-05T13:57:08.672Z",
"success": true,
"metadata": {
"tweet_id": "1879443195093647360",
"author_username": "username",
"text": "Hello community with media!",
"created_at": "Sun Oct 05 13:57:08 +0000 2025",
"url": "https://twitter.com/username/status/1879443195093647360"
}
}
}Error Responses
| Status Code | Description |
|---|---|
| 400 | Bad Request - Invalid parameters, community ID, or media format |
| 401 | Unauthorized - Invalid or missing API key |
| 403 | Forbidden - Account not authorized to post in this community |
| 404 | Not Found - Community doesn't exist |
| 429 | Too Many Requests - Rate limit exceeded |
| 500 | Internal Server Error - Server error |
Notes
- Community ID must be numeric only
- Supports up to 4 media items per tweet
- All timestamps are in ISO 8601 format
- IDs are Twitter snowflake IDs (strings)
- Tweets longer than 280 characters automatically use premium note tweet format
API Playground
POST
/tw-v2/interaction/create-community-post-with-mediaSensitive Credentials Required
Requires your Twitter authToken. Use a test account.
Press ⌘ + Enter to execute
curl -X POST "https://api.tweetapi.com/tw-v2/interaction/create-community-post-with-media" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response
Click "Try It!" to see the response