> ## Documentation Index
> Fetch the complete documentation index at: https://docs.twitterapi.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Post & Action V2 overview

> Act as an X (Twitter) account through the API: post, like, retweet, follow, pin, mute, block, upload media and update the profile.

The V2 action endpoints let you act as an X account you log in with: post and delete tweets, like, retweet, follow, pin, mute, block, bookmark, send DMs, upload media and update the profile.

## How it works

1. **Log in once** with [`/twitter/user_login_v2`](https://docs.twitterapi.io/api-reference/endpoint/user_login_v2) (email, username, password and 2FA secret). It returns `login_cookies`. Enable 2FA on the account first. Without it, the returned cookies may be faulty and posting can fail.
2. **Call any V2 endpoint** with your `x-api-key` header and a JSON body that contains:
   * `login_cookies`: the value from step 1.
   * `proxy`: a high-quality residential proxy, for example `http://username:password@ip:port`. Avoid free proxies.
   * The target, usually `tweet_id` or `user_id`.
3. **Check `status`** in the response. It is `success` or `error`. On `error`, `message` carries the reason X gave, and when available also `x_status` (the HTTP status from X) and `code` (X's error code).

`login_cookies` from `user_login_v2` only work with endpoints that end in `_v2`.

## Endpoints

| Action | Endpoint | Credits per call |
| - | - | - |
| Log in | [user\_login\_v2](https://docs.twitterapi.io/api-reference/endpoint/user_login_v2.md) | 10,000 |
| Post or reply | [create\_tweet\_v2](https://docs.twitterapi.io/api-reference/endpoint/create_tweet_v2.md) | 200 |
| Delete a tweet | [delete\_tweet\_v2](https://docs.twitterapi.io/api-reference/endpoint/delete_tweet_v2.md) | 200 |
| Like / unlike | [like\_tweet\_v2](https://docs.twitterapi.io/api-reference/endpoint/like_tweet_v2.md), [unlike\_tweet\_v2](https://docs.twitterapi.io/api-reference/endpoint/unlike_tweet_v2.md) | 200 |
| Retweet / undo retweet | [retweet\_tweet\_v2](https://docs.twitterapi.io/api-reference/endpoint/retweet_tweet_v2.md), [unretweet\_tweet\_v2](https://docs.twitterapi.io/api-reference/endpoint/unretweet_tweet_v2.md) | 200 |
| Pin / unpin your own tweet | [pin\_tweet\_v2](https://docs.twitterapi.io/api-reference/endpoint/pin_tweet_v2.md), [unpin\_tweet\_v2](https://docs.twitterapi.io/api-reference/endpoint/unpin_tweet_v2.md) | 200 |
| Bookmark / remove bookmark | [bookmark\_tweet\_v2](https://docs.twitterapi.io/api-reference/endpoint/bookmark_tweet_v2.md), [unbookmark\_tweet\_v2](https://docs.twitterapi.io/api-reference/endpoint/unbookmark_tweet_v2.md) | 200 |
| List your bookmarks | [bookmarks\_v2](https://docs.twitterapi.io/api-reference/endpoint/bookmarks_v2.md) | Per tweet returned, like other tweet endpoints |
| Follow / unfollow | [follow\_user\_v2](https://docs.twitterapi.io/api-reference/endpoint/follow_user_v2.md), [unfollow\_user\_v2](https://docs.twitterapi.io/api-reference/endpoint/unfollow_user_v2.md) | 200 |
| Mute / unmute | [mute\_user\_v2](https://docs.twitterapi.io/api-reference/endpoint/mute_user_v2.md), [unmute\_user\_v2](https://docs.twitterapi.io/api-reference/endpoint/unmute_user_v2.md) | 200 |
| Block / unblock | [block\_user\_v2](https://docs.twitterapi.io/api-reference/endpoint/block_user_v2.md), [unblock\_user\_v2](https://docs.twitterapi.io/api-reference/endpoint/unblock_user_v2.md) | 200 |
| Send a DM (only to users who accept DMs) | [send\_dm\_v2](https://docs.twitterapi.io/api-reference/endpoint/send_dm_v2.md) | 200 |
| Upload an image or video | [upload\_media\_v2](https://docs.twitterapi.io/api-reference/endpoint/upload_media_v2.md) | 300 |
| Update profile, avatar or banner | [update\_profile\_v2](https://docs.twitterapi.io/api-reference/endpoint/update_profile_v2.md), [update\_avatar\_v2](https://docs.twitterapi.io/api-reference/endpoint/update_avatar_v2.md), [update\_banner\_v2](https://docs.twitterapi.io/api-reference/endpoint/update_banner_v2.md) | 200 |

**Billing:** a call is charged when it returns HTTP 200, including when X rejects the action and `status` is `error`. Requests rejected with HTTP 400 for missing or invalid parameters are not charged.

## Behaviour worth knowing

* **Already done counts as success.** Liking an already liked tweet, retweeting an already retweeted tweet, or following someone you already follow (or have a pending request to) returns `success`.
* **Undo actions are no-ops when nothing is there.** Undoing a retweet you never made returns `success`, because X treats it as a no-op.
* **Pin works only on your own tweets.** Pinning someone else's tweet returns an error.
* **Block removes follows both ways**, and unblocking doesn't restore them.
* **Not found:** acting on a user or tweet that doesn't exist or was suspended returns an error that says so.

## What's new (October 2026)

* New endpoints: unretweet, pin, unpin, mute, unmute, block and unblock.
* More reliable media upload.
* Unfollow and profile, avatar and banner updates now work for accounts logged in with `user_login_v2`.
* Like, retweet and follow now return X's real reason when X rejects the action, instead of reporting success.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.