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

# Manage Posts on the X API v2

> Create and delete Posts on behalf of authenticated users with the X API v2 standard tier manage Posts endpoints, including request and response details.

export const Button = ({href, children}) => {
  return <div className="not-prose group">
    <a href={href}>
      <button className="flex items-center space-x-2.5 py-1 px-4 bg-primary-dark dark:bg-white text-white dark:text-gray-950 rounded-full group-hover:opacity-[0.9] font-medium">
        <span>
          {children}
        </span>
        <svg width="3" height="24" viewBox="0 -9 3 24" class="h-6 rotate-0 overflow-visible"><path d="M0 0L3 3L0 6" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path></svg>
      </button>
    </a>
  </div>;
};

The Manage Posts endpoints let you create and delete Posts on behalf of authenticated users. Build applications that post content, create threads, or manage user Posts.

## Overview

<CardGroup cols={2}>
  <Card title="Create Post" icon="pen">
    Publish a new Post
  </Card>

  <Card title="Delete Post" icon="trash">
    Delete an existing Post
  </Card>

  <Card title="Reply" icon="reply">
    Reply to another Post
  </Card>

  <Card title="Quote" icon="quote-right">
    Quote another Post
  </Card>
</CardGroup>

***

## Endpoints

| Method | Endpoint                                    | Description       |
| :----- | :------------------------------------------ | :---------------- |
| POST   | [`/2/tweets`](/x-api/posts/create-post)     | Create a new Post |
| DELETE | [`/2/tweets/:id`](/x-api/posts/delete-post) | Delete a Post     |

***

## Creating Posts

### Basic Post

```bash theme={null}
curl -X POST "https://api.x.com/2/tweets" \
  -H "Authorization: Bearer $USER_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"text": "Hello from the API!"}'
```

<Note>
  **Self-serve customers:** Posts created via the API are limited to a maximum of 1 cashtag per post.
</Note>

### Reply to a Post

```bash theme={null}
curl -X POST "https://api.x.com/2/tweets" \
  -H "Authorization: Bearer $USER_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "This is a reply!",
    "reply": {
      "in_reply_to_tweet_id": "1234567890"
    }
  }'
```

<Note>
  **Self-serve customers:** Replies are only permitted if the original post's author has explicitly summoned the replying account by @mentioning them or quoting one of their posts.
</Note>

### Quote a Post

```bash theme={null}
curl -X POST "https://api.x.com/2/tweets" \
  -H "Authorization: Bearer $USER_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Check this out!",
    "quote_tweet_id": "1234567890"
  }'
```

### Post with media

```bash theme={null}
curl -X POST "https://api.x.com/2/tweets" \
  -H "Authorization: Bearer $USER_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Photo of the day",
    "media": {
      "media_ids": ["1234567890123456789"]
    }
  }'
```

<Note>
  Upload media first using the [Media Upload endpoint](/x-api/media/quickstart/media-upload-chunked), then reference the `media_id` in your Post.
</Note>

### Post with poll

```bash theme={null}
curl -X POST "https://api.x.com/2/tweets" \
  -H "Authorization: Bearer $USER_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "What is your favorite color?",
    "poll": {
      "options": ["Red", "Blue", "Green", "Yellow"],
      "duration_minutes": 1440
    }
  }'
```

### Post with paid partnership

Use the `paid_partnership` field when creating a Post to indicate it is a paid partnership (i.e., the author is disclosing that the Post contains paid promotion). When set to `true`, the Post will be labeled as a paid promotion.

```bash theme={null}
curl -X POST "https://api.x.com/2/tweets" \
  -H "Authorization: Bearer $USER_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Excited to partner with Acme on their latest launch!",
    "paid_partnership": true
  }'
```

To retrieve the value on existing Posts (including your own), request it via the `tweet.fields` parameter:

```bash theme={null}
curl "https://api.x.com/2/tweets/1234567890?tweet.fields=paid_partnership,created_at" \
  -H "Authorization: Bearer $TOKEN"
```

***

## Deleting Posts

```bash theme={null}
curl -X DELETE "https://api.x.com/2/tweets/1234567890" \
  -H "Authorization: Bearer $USER_ACCESS_TOKEN"
```

<Warning>
  You can only delete Posts authored by the authenticated user.
</Warning>

***

## Getting started

<Note>
  **Prerequisites**

  * An approved [developer account](https://developer.x.com/en/portal/petition/essential/basic-info)
  * A [Project and App](/resources/fundamentals/developer-apps) in the Developer Console
  * User Access Tokens via [OAuth 2.0 PKCE](/resources/fundamentals/authentication#oauth-2-0-authorization-code-flow-with-pkce-2) or [3-legged OAuth](/resources/fundamentals/authentication#obtaining-access-tokens-using-3-legged-oauth-flow)
</Note>

<CardGroup cols={2}>
  <Card title="Quickstart" icon="rocket" href="/x-api/posts/manage-tweets/quickstart">
    Create your first Post
  </Card>

  <Card title="Integration guide" icon="book" href="/x-api/posts/manage-tweets/integrate">
    Key concepts and best practices
  </Card>

  <Card title="Media upload" icon="image" href="/x-api/media/quickstart/media-upload-chunked">
    Upload media for Posts
  </Card>

  <Card title="API Reference" icon="code" href="/x-api/posts/creation-of-a-post">
    Full endpoint documentation
  </Card>
</CardGroup>
