POST https://xquik.com/api/v1/monitors/posts
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.
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
730 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 when the post is deleted. It carries the last text the
monitor saw.
When X stops showing the post, Xquik pauses the monitor. pausedReason says why.
A paused monitor costs nothing.Headers
Body
Valid event types
The reply count can include replies X does not list.
post.reply.new
reports the replies X (Twitter) lists.Response
201 Created
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_deactivated, author_suspended, protected or unavailable 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.
Response examples
201 example
- 400
{ "error": "invalid_input", "message": "Invalid input. Check the request body." } - 401
{ "error": "unauthenticated", "message": "Authentication required. Provide a valid API key or bearer token." } - 402
{ "error": "insufficient_credits", "message": "Insufficient credits. Top up or subscribe to continue." } - 403
{ "error": "api_key_paused", "message": "This API key is paused. Resume it at dashboard.xquik.com/api-keys to use it again." } - 404
{ "error": "tweet_not_found", "message": "Tweet not found. Check the tweet ID." } - 409
{ "error": "monitor_already_exists", "message": "Monitor already exists." } - 422
{ "error": "post_unavailable", "message": "This post's author limits who can see it. Try again once the post is public." } - 429
{ "error": "rate_limit_exceeded", "message": "Too many requests. Try again later.", "retryAfter": 60 } - 502
{ "error": "x_api_unavailable", "message": "X data source temporarily unavailable. Try again later." } - 503
{ "error": "x_api_unavailable", "message": "Xquik is busy right now. Retry shortly." }