Skip to content

Create Post

POST/tw-v2/interaction/create-post

1 API unit per call · How billing works

Description

Post a new tweet to the platform. Supports text content up to 280 characters for non-premium users, or 25,000 characters for premium users.

Polls

To post a poll, add a poll object with 2 to 4 choices and a durationMinutes. Each choice is 1 to 25 characters; spaces around it are trimmed. The poll stays open from 5 minutes to 7 days (10080 minutes). A post with a poll can't be longer than 280 characters, and poll can't be combined with disableLinkPreview: true. It is still one request that costs one API unit and answers 201. To vote in a poll, use /tw-v2/interaction/vote-poll.

Request Body

ParameterDescription
authTokenstringrequiredAccount authentication token (auth_token cookie value)
textstringrequiredThe text content of the tweet (max 280 characters for non-premium, 25,000 for premium)
proxystringrequiredProxy in format 'hostname:port@username:password'
disableLinkPreviewbooleanoptionalWhen true, disables link preview cards for tweets containing URLs (defaults to false)
replyOptionobjectoptionalOptional reply controls. Use mode: everyone, accounts_you_follow, accounts_you_follow_and_followed, mentioned_accounts, verified_accounts, or regions.
pollobjectoptionalOptional poll: 2 to 4 choices of 1 to 25 characters, open for 5 to 10080 minutes (7 days). Posts with a poll are limited to 280 characters.

Reply Options

Use replyOption to control who can reply to the post.

  • everyone: everyone can reply, same as omitting replyOption
  • accounts_you_follow: only accounts you follow can reply
  • accounts_you_follow_and_followed: accounts you follow and accounts they follow can reply
  • mentioned_accounts: only accounts mentioned in the post can reply
  • verified_accounts: only verified accounts can reply
  • regions: only accounts from selected region buckets can reply

For regions, include a regions array with one or more of: NAM, EAS, AFR, SEA, SAM, EUR, AUS, SAS, WES, CAS.

Poll Example

This body posts a poll with two choices that stays open for one day:

{
  "authToken": "YOUR_AUTH_TOKEN",
  "proxy": "proxy.example.com:8080@username:password",
  "text": "Which option do you prefer?",
  "poll": {
    "choices": ["Option A", "Option B"],
    "durationMinutes": 1440
  }
}
  • choices: 2 to 4 strings of 1 to 25 characters, in the order x.com shows them
  • durationMinutes: a whole number from 5 to 10080 (7 days)

Code Examples

const body = {
  authToken: 'YOUR_AUTH_TOKEN',
  proxy: 'proxy.example.com:8080@proxyUser:proxyPass',
  text: 'Hello, world!',
  replyOption: {
    mode: 'mentioned_accounts'
  }
};

const response = await fetch('https://api.tweetapi.com/tw-v2/interaction/create-post', {
  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": "1001316498357235765",
    "action": "create_tweet",
    "timestamp": "2025-10-02T09:18:23.079Z",
    "success": true,
    "metadata": {
      "tweet_id": "2001123465058274004",
      "author_username": "username",
      "text": "Sample post text 25423 for documentation.",
      "created_at": "Thu Oct 02 09:18:22 +0000 2025",
      "url": "https://example.com/link-94089/profile-41921/username/status/2001524548149483403"
    }
  }
}