> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xquik.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Monitor Twitter accounts & keywords with webhooks

> Monitor Twitter accounts, keywords, mentions, hashtags, products, and campaigns every second. Deliver signed webhook alerts with replayable stored events.

<blockquote className="agent-llms-directive">
  For the complete documentation index, see <a href="/llms.txt">llms.txt</a>.
</blockquote>

Use Xquik monitors for support, marketing, research, or agent
pipelines. Xquik offers 2 Twitter monitoring tools:
account monitors and keyword monitors. Use an account monitor
for one profile and a keyword monitor for one search query. Monitor Twitter mentions, deliver matching
events to a signed Twitter webhook, and replay stored events.

Use one keyword monitor to monitor Twitter keywords and campaign phrases. Use
one account monitor to monitor Twitter account activity from a known profile.
Route mentions of your brand into support and community management queues.
Measure engagement metrics from unique tweets and authors. Review each match
before marketing teams create content or replies.

## Build a real time monitoring workflow for Twitter

Xquik monitors X only. Add another social media platform connector for other
networks. When tracking brand mentions, keep each X event separate. Test each
tool with the same queries during a free trial. Compare Tweet IDs, author IDs,
timestamps, webhook delivery, and replay results.

Use real time Twitter monitoring for campaign and support queries. Keep each
keyword and hashtag in a separate monitor. Test every Boolean search before
activation. Store historical data from tweet-search backfills separately. Keep
live monitor events in their own stream. Analyze data from matched tweets by
Tweet ID, author ID, timestamp, and query. Classify each preserved tweet after
its monitor event arrives.

Create a temporary product launch monitor for its name and branded hashtag.
Connect verified events to an AI-powered tweet triage service when needed.
Keep automated classification downstream from Xquik's original tweet payload.

## Pick the monitor path

<CardGroup cols={2}>
  <Card title="Account monitor" icon="radio">
    Use `POST /api/v1/monitors` for one account. Track its posts, replies,
    reposts, quotes, or profile field changes.
  </Card>

  <Card title="Keyword monitor" icon="search">
    Use `POST /api/v1/monitors/keywords` for a saved search. Track a brand,
    handle, hashtag, product, campaign, or Boolean query.
  </Card>

  <Card title="Signed webhook" icon="webhook">
    Use `POST /api/v1/webhooks` to deliver monitor events with
    `X-Xquik-Signature`, `X-Xquik-Timestamp`, and `X-Xquik-Nonce`.
  </Card>

  <Card title="Stored event replay" icon="database">
    Use `GET /api/v1/events` to replay account or keyword monitor events. Recover
    from receiver downtime, queue errors, or warehouse load failures.
  </Card>
</CardGroup>

## Answer common Twitter monitoring questions

### What is the best API to track Twitter keyword mentions?

Choose an API that stores the exact query and stable event IDs. Test one query
for a brand, handle, hashtag, product, or campaign. The
Twitter keyword monitor checks for matching tweets every 1 second. Review each Tweet ID, author ID,
text, timestamp, media, and matched keyword. Sign every webhook event before
sending it to the receiver. Queue each event before acknowledging delivery.
Replay stored events after receiver downtime. Compare missed tweet counts for
the same query in each tool. Use duplicate alert counts during the final tool
comparison.

### How do I monitor a keyword on Twitter in real time?

Create a keyword monitor with `POST /api/v1/monitors/keywords`. Use one Boolean
query for each product, campaign, hashtag, or support topic. Store its monitor
ID and exact query. Test the keyword against recent tweets first. Inspect reply,
author, language, and media fields. Subscribe a webhook to required event types.
Verify its signature, timestamp, and nonce. Save each event before returning
`2xx`. Replay stored events after receiver downtime. Pause inactive monitors
after the assigned campaign concludes.

### Track keywords Twitter API

Use `POST /api/v1/monitors/keywords` for continuous keyword checks. Separate
competitor names and handles from product, support, and campaign queries. Save
the monitor ID, query, owner, event types, and enabled state. Test
matching tweets before enabling the monitor. Store each Tweet ID and author ID.
Deduplicate webhook deliveries by event ID. Put rate-limit or receiver failures
into the normal retry path. Never create a changed monitor during those retries.
Pause the keyword monitor after its campaign ends.

### Twitter mention tracking tool

Xquik provides a Twitter mention tracking tool for webhook review queues.
Marketing teams can route matching tweets to their own review queues.
Teams then answer brand mentions sooner.
Use precise queries to track Twitter mentions in relevant conversations for
review. Review each tweet, reply, author, and media attachment. Store the
matched keyword, monitor ID, event ID, and delivery ID. Connect
Xquik events to broader social listening tools for other networks. Review
sentiment and author intent downstream. Compare reply routing too.

### Twitter keyword monitor

A Twitter keyword monitor watches one stored search expression. Use one exact
brand name, @handle, hashtag, campaign phrase, or product name per monitor. Run
a tweet search before approving the keyword. Review
tweets, replies, reposts, author profiles, languages, and media. Save the
approved query beside its monitor ID. Subscribe the verified webhook only to
events its receiver can process. Write received events to a queue that survives restarts. Deduplicate
every delivery by event ID. Pause the monitor after its campaign or
investigation closes. Store matched Tweet IDs.

### What is the best way to monitor a Twitter account programmatically?

Create an account monitor with `POST /api/v1/monitors`. Supply one username and
required event types. Store its stable X user ID and monitor ID.
The Twitter account monitor API follows new tweets, replies, reposts, and quotes. It also
tracks documented profile changes. Deliver each account event to a signed
Twitter webhook receiver.
Queue the payload before returning `2xx`. Deduplicate deliveries by event ID.
Replay stored events after receiver downtime. Reuse the same monitor during
uncertain retries. Pause inactive profiles.

### Monitor Twitter mentions

Track an @handle, brand spelling, misspelling, product, or campaign hashtag. A
handle query finds explicit mentions. Brand keywords find untagged references.
Campaign queries isolate time-bounded work. Test every query with tweet search.
Review tweets, replies, authors, profiles, and media before continuous checks.
Route each matching event to the responsible queue. Store Tweet ID, author ID,
timestamp, query, monitor ID, and event ID. Review false matches before
broadening a keyword. Replay stored events after webhook downtime.

### Twitter webhook alerts

Create one signed webhook for the monitor events your application handles.
Verify `X-Xquik-Signature`, `X-Xquik-Timestamp`, and `X-Xquik-Nonce`. Reject any
request with a stale timestamp or reused nonce. Queue the payload, then return
`2xx`. Use `streamEventId` for event identity. Use `deliveryId` for each receiver
retry or initial delivery.
Store monitor ID, keyword, event type, Tweet ID, and author ID. Record the queue
result without logging secrets. Replay stored events after webhook or queue
failures. Deduplicate every retried delivery before alerting reviewers during
outages.

### Twitter account monitor API

Use the account monitor API for one known profile. Select the needed tweet,
reply, repost, quote, or profile change events. Store the stable X user ID beside
the username. Also store monitor ID, owner, event types, webhook destination,
and active state. Deduplicate each
delivery by event ID. Keep Tweet IDs for post events. Pause accounts after they
leave the monitored set. Use keyword monitors for terms spanning many profiles.
Each account-monitor workflow should track one relevant profile. Review each
profile change before updating downstream records.

### How do I get real-time Twitter alerts via webhook?

Create a receiver with `POST /api/v1/webhooks`. Subscribe it to matching monitor
events. Verify every signature before parsing the event. Queue valid payloads
before returning `2xx`. Use `streamEventId` for event identity. Use `deliveryId`
for each receiver attempt. These Twitter webhook alerts remain stored for event
recovery. They provide instant alerts without making receiver
uptime the only recovery path. Record the monitor, event, Tweet, and author IDs.
Also record the receive timestamp and the queue write result.

### How do businesses use Twitter monitoring for customer service?

Create one keyword monitor for the brand handle and support phrases. Add one
account monitor for replies to the owned profile. Route matching tweets and
replies to the assigned support queue. Keep the Tweet, author, conversation,
query, and event IDs for each alert. Verify the webhook before queueing each
alert. Load the conversation thread when a support agent reviews the alert.
Record assignment, response decision, and
resolution time. Replay stored events after downtime. Never publish an
automatic reply without account approval.

### How do I monitor competitor activity on Twitter?

Create separate keyword monitors for each competitor name and handle. Add
focused monitors for each product and active campaign phrase during research.
Use account monitors when every post from one profile matters. Test
each keyword with tweet search before continuous monitoring. Review replies,
reposts, authors, media, and recurring false matches. Route each event to the
assigned research queue. Store the query, monitor ID, Tweet ID, and event ID for
each research alert. Compare unique tweets across equal collection windows.
Show paused or incomplete collection windows beside the result totals. Record
every query revision.

### How do I integrate Twitter monitoring into a dashboard?

Send verified webhook events to a queue that survives restarts. Transform each event into one
dashboard record with a stable event identity. Use `streamEventId` for that
identity. Show tweet text,
author, query, monitor, event type, and received time. Keep historical search
backfills separate from live monitor events. Calculate totals from unique Tweet
IDs and author IDs. Report delivery failures separately from conversation
volume. Replay missing events before closing a reporting window. Display
replies, reposts, profiles, and media beside each tweet.

### What are best practices for Twitter monitoring in crisis management?

Prepare focused keyword monitors before an incident. Include exact handles,
products, campaign terms, and known misspellings. Assign one incident owner and
one verified webhook receiver. Give matching crisis tweets and replies priority
during review. Keep Tweet ID, author ID, query, timestamp, and event ID. Review
the full conversation before any public response. Never infer urgency from one
keyword alone. Replay stored events after outages. Pause temporary monitors
after the incident review ends. Record each monitor change.

## Plan a brand monitoring scope

### Assign one monitoring goal

Teams comparing social media monitoring tools can use Xquik for X-specific
monitoring. Assign one owner per monitor.

### Choose one monitor type

Use an account monitor for one known profile.
Use a keyword monitor for text that can appear across many profiles. Keep the
stable X user ID or exact query with its monitor ID.

### Assign one receiver

Assign one receiver. Subscribe only to event types it handles.

## Create an account monitor

Use account monitors for profile events.

```bash theme={null}
curl -X POST https://xquik.com/api/v1/monitors \
  -H "x-api-key: xq_YOUR_KEY_HERE" \
  -H "Content-Type: application/json" \
  -d '{
    "username": "username",
    "eventTypes": ["tweet.new", "tweet.reply", "profile.bio.changed"]
  }' | jq
```

Store the returned `id`, `username`, `xUserId`, `eventTypes`, `isActive`,
`createdAt`, and `nextBillingAt` with the brand workspace. Review the
[Create Account Monitor API contract](https://docs.xquik.com/api-reference/monitors/create).

## Create a keyword monitor

Use a keyword monitor when a search query triggers the workflow. Keep the query under 512 characters.
Store its ID with the exact query.

```bash theme={null}
curl -X POST https://xquik.com/api/v1/monitors/keywords \
  -H "x-api-key: xq_YOUR_KEY_HERE" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "\"Xquik\" OR @username",
    "eventTypes": ["tweet.new", "tweet.reply"]
  }' | jq
```

## Write focused Twitter monitoring queries

Use tweet search to test each query before monitoring starts. A Boolean search
should describe one brand, product, campaign, hashtag, or handle. Review tweets,
replies, authors, media, and query noise before activation.

## Deliver events to a webhook

Create one webhook per receiver. Store the returned `secret` once. Verify every
request before queueing the event.

```bash theme={null}
curl -X POST https://xquik.com/api/v1/webhooks \
  -H "x-api-key: xq_YOUR_KEY_HERE" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/xquik/brand-monitor",
    "eventTypes": ["tweet.new", "tweet.reply", "profile.bio.changed"]
  }' | jq
```

Webhook payloads include `deliveryId`, `streamEventId`, `eventType`, `occurredAt`,
and `data`. Return `2xx` after you verify the request and queue the event.

## Route real time alerts to the right team

Verify signatures, timestamps, and nonces before queueing alerts.
Use `streamEventId` as the event identity across webhook endpoints. Use
`deliveryId` to skip retried deliveries. Process slow work after queueing.

## Replay stored events

Replay stored events after receiver or queue failures.

```bash theme={null}
curl "https://xquik.com/api/v1/events?monitorId=42&eventType=tweet.new&limit=50" \
  -H "x-api-key: xq_YOUR_KEY_HERE" | jq
```

```bash theme={null}
curl "https://xquik.com/api/v1/events?keywordMonitorId=21&eventType=tweet.new&limit=50" \
  -H "x-api-key: xq_YOUR_KEY_HERE" | jq
```

Store `hasMore` and `nextCursor`. Continue pagination while `hasMore` remains
true by sending `nextCursor` as `cursor` for the next request.

## Add search backfill

Use search or mention reads for earlier tweets and replies.

```bash theme={null}
curl "https://xquik.com/api/v1/x/tweets/search?q=%22Xquik%22%20OR%20%40username&limit=50" \
  -H "x-api-key: xq_YOUR_KEY_HERE" | jq
```

```bash theme={null}
curl "https://xquik.com/api/v1/x/users/username/mentions?limit=50" \
  -H "x-api-key: xq_YOUR_KEY_HERE" | jq
```

## Measure brand monitoring coverage

Count engagement metrics from unique tweet IDs and author IDs. Separate account
events from keyword events. Deduplicate by `streamEventId`.

### Calculate share of voice

Xquik does not return a calculated share of voice.
Build Twitter analytics downstream from unique tweet IDs and event windows.
Let the social media management team approve posts in its publishing workflow.
For share of voice, compare one brand's unique-tweet count with every brand's
count.

### Analyze tweet sentiment downstream

Classify sentiment only after storing the original tweet. Keep that tweet
text beside its classifier version.

### Report delivery health

Compare stored event IDs with webhook records. Label partial reporting windows.

## Receiver row

```json theme={null}
{
  "brand_monitor_id": "brand-xquik-q2",
  "monitor_type": "keyword",
  "account_monitor_id": null,
  "keyword_monitor_id": "21",
  "webhook_id": "15",
  "delivery_id": "502",
  "stream_event_id": "9002",
  "event_type": "tweet.new",
  "tweet_id": "1893704267862470862",
  "x_user_id": "987654321",
  "username": "customer_handle",
  "query": "\"Xquik\" OR @username",
  "signature_verified": true,
  "received_at": "2026-05-24T20:12:00.000Z",
  "event_replay_route": "GET /api/v1/events?keywordMonitorId=21"
}
```

Keep endpoint signing values, raw request bodies, raw signatures, or full
headers private.

## Build a brand mention triage queue

Show tweet text, author, time, event type, query, and monitor. Store review state
against `streamEventId`. Avoid automatic public replies from a brand monitoring event.
Review the conversation and account first. Approve X write actions separately.

## Maintain account and keyword monitors

Review each monitor's owner, query, event types, receiver, and `nextBillingAt`.
Compare each monitor's event types with webhook subscriptions. Test one signed
delivery after changes. Pause unused monitors.

## Cost and retry notes

<Check>
  Active account and keyword monitors check every 1 second and cost 21 credits
  per active monitor-hour. The rate includes event storage and webhook delivery.
</Check>

<Check>
  Stored event listing is free. Xquik meters search, mention, and other direct
  read backfills by returned rows.
</Check>

Pause inactive monitors with `PATCH /api/v1/monitors/{id}` or
`PATCH /api/v1/monitors/keywords/{id}` and `{ "isActive": false }`.

## Next steps

<CardGroup cols={2}>
  <Card title="Create account monitor" icon="radio" href="/api-reference/monitors/create">
    Track one account's posts, replies, reposts, quotes, and profile field
    changes.
  </Card>

  <Card title="Create keyword monitor" icon="search" href="/api-reference/monitors/create-keyword">
    Track a search query for brand, campaign, support, or category terms.
  </Card>

  <Card title="Create webhook" icon="webhook" href="/api-reference/webhooks/create">
    Send signed monitor events to a receiver URL.
  </Card>

  <Card title="List events" icon="database" href="/api-reference/events/list">
    Replay stored monitor events by account monitor, keyword monitor, event type,
    and cursor.
  </Card>
</CardGroup>

<div className="related-api-links">
  <Accordion title="Related timeline, bookmark & notification APIs" icon="link">
    * Account feeds: [Home timeline](/api-reference/x/timeline) · [Notifications](/api-reference/x/notifications) · [Mentions](/api-reference/x/user-mentions)
    * Saved and private: [Bookmarks](/api-reference/x/bookmarks) · [Bookmark folders](/api-reference/x/bookmark-folders) · [DM history](/api-reference/x/dm-history)
  </Accordion>
</div>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.