Monitors
Twitter post monitor API & engagement alerts
Track 1 X post’s replies, quotes, edits, deletion & 6 metrics. Send each change to signed webhooks. Costs 30 credits an hour, events & deliveries included.
- 201
- 400
- 401
- 402
- 403
- 404
- 409
- 422
- 429
- 502
- 503
POST
Twitter post monitor API & engagement alerts
Create a post monitor when 1 X post needs live tracking. It reports new
replies, new quotes, edits & deletion. It also tracks views, likes, retweets,
replies, quotes & bookmarks.
Each example turns the new monitor into 1 state row. Store
Requires 30 available credits. Active post monitors bill 30 credits per hour.
The hourly price covers stored events & webhook deliveries. Xquik charges an
hour only after a read that finds the post.
post_monitor_id, post_id, event_types & next_billing_at before you
route alerts.
Post monitor handoff
Create the monitor first. Then create a signed webhook withPOST /webhooks for the same event types.
Test it with POST /webhooks/{id}/test.
Monitor ID
Store
id as post_monitor_id. Use it with
Get Post Monitor,
Update Post Monitor &
Delete Post Monitor.Tracked post
Store
postId, postUrl & authorUsername. Every post event carries
them, so receivers can route without a lookup.Metric history
Read hourly values & gains with
Post Monitor Metrics. Xquik keeps
30 days of history.
Stored event join
Pass
id as postMonitorId to
List Events. Post events carry
monitorType: "post" & the same monitorId.How do I track a tweet’s engagement with an API?
Send the post link or ID aspost. Xquik reads the post once & returns its
current metrics. Each metric starts with a gain of 0.
Xquik then reads the post every 2 to 4 seconds. A metric event fires when a count
holds a new value. Each metric fires at most once a minute. The event covers
the whole change since the last one.
New replies & quotes come as their own events. Each one carries the reply or
quote as data, like tweet.new. Xquik sends them oldest first.
What happens when the author edits or deletes the post?
X moves engagement to the newest version of an edited post. The monitor follows that version, so metrics keep counting after an edit.post.edited carries previousText, text & versionId. post.deleted
fires once 3 reads in a row confirm the deletion. It carries the last text
the monitor saw.
After 3 missed reads, Xquik pauses the monitor. pausedReason says why.
A paused monitor costs nothing.
Headers
string
required
Your API key. Session cookie authentication is also supported. Generate a key from the dashboard.
string
required
Must be
application/json.Body
string
required
Post link or ID, up to 2,048 characters. x.com, twitter.com, mobile &
/i/web/status/ links work with any query string.string | null
Your own label for the monitor, 1 to 80 characters. Every event the monitor
produces carries it as
monitorName. Xquik normalizes whitespace.string[]
Post event types to send, 1 to 10. Without it, the monitor sends
post.reply.new, post.quote.new, post.likes.changed,
post.retweets.changed, post.edited & post.deleted.Valid event types
The reply count can include replies X does not list.
post.reply.new
reports the replies X lists.
Response
201 Created
string
Unique post monitor ID.
string
Your label for the monitor, when set.
string
ID of the post you gave.
string
Link to the post.
string
Permanent X user ID of the post’s author.
string
Username of the post’s author.
string
Display name of the post’s author.
string
Text of the newest version Xquik read.
string
ISO 8601 time X published the post.
string[]
Post event types this monitor sends.
boolean
Whether the monitor is active.
string
ISO 8601 creation timestamp.
string
Next hourly credit charge time.
string
Why Xquik paused the monitor. Absent while active.
string
When Xquik paused the monitor.
object
views, likes, retweets, replies, quotes & bookmarks. Each holds current & gain
since tracking began. Both are null when X shows no count, as for views on old posts.400 Invalid input
post is missing or is not a post link or ID. The message says what to fix.
401 Unauthenticated
Missing or invalid API key.402 Payment required
You need at least 30 available credits to create a post monitor.404 Tweet not found
X shows no such post, so Xquik creates nothing.reason is deleted,
author_suspended or protected when X names it.
409 Duplicate
An active monitor already tracks this post. Use Update Post Monitor to change it.422 Post unavailable
The author limits who can see the post. Choose a public post.429 Rate limited
Too many requests. Wait for theRetry-After header before retrying.
502 X unavailable
X failed the read. Retry after a short wait.503 Busy
Xquik is busy right now. Wait forRetry-After, then retry.
Creating a monitor for a paused post again turns it back on. It keeps its
start values & history, and takes the new name & event types.
Next steps. List Post Monitors, Post Monitor Metrics, Create Webhook, List Events, or Get Event.