> ## 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.

# Retweets

> Los endpoints de Retweets te permiten retweetear y deshacer retweets, ver quién retweeteó un Post y obtener. Referencia del nivel estándar de X API v2 sobre retweets.

export const Button = ({href, children}) => {
  return <div className="not-prose">
    <a href={href}>
      <button className="x-btn">
        <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 Retweets te permiten retweetear y deshacer retweets, ver quién retweeteó un Post y obtener los reposts de tus propios Posts.

## Descripción general

<CardGroup cols={2}>
  <Card title="Retweet" icon="retweet">
    Retweetea un Post en nombre de un usuario
  </Card>

  <Card title="Deshacer retweet" icon="xmark">
    Elimina un retweet
  </Card>

  <Card title="Usuarios que retweetean" icon="https://mintcdn.com/x-preview/SxzTbJaLjs3MidH1/icons/xds/icon-people.svg?fit=max&auto=format&n=SxzTbJaLjs3MidH1&q=85&s=9d5f3f82edcd2a4070364193436e7980" width="24" height="24" data-path="icons/xds/icon-people.svg">
    Ve quién retweeteó un Post
  </Card>

  <Card title="Reposts de mí" icon="repeat">
    Obtén los reposts de tus propios Posts
  </Card>
</CardGroup>

***

## Endpoints

### Consulta de Retweets

| Method | Endpoint                                                      | Description                                            |
| :----- | :------------------------------------------------------------ | :----------------------------------------------------- |
| GET    | [`/2/tweets/:id/retweeted_by`](/x-api/posts/get-reposted-by)  | Obtén los usuarios que retweetearon un Post            |
| GET    | [`/2/tweets/:id/quote_tweets`](/x-api/posts/get-quoted-posts) | Obtén los quote Posts de un Post                       |
| GET    | [`/2/users/reposts_of_me`](/x-api/users/get-reposts-of-me)    | Obtén los reposts de los Posts del usuario autenticado |

### Gestionar retweets

| Method | Endpoint                                                        | Description         |
| :----- | :-------------------------------------------------------------- | :------------------ |
| POST   | [`/2/users/:id/retweets`](/x-api/users/repost-post)             | Retweetear un Post  |
| DELETE | [`/2/users/:id/retweets/:tweet_id`](/x-api/users/unrepost-post) | Deshacer un retweet |

***

## Ejemplo: obtener los usuarios que retweetean

```bash theme={null}
curl "https://api.x.com/2/tweets/1234567890/retweeted_by?\
user.fields=username,verified" \
  -H "Authorization: Bearer $BEARER_TOKEN"
```

## Ejemplo: retweetear un Post

```bash theme={null}
curl -X POST "https://api.x.com/2/users/123456789/retweets" \
  -H "Authorization: Bearer $USER_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"tweet_id": "1234567890"}'
```

***

## Cómo empezar

<Note>
  **Requisitos previos**

  * Una [cuenta de desarrollador](https://developer.x.com/en/portal/petition/essential/basic-info) aprobada
  * Un [Project y App](/resources/fundamentals/developer-apps) en la Developer Console
  * Las [keys y tokens](/resources/fundamentals/authentication) de tu App
</Note>

<CardGroup cols={2}>
  <Card title="Quickstart de consulta" icon="retweet" href="/x-api/posts/retweets/quickstart/retweets-lookup">
    Obtén los retweets de un Post
  </Card>

  <Card title="Quickstart de administración" icon="plus" href="/x-api/posts/retweets/quickstart/manage-retweets">
    Retweetea y deshaz retweets
  </Card>

  <Card title="Reposts de mí" icon="repeat" href="/x-api/posts/retweets/quickstart/retweets-of-me">
    Obtén los reposts de tus Posts
  </Card>

  <Card title="Referencia de la API" icon="https://mintcdn.com/x-preview/ygI6sSJPehlc0qNT/icons/xds/icon-code.svg?fit=max&auto=format&n=ygI6sSJPehlc0qNT&q=85&s=488e23401b19225b89acc0136d242219" href="/x-api/posts/get-reposted-by" width="24" height="24" data-path="icons/xds/icon-code.svg">
    Documentación completa del endpoint
  </Card>
</CardGroup>
