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

# Administrar Publicaciones

> Crear y eliminar Publicaciones en nombre de usuarios autenticados

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>;
};

Los endpoints de Manage Posts te permiten crear y eliminar Publicaciones en nombre de los usuarios autenticados. Crea aplicaciones que publiquen contenido, creen hilos o gestionen Publicaciones de usuarios.

<div id="overview">
  ## Descripción general
</div>

<CardGroup cols={2}>
  <Card title="Crear Publicación" icon="pen">
    Publicar una nueva publicación
  </Card>

  <Card title="Eliminar Publicación" icon="trash">
    Eliminar una publicación existente
  </Card>

  <Card title="Responder" icon="reply">
    Responder a otra publicación
  </Card>

  <Card title="Citar" icon="quote-right">
    Citar otra publicación
  </Card>
</CardGroup>

***

<div id="endpoints">
  ## Endpoints
</div>

| Method | Endpoint                                       | Description                 |
| :----- | :--------------------------------------------- | :-------------------------- |
| POST   | [`/2/tweets`](/es/x-api/posts/create-post)     | Crear una nueva publicación |
| DELETE | [`/2/tweets/:id`](/es/x-api/posts/delete-post) | Eliminar una publicación    |

***

<div id="creating-posts">
  ## Crear Publicaciones
</div>

<div id="basic-post">
  ### Publicación básica
</div>

```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!"}'
```

<div id="reply-to-a-post">
  ### Responder a una publicación
</div>

```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"
    }
  }'
```

<div id="quote-a-post">
  ### Citar una Publicación
</div>

```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"
  }'
```

<div id="post-with-media">
  ### Publicación con contenido multimedia
</div>

```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>
  Primero carga el contenido multimedia usando el [endpoint de Media Upload](/es/x-api/media/quickstart/media-upload-chunked) y luego haz referencia al `media_id` en tu Publicación.
</Note>

<div id="post-with-poll">
  ### Publicación con encuesta
</div>

```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
    }
  }'
```

***

<div id="deleting-posts">
  ## Eliminar Publicaciones
</div>

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

<Warning>
  Solo puedes eliminar las Publicaciones creadas por el usuario autenticado.
</Warning>

***

<div id="getting-started">
  ## Primeros pasos
</div>

<Note>
  **Requisitos previos**

  * Una [cuenta de desarrollador](https://developer.x.com/en/portal/petition/essential/basic-info) aprobada
  * Un Proyecto y una App en la [Consola de desarrollador](/es/resources/fundamentals/developer-apps)
  * Tokens de acceso de usuario mediante [OAuth 2.0 PKCE](/es/resources/fundamentals/authentication#oauth-2-0-authorization-code-flow-with-pkce-2) o [OAuth con flujo de 3 partes](/es/resources/fundamentals/authentication#obtaining-access-tokens-using-3-legged-oauth-flow)
</Note>

<CardGroup cols={2}>
  <Card title="Inicio rápido" icon="rocket" href="/es/x-api/posts/manage-tweets/quickstart">
    Crea tu primera Publicación
  </Card>

  <Card title="Guía de integración" icon="book" href="/es/x-api/posts/manage-tweets/integrate">
    Conceptos clave y buenas prácticas
  </Card>

  <Card title="Carga de contenido multimedia" icon="image" href="/es/x-api/media/quickstart/media-upload-chunked">
    Sube contenido multimedia para Publicaciones
  </Card>

  <Card title="Referencia de la API" icon="code" href="/es/x-api/posts/creation-of-a-post">
    Documentación completa del endpoint
  </Card>
</CardGroup>
