Skip to content

Events

Repost

View as MarkdownPlain text source(opens in new tab)

Fires when a tracked user reposts another post. Carries the original post's content with the tracked user identified separately.

A repost event fires when a tracked user reposts another post. The post content carried in the event is the original post, and the tracked user appears in repostedBy.

Fields

FieldTypeNotes
type"repost"
idstringX post ID of the original post
urlstringCanonical URL of the original post
authorAuthorAuthor of the original post
repostedByAuthorThe tracked user who reposted
textstringText of the original post
createdAtMsnumberUnix milliseconds, truncated to the second. From the original post’s creation time
latencyMsnumber | nullReal wall-clock from the original post’s creation to delivery of this event
mediaMediaRef[]Media on the original post
articleArticleRef | nullArticle card on the original post
pollPollRef | nullPoll on the original post
symbolsSymbolRef[]Cashtags on the original post

Example

Here’s a real repost event: @elonmusk reposting a post by @SawyerMerritt. Author objects are shortened for the preview; the wire ships every Author field.

{
  "type": "repost",
  "id": "2062534741706817842",
  "url": "https://x.com/sawyermerritt/status/2062534741706817842",
  "author": {
    "id": "243013409",
    "username": "sawyermerritt",
    "displayName": "Sawyer Merritt",
    "verified": true,
    "verifiedType": "blue"
  },
  "repostedBy": {
    "id": "44196397",
    "username": "elonmusk",
    "displayName": "Elon Musk",
    "verified": true,
    "verifiedType": "blue"
  },
  "text": "Fidelity has announced that it is making the SpaceX IPO available to any customer with a retail brokerage account with $2,000 or more in the account (down from up to $500k before)...",
  "createdAtMs": 1780581577000,
  "latencyMs": 64,
  "media": [
    { "type": "photo", "url": "https://pbs.twimg.com/media/HJ-YET5XcAAJUKb.jpg" }
  ],
  "article": null,
  "poll": null,
  "symbols": []
}

author vs repostedBy

This is the key gotcha:

  • author is the original poster. Their post is what appears in text, media, and the other content fields.
  • repostedBy is the tracked user who reposted.

It mirrors how X renders a repost in the timeline: the original post’s content with a small “X reposted” attribution above. The post-content fields (text, media, createdAtMs) line up with the original post; repostedBy is the new actor.

If the tracked user is @elonmusk, repostedBy.username will be "elonmusk" in every repost event their account triggers.

What’s not delivered

X’s API does not distinguish “undo repost” from “original post was deleted”; both surface as the same error. As a result, there is no deleted variant for repost. If the original post is deleted, you’ll receive a deleted event for the original post (with the original author’s previous events), not a repost-specific delete.

  • post: the user posted an original
  • quote: the user quoted a post (different from repost; quote adds the user’s own text)