Skip to main content
POST
/
monitors
/
keywords
Create keyword monitor
curl --request POST \
  --url https://xquik.com/api/v1/monitors/keywords \
  --header 'Content-Type: <content-type>' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "query": "<string>",
  "eventTypes": [
    "<string>"
  ]
}
'
Requires 22 available credits - active keyword monitors bill 21 credits per hour
Keyword monitors are unlimited. Active monitors check every 1 second. Webhook and event deliveries are included in active monitor billing.
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 api",
    "eventTypes": ["tweet.new"]
  }' |
  jq -c '{
    keyword_monitor_id: .id,
    query: .query,
    event_types: .eventTypes,
    is_active: .isActive,
    created_at: .createdAt,
    next_billing_at: .nextBillingAt,
    verify_endpoint: "/api/v1/monitors/keywords/\(.id)",
    update_endpoint: "/api/v1/monitors/keywords/\(.id)",
    delete_endpoint: "/api/v1/monitors/keywords/\(.id)",
    events_endpoint: "/api/v1/events?keywordMonitorId=\(.id)",
    event_detail_endpoint_pattern: "/api/v1/events/{event_id}",
    webhooks_endpoint: "/api/v1/webhooks",
    deliveries_endpoint_pattern: "/api/v1/webhooks/{webhook_id}/deliveries"
  }'
The cURL, Node.js, and Python examples convert the created or reactivated keyword monitor into one state row. Store keyword_monitor_id, query, event_types, is_active, next_billing_at, verify_endpoint, update_endpoint, delete_endpoint, events_endpoint, event_detail_endpoint_pattern, webhooks_endpoint, and deliveries_endpoint_pattern before routing alerts.

Keyword monitor handoff

Use POST /monitors/keywords when a queue, CRM, warehouse, Slack alert, or agent needs real-time tweet alerts for an X search query. Create the monitor first, then create a signed webhook with POST /webhooks and test it with POST /webhooks/{id}/test.

Monitor ID

Store id as keyword_monitor_id. Use Get Keyword Monitor to verify state, Update Keyword Monitor to pause or resume, and Delete Keyword Monitor only when the query should stop permanently.

Normalized Query

Store query; Xquik includes it on keyword monitor events and signed webhook payloads.

Event Filter

Store eventTypes; keep List Webhooks subscriptions aligned so expected tweets deliver.

Active State

Read isActive and nextBillingAt before enabling alerts or estimating hourly monitor burn.

Stored Event Join

Use monitorType: "keyword", keywordMonitorId, and query from List Events to join stored events back to the monitor. Use Get Event for one event’s full payload.

Webhook Delivery Join

Use deliveryId for receiver idempotency and List Deliveries for delivery audit rows. Join delivery streamEventId to event IDs. Do not use x_event_id as the delivery join key.
Active keyword monitors check every 1 second and cost 21 credits per active monitor-hour. Creation or reactivation requires 22 available credits. Pause with Update Keyword Monitor and { "isActive": false } when the alert should stop.

Headers

x-api-key
string
required
Your API key. Session cookie authentication is also supported. Generate a key from the dashboard.
Content-Type
string
required
Must be application/json.

Body

query
string
required
X search query to monitor. Whitespace is normalized. Maximum length is 512 characters.
eventTypes
string[]
required
Array of event types to subscribe to. At least 1 required. See Valid Event Types below.

Valid event types

Valid keyword monitor types: tweet.new, tweet.quote, tweet.reply, tweet.retweet, tweet.media, tweet.link, tweet.poll, tweet.mention, tweet.hashtag, tweet.longform.

tweet.new

Matching tweet returned by the query. Used when no reply, quote, or retweet signal is present.

tweet.quote

Matching quote tweet returned by the query. Include this when quote activity should create keyword monitor events and webhook deliveries.

tweet.reply

Matching reply returned by the query. Include this when support routing, conversation tracking, or alerting needs replies.

tweet.retweet

Matching retweet returned by the query. Include this when repost activity should create keyword monitor events and webhook deliveries.

Response

id
string
Unique keyword monitor ID.
query
string
Normalized query being monitored.
eventTypes
string[]
Event types this monitor is subscribed to.
isActive
boolean
Whether the monitor is currently active.
createdAt
string
ISO 8601 creation timestamp.
nextBillingAt
string
Next hourly credit charge time. New active monitors are due immediately.
{
  "id": "21",
  "query": "xquik api",
  "eventTypes": ["tweet.new"],
  "isActive": true,
  "createdAt": "2026-02-24T10:30:00.000Z",
  "nextBillingAt": "2026-02-24T10:30:00.000Z"
}
If a keyword monitor for the same query exists but is paused, creating it again reactivates that monitor with the new event types.
Last modified on June 11, 2026