Objects

The shapes referenced above, field by field. Types are informal: string[] is an array of strings, A | null may be absent.

Envelope

Present on every event, on the stream, in GET /v1/events and in webhook deliveries.

FieldTypeMeaning
vintEnvelope version. 1 today
tstringEvent type, from the table below
opcreate | update | deletecreate, update (enrichment of the same id) or delete
idstringStable identity. Deduplicate on this
tsint (ms)When it happened on X, ms since the epoch. X does not say when a profile changed, a follow or unfollow happened, a verified follower arrived or a post was deleted: for those events it is when we detected it
sidstringStream position for replay; present on the stream and in history
target.idstringNumeric X id of the monitored account (for search.match, of the post's author)
target.screen_namestringHandle of the monitored account
target.namestringThe account's display name
dobjectType-specific payload

Tweet payload

The d of tweet.create, tweet.reply, tweet.retweet and tweet.quote, and the base of search.match.

FieldTypeMeaning
tweet_idstringThe post's id, as a string
kindtweet | reply | retweet | quoteWhat kind of post it is
textstringFull text (long posts included)
langstring | nullLanguage X detected
authorUserThe account that posted it, as a full User — the same object as the author of a search.match: handle, name, bio, avatar, banner, counts, verification, location, link and join date. On a thin first frame it is the account as last read; the update carries it as read with the post
reply_toBrief+ | nullFor replies: the post being replied to — a Brief plus screen_name, tweet_id and user_id of its author
retweet_ofBrief | nullFor reposts: the original post
quotedBrief | nullFor quotes: the quoted post
mediastring[]Plain image URLs, one per media item
media_itemsMedia[]Every media item with type, video variants and dimensions
urlsstring[]Expanded links in the post
articleArticle | nullFor posts that link an X Article: the article
counts{reply, rt, like, quote, bookmark}Reply, repost, like, quote and bookmark counts at the time we read it
viewsint | nullView count, when X exposes it
urlstringCanonical link to the post
fullboolfalse on a first, thin create frame; true once the event carries the whole post
kind_finalbooltrue when kind is settled. false only on a thin first frame whose kind is tweet: the post may still turn out to be a quote, and the update on the same id settles it
kind_wastweet | null (update only)Only on the update that settles a post's kind, and only when the first frame said otherwise: the kind that frame had (tweet for a post that turned out to be a quote)
edit_ofBrief | nullOn tweet.edit: the version this one replaces (its id, and its text and author when we had it)

Brief

A compact post embedded in another event: the original of a repost, the quoted post, the post being replied to, or a pinned post.

FieldTypeMeaning
idstringPost id
userstringAuthor's handle
namestringAuthor's display name
user_idstringAuthor's numeric id
textstringFull text
mediastring[]Plain image URLs
media_itemsMedia[]Media items with type and video variants
created_msintWhen it was posted, ms since the epoch
urlstringLink to the post

Media

One picture, video or GIF. Videos carry the highest-bitrate MP4 we could find; url is the poster frame.

FieldTypeMeaning
typephoto | video | animated_gifKind of media
urlstringImage URL, or the poster frame of a video
expanded_urlstringThe post's media page on X
video_urlstring (video)MP4 URL, highest bitrate available
bitrateint (video)Bitrate of that MP4
duration_msint (video)Video length
widthintOriginal width in pixels
heightintOriginal height in pixels

Article

An X Article (long-form post) that a post links to. The first frame carries title and preview; text is null until the update on the same id brings the full article.

FieldTypeMeaning
idstringArticle id
titlestringTitle
previewstringThe opening lines of the article
textstring | nullFull text, paragraphs separated by blank lines; null in the first frame
coverstring | nullCover image URL
imagesstring[]Images inside the article
urlstringLink to the article on X

Delete payload

The d of tweet.delete. Only ever sent for a post we had seen and that is now gone. Its ts is when the deletion was detected; the post's own time is in its earlier create frame.

FieldTypeMeaning
tweet_idstringThe deleted post's id
urlstringWhere it used to be

Profile change payload

The d of every profile.* event. op is update for these.

FieldTypeMeaning
fieldstringWhich profile field changed; the same word as after profile. in the type
oldanyThe previous value
newanyThe new value
tweetBrief (pinned only)For profile.pinned: the newly pinned post
old_tweetBrief (pinned only)For profile.pinned: the previously pinned post, if we had it

Follow payload

The d of follow.add, follow.remove and followers.verified.add.

FieldTypeMeaning
userUserThe other account, as a full User

Account status payload

The d of account.status. A status is one of active, protected (posts visible to approved followers only), suspended (by X) or unavailable (deactivated, deleted or otherwise not visible). ts is when we detected the change.

FieldTypeMeaning
oldactive | protected | suspended | unavailableThe status before
newactive | protected | suspended | unavailableThe status now
reasonstring | nullX's own wording, when it gives one (for example Suspended)

User

A full account profile, as embedded in follow events and in search.match.

FieldTypeMeaning
idstringNumeric id
screen_namestringHandle
namestringDisplay name
biostringBio text
avatarstringAvatar image URL
bannerstring | nullBanner image URL
followersintFollower count
followingintFollowing count
tweetsintPost count
locationstringFree-text location
urlstring | nullExpanded profile link
verifiedboolHas a verification badge
verified_typestring | nullblue, business, government or null
protectedboolPosts are visible to approved followers only
created_atstring (ISO-8601)When the account was created
categorystring | nullProfessional category, if the account set one

The d of search.match: a Tweet payload plus three fields about the match. The envelope's target is the post's author, who need not be one of your targets.

FieldTypeMeaning
keyword.idintId of the keyword that matched
keyword.querystringIts query
keyword.labelstring | nullIts label, if you set one
authorUserThe author's full profile
author_is_targetbooltrue if the author is also an account monitored on this system
…TweetPayloadEvery field of the Tweet payload

Target

One account you monitor, as this key sees it.

FieldTypeMeaning
idstringNumeric X id. It never changes: key your records on it
screen_namestringThe current handle. It can change; profile.screen_name tells you when
namestringDisplay name
previous_screen_namesstring[]Handles the account had before, most recent first. Each still names it in /v1/monitor/targets/{target}
push_readyboolEvery event type you subscribe to for this account is being collected in real time. false does not hold anything back: the account is monitored from the moment it is subscribed and its events are delivered as they are collected, so do not wait for this flag before handling them
last_push_atdatetime | nullLast time a real-time event arrived for it
last_poll_atdatetime | nullLast time its timeline was read
state"subscribed"Always subscribed here; pending resolutions have their own shape
event_typesstring[]The event types delivered for this account; empty means every type your key allows
event_types_allbooltrue when event_types is empty

Pending target

What GET /v1/monitor/targets/{target} returns while an account you asked for is still being resolved.

FieldTypeMeaning
screen_namestring | nullThe handle you asked for, if you asked by handle
user_idstring | nullThe user id you asked for, if you asked by id
state"queued"Always queued
queued_atint (unix s)When you asked
event_typesstring[]The event types chosen for it, applied once it is resolved
event_types_allbooltrue when event_types is empty

Keyword

One query you watch across X search.

FieldTypeMeaning
idintNumeric id; use it to delete
querystringThe query, in X search syntax
labelstring | nullYour label, echoed in every match
activeboolfalse if the operator paused it
hitsintMatches delivered so far
last_hit_atdatetime | nullLast match
last_run_atdatetime | nullLast search

Account

What GET /v1/account returns about the key you used.

FieldTypeMeaning
namestringThe key's name, as issued
planstringPlan preset
key_idstringShort id of the key, safe to quote in support requests
scopesstring[]Scopes the key holds
event_typesstring[]Key-wide event-type allow-list, managed by us; empty means all
event_types_allbooltrue when the filter is empty
limits.max_targetsintMonitored-account cap
limits.max_connsintConcurrent WebSocket cap
limits.max_keywordsintKeyword cap
limits.requests_per_minuteintRequest budget per minute
usage.targetsintAccounts currently monitored
usage.keywordsintKeywords currently watched

Webhook

What GET /v1/account/webhook returns.

FieldTypeMeaning
urlstring | nullThe registered endpoint
stats{ok, http_…}Delivery counters: ok, and one http_<code> per failure status seen

Meta

Paging information beside every list.

FieldTypeMeaning
countintItems on this page
has_moreboolWhether another page exists
next_cursorstring | nullPass back as ?cursor=; null at the end

Batch result

One entry per item sent to POST /v1/monitor/targets:batch, in the same order.

FieldTypeMeaning
indexintPosition of the item in your request
statusintThe HTTP status the single-item endpoint would have returned
dataobject (on success)The single-item response body, on success
error{code, message, details?} (on failure)The usual error object, on failure

Profile (read)

What GET /v1/users/{screen_name}, /v1/users/by-id/{user_id} and /v1/users/batch return per account.

FieldTypeMeaning
idstringNumeric id
namestringDisplay name
screen_namestringHandle
biostringBio text
locationstringFree-text location
urlstring | nullProfile link
avatarstringAvatar image URL
bannerstring | nullBanner image URL
pinnedstring | nullId of the pinned post
verifiedboolHas a verification badge
protectedboolPosts visible to approved followers only
followersintFollower count
followingintFollowing count
tweetsintPost count

Tweet (read)

A post as returned by the read endpoints. The same information as the Tweet payload, in the flatter shape our parser produces.

FieldTypeMeaning
idintPost id, numeric
created_msintWhen it was posted, ms since the epoch
user_idintAuthor's numeric id
userstringAuthor's handle
namestringAuthor's display name
textstringFull text
langstring | nullLanguage X detected
reply_tostring | nullHandle being replied to
reply_to_status_idstring | nullId of the post being replied to
reply_to_user_idstring | nullId of the account being replied to
conversation_idstringId of the thread's root post
is_rtboolIt is a repost
rt_ofBrief | nullThe original, for reposts
is_quoteboolIt quotes another post
quotedBrief | nullThe quoted post
mediastring[]Plain image URLs
media_itemsMedia[]Media items with type and video variants
urlsstring[]Expanded links
viewsint | nullView count
counts{reply, rt, like, quote, bookmark}Reply, repost, like, quote and bookmark counts
articleArticle | nullThe X Article the post links to, when it does (title, preview, cover, images; the full text is on GET /v1/tweets/{tweet_id}/article)
edit_ofint | nullFor an edited version: the id of the first version, else null
edit_idsint[]Every version's id, oldest first; a post never edited lists only itself
sourcestring | nullThe client it was posted from, as X gives it (an HTML link, for example Twitter for iPhone)

User reference

The compact form used in follow-list reads.

FieldTypeMeaning
idstringNumeric id
screen_namestringHandle
namestringDisplay name