Monitors

Create or update a monitor by username

Changed on

Creates the monitor if it does not exist, or updates it if it does. Send the same call twice & you still have 1 monitor. A new monitor answers 201 & an update answers 200. Both carry created, so you know which one ran. Creating needs the credits of the first hour, then costs 30 credits an hour. A stopped monitor turns back on & counts as created. Updating is free & replaces the event types. It changes the name only when you send one.

put/api/v1/monitors/username/{username}

Request

  • Base URL
    https://xquik.com
  • Auth
    • API key in header x-api-key
    • or HTTP bearer

Path parameters

usernamestring required
Example:elonmusk

The account's X username, with or without @, or its numeric user ID. A number is a user ID, so this call matches the account even after a rename.

Request body

eventTypesEventType[] required

Array of event types to subscribe to.

namestring nullable

Your label for the monitor. Its events carry it as monitorName. Leave it out to keep the current label, or send null to remove it.

Example request

{
  "eventTypes": [
    "tweet.new",
    "tweet.reply"
  ],
  "name": "Launch watch"
}

Response

Running monitor updated

idstring required
usernamestring required
xUserIdstring required
namestring

Customer-set label of the account monitor, when set.

eventTypesEventType[] required

Array of event types to subscribe to.

isActiveboolean required
createdAtstring date-time required
nextBillingAtstring date-time required

Next hourly credit charge time for this account monitor.

pausedReason'insufficient_credits' | 'x_account_protected' | 'x_user_not_found'

Why Xquik paused this account monitor. insufficient_credits means the balance could not pay an hour, so add credits & resume. The other 2 mean X stopped showing the account. Absent when the monitor is active or you paused it yourself.

pausedAtstring date-time

When Xquik paused this account monitor.

createdboolean required

False, since this call updated a running monitor.

Example response

{
  "id": "42",
  "username": "elonmusk",
  "xUserId": "9876543210",
  "name": "Launch watch",
  "eventTypes": [
    "tweet.new",
    "tweet.reply"
  ],
  "isActive": true,
  "createdAt": "2025-01-15T12:00:00Z",
  "nextBillingAt": "2025-01-15T12:00:00Z",
  "pausedReason": "x_user_not_found",
  "pausedAt": "2025-01-15T12:00:00Z"
}

Changes