> ## 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.

# Twitter monitoring alerts: how to set Twitter alerts

> Update Twitter account alert settings by replacing tweet and profile filters or pausing and resuming a monitor. Returns 409 if the X account is gone or private.

<Panel>
  <Tabs defaultTabIndex={0} sync={false}>
    <Tab title="200" id="response-monitors-update-200">
      ```json theme={null}
      {
        "id": "42",
        "username": "elonmusk",
        "xUserId": "1234567890",
        "eventTypes": [
          "tweet.new"
        ],
        "isActive": true,
        "createdAt": "2025-01-15T12:00:00Z",
        "nextBillingAt": "2025-01-15T13:00:00Z"
      }
      ```
    </Tab>

    <Tab title="400" id="response-monitors-update-400">
      ```json theme={null}
      {
        "error": "invalid_input",
        "message": "Invalid input. Check the request body."
      }
      ```
    </Tab>

    <Tab title="401" id="response-monitors-update-401">
      ```json theme={null}
      {
        "error": "unauthenticated",
        "message": "Authentication required. Provide a valid API key or bearer token."
      }
      ```
    </Tab>

    <Tab title="404" id="response-monitors-update-404">
      ```json theme={null}
      {
        "error": "not_found",
        "message": "Resource not found."
      }
      ```
    </Tab>

    <Tab title="409" id="response-monitors-update-409">
      ```json theme={null}
      {
        "error": "monitor_profile_unavailable",
        "message": "X account is gone or private. Resume once it is back & public."
      }
      ```
    </Tab>

    <Tab title="429" id="response-monitors-update-429">
      ```json theme={null}
      {
        "error": "rate_limit_exceeded",
        "message": "Too many requests. Try again later.",
        "retryAfter": 60
      }
      ```
    </Tab>
  </Tabs>
</Panel>

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

<Callout icon="circle-check" color="#16a34a">
  **Free.** This endpoint does not consume credits.
</Callout>

Set Twitter alerts for one saved X profile. This route
replaces tweet and profile filters. It can also pause or resume
the same monitor. The response shows the updated account and event filter.

This route cannot change the profile, keyword query, webhook URL, alert
threshold, or sentiment rule. Manage webhook delivery separately.

<CodeGroup>
  ```bash cURL theme={null}
  curl -X PATCH https://xquik.com/api/v1/monitors/7 \
    -H "x-api-key: xq_YOUR_KEY_HERE" \
    -H "Content-Type: application/json" \
    -d '{
      "eventTypes": ["tweet.new", "tweet.reply"],
      "isActive": true
    }' | jq -c '{
      monitor_id: .id,
      username,
      x_user_id: .xUserId,
      event_types: .eventTypes,
      is_active: .isActive,
      created_at: .createdAt,
      next_billing_at: .nextBillingAt,
      verify_endpoint: ("/api/v1/monitors/" + .id),
      list_endpoint: "/api/v1/monitors",
      events_endpoint: ("/api/v1/events?monitorId=" + .id),
      event_detail_endpoint_pattern: "/api/v1/events/{event_id}",
      webhooks_endpoint: "/api/v1/webhooks",
      deliveries_endpoint_pattern: "/api/v1/webhooks/{webhook_id}/deliveries"
    }'
  ```

  ```javascript Node.js theme={null}
  const monitorId = "7";
  const response = await fetch(`https://xquik.com/api/v1/monitors/${monitorId}`, {
    method: "PATCH",
    headers: {
      "x-api-key": "xq_YOUR_KEY_HERE",
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      eventTypes: ["tweet.new", "tweet.reply"],
      isActive: true,
    }),
  });
  const monitor = await response.json();
  const monitorState = {
    monitor_id: monitor.id,
    username: monitor.username,
    x_user_id: monitor.xUserId,
    event_types: monitor.eventTypes,
    is_active: monitor.isActive,
    created_at: monitor.createdAt,
    next_billing_at: monitor.nextBillingAt,
    verify_endpoint: `/api/v1/monitors/${monitor.id}`,
    list_endpoint: "/api/v1/monitors",
    events_endpoint: `/api/v1/events?monitorId=${monitor.id}`,
    event_detail_endpoint_pattern: "/api/v1/events/{event_id}",
    webhooks_endpoint: "/api/v1/webhooks",
    deliveries_endpoint_pattern: "/api/v1/webhooks/{webhook_id}/deliveries",
  };
  process.stdout.write(`${JSON.stringify(monitorState)}\n`);
  ```

  ```python Python theme={null}
  import json
  import requests

  monitor_id = "7"
  response = requests.patch(
      f"https://xquik.com/api/v1/monitors/{monitor_id}",
      headers={"x-api-key": "xq_YOUR_KEY_HERE"},
      json={
          "eventTypes": ["tweet.new", "tweet.reply"],
          "isActive": True,
      },
  )
  monitor = response.json()
  monitor_state = {
      "monitor_id": monitor["id"],
      "username": monitor["username"],
      "x_user_id": monitor["xUserId"],
      "event_types": monitor["eventTypes"],
      "is_active": monitor["isActive"],
      "created_at": monitor["createdAt"],
      "next_billing_at": monitor["nextBillingAt"],
      "verify_endpoint": f"/api/v1/monitors/{monitor['id']}",
      "list_endpoint": "/api/v1/monitors",
      "events_endpoint": f"/api/v1/events?monitorId={monitor['id']}",
      "event_detail_endpoint_pattern": "/api/v1/events/{event_id}",
      "webhooks_endpoint": "/api/v1/webhooks",
      "deliveries_endpoint_pattern": "/api/v1/webhooks/{webhook_id}/deliveries",
  }
  print(json.dumps(monitor_state))
  ```

  ```go Go theme={null}
  package main

  import (
      "bytes"
      "encoding/json"
      "log"
      "net/http"
      "os"
  )

  type Monitor struct {
      ID            string   `json:"id"`
      Username      string   `json:"username"`
      XUserID       string   `json:"xUserId"`
      EventTypes    []string `json:"eventTypes"`
      IsActive      bool     `json:"isActive"`
      CreatedAt     string   `json:"createdAt"`
      NextBillingAt string   `json:"nextBillingAt"`
  }

  type MonitorState struct {
      DeliveriesEndpointPattern  string   `json:"deliveries_endpoint_pattern"`
      EventDetailEndpointPattern string   `json:"event_detail_endpoint_pattern"`
      EventsEndpoint             string   `json:"events_endpoint"`
      EventTypes                 []string `json:"event_types"`
      CreatedAt                  string   `json:"created_at"`
      IsActive                   bool     `json:"is_active"`
      ListEndpoint               string   `json:"list_endpoint"`
      MonitorID                  string   `json:"monitor_id"`
      NextBillingAt              string   `json:"next_billing_at"`
      Username                   string   `json:"username"`
      VerifyEndpoint             string   `json:"verify_endpoint"`
      WebhooksEndpoint           string   `json:"webhooks_endpoint"`
      XUserID                    string   `json:"x_user_id"`
  }

  func main() {
      body, _ := json.Marshal(map[string]interface{}{
          "eventTypes": []string{"tweet.new", "tweet.reply"},
          "isActive":   true,
      })

      monitorID := "7"
      req, err := http.NewRequest("PATCH", "https://xquik.com/api/v1/monitors/"+monitorID, bytes.NewReader(body))
      if err != nil {
          log.Fatal(err)
      }
      req.Header.Set("x-api-key", "xq_YOUR_KEY_HERE")
      req.Header.Set("Content-Type", "application/json")

      resp, err := http.DefaultClient.Do(req)
      if err != nil {
          log.Fatal(err)
      }
      defer resp.Body.Close()

      var monitor Monitor
      if err := json.NewDecoder(resp.Body).Decode(&monitor); err != nil {
          log.Fatal(err)
      }
      state := MonitorState{
          DeliveriesEndpointPattern:  "/api/v1/webhooks/{webhook_id}/deliveries",
          EventDetailEndpointPattern: "/api/v1/events/{event_id}",
          EventsEndpoint:             "/api/v1/events?monitorId=" + monitor.ID,
          EventTypes:                 monitor.EventTypes,
          CreatedAt:                  monitor.CreatedAt,
          IsActive:                   monitor.IsActive,
          ListEndpoint:               "/api/v1/monitors",
          MonitorID:                  monitor.ID,
          NextBillingAt:              monitor.NextBillingAt,
          Username:                   monitor.Username,
          VerifyEndpoint:             "/api/v1/monitors/" + monitor.ID,
          WebhooksEndpoint:           "/api/v1/webhooks",
          XUserID:                    monitor.XUserID,
      }
      if err := json.NewEncoder(os.Stdout).Encode(state); err != nil {
          log.Fatal(err)
      }
  }
  ```
</CodeGroup>

The Node.js, Python, and Go examples print one reusable monitor record. Store
`monitor_id`, `event_types`, `is_active`,
`next_billing_at`, `verify_endpoint`, `list_endpoint`, `events_endpoint`,
`event_detail_endpoint_pattern`, `webhooks_endpoint`, and
`deliveries_endpoint_pattern` before resuming alerts or webhook checks.

## Path parameters

<ParamField path="id" type="string" required>
  The unique monitor ID.
</ParamField>

## Headers

<ParamField header="x-api-key" type="string" required>
  Your API key. Session cookie authentication is also supported. Generate a key from the [dashboard](https://xquik.com/dashboard).
</ParamField>

<ParamField header="Content-Type" type="string" required>
  Must be `application/json`.
</ParamField>

## Body

At least 1 field is required.

<ParamField body="eventTypes" type="string[]">
  Updated array of event types. Must contain at least 1 valid account monitor
  type: `tweet.new`, `tweet.quote`, `tweet.reply`, `tweet.retweet`,
  `tweet.media`, `tweet.link`, `tweet.poll`, `tweet.mention`,
  `tweet.hashtag`, `tweet.longform`, `profile.avatar.changed`,
  `profile.banner.changed`, `profile.name.changed`,
  `profile.username.changed`, `profile.bio.changed`,
  `profile.location.changed`, `profile.url.changed`,
  `profile.verified.changed`, `profile.protected.changed`,
  `profile.pinned_tweet.changed`, `profile.unavailable.changed`.
</ParamField>

<ParamField body="name" type="string | null">
  New label for the monitor, 1 to 80 characters. Send `null` to remove the label. The next event carries the new `monitorName`.
</ParamField>

<ParamField body="isActive" type="boolean">
  Set to `false` to pause monitoring, or `true` to resume. Paused account
  monitors do not consume hourly monitor credits.
</ParamField>

## How to set Twitter alerts for an existing account monitor

Read the monitor before changing its Twitter alert settings. Save its `id`,
`username`, `xUserId`, `eventTypes`, `isActive`, and `nextBillingAt`.

Send the complete `eventTypes` array when coverage changes. The new array
replaces every existing event type. Omit it when only `isActive` changes.

If the account is gone or private, the API returns
`409 monitor_profile_unavailable`. Retry once it is back and public.
Finally, compare the returned account, filter, and active state with the
approved request.

## Which Twitter alert settings can this endpoint change?

| Alert setting | PATCH behavior | Correct route when PATCH does not apply |
| - | - | - |
| Tweet and profile event filters | Replace `eventTypes` with the complete desired array. | Use this route. |
| Monitoring state | Set `isActive` to pause or resume checks. | Use this route. |
| Tracked X profile | Cannot change `username` or `xUserId`. | Delete this monitor and [create another account monitor](/api-reference/monitors/create). |
| Keyword, hashtag, or product query | Cannot change an account monitor into a keyword monitor. | Create or [update a keyword monitor](/api-reference/monitors/update-keyword). |
| Webhook destination | Cannot change an HTTPS receiver or delivery state. | [Update the webhook](/api-reference/webhooks/update). |
| Delivery channels | Cannot send Slack, CRM, email, or queue messages directly. | Process a signed webhook in your integration. |
| Volume or sentiment rules | This route has no threshold or sentiment field. | Evaluate stored events in your workflow. |

Account filters select future tweet and profile events. Your webhook receiver
can notify Slack, update a CRM record, or add work to a queue.

## How do Twitter account alert settings work in this Twitter monitoring tool?

Twitter account alert settings choose captured tweet and profile changes.
Authenticate with an API key or bearer token. To receive notifications,
subscribe a webhook to the same event types.

Webhook notification settings choose the HTTPS receiver. They do not change
the Twitter account or event filter. Use keyword alerts for brand mentions,
hashtags, products, or campaign phrases. Manage keyword monitoring through
[Update Keyword Monitor](/api-reference/monitors/update-keyword).

## How do I send Twitter account alerts to Slack or a CRM?

Update the account filter, then compare it with
[List Webhooks](/api-reference/webhooks/list). Subscribe the receiver to every
required event type. Run [Test Webhook](/api-reference/webhooks/test) before
waiting for account activity.

Validate each signature, then acknowledge valid requests before slow work. Process slower
Slack or CRM work after acknowledgment. [List Events](/api-reference/events/list)
confirms event storage. [List Deliveries](/api-reference/webhooks/deliveries)
confirms delivery attempts.

## How do I reduce high-volume Twitter alert noise?

Select only required tweet and profile events. Select mention and reply events
when those interactions matter. Add repost, quote, media, or link events only
when your workflow uses those payloads.

Use a keyword monitor for words, hashtags, products, or campaigns. Account monitor event types do not express Boolean search
rules, languages, sensitivity, or sentiment. Keep webhook subscriptions aligned.
Join delivery attempts to stored events with `streamEventId`.

## Update handoff

Use this endpoint to change event scope. You can also pause or resume an
account alert without creating another monitor ID.

| Account monitor update column | Request or response source | Verification rule |
| - | - | - |
| Monitor ID | Path `{id}` and response `id` | Require both IDs to match. |
| Event filter | `eventTypes` in the request and response | Match every event type. |
| Polling state | `isActive` in the request and response | Match the pause or resume choice. |
| X username | Response `username` | Confirm the tracked profile did not change. |
| X user ID | Response `xUserId` | Join account records on this ID. It does not change. |
| Webhook alignment | `GET /webhooks` | Match subscriptions before you rely on alerts. |

<CardGroup cols={2}>
  <Card title="Returned state" icon="clipboard-check">
    Store returned `id`, `username`, `xUserId`, `eventTypes`, `isActive`,
    `createdAt`, and `nextBillingAt` as the current account monitor
    configuration.
  </Card>

  <Card title="Inventory sync" icon="list-checks">
    Refresh [List Monitors](/api-reference/monitors/list) after the PATCH and
    compare [Get Monitor](/api-reference/monitors/twitter-account-monitor-status) for the same `id` before
    updating queues, CRM records, or support notes.
  </Card>

  <Card title="Event filter" icon="funnel">
    `eventTypes` replaces the current filter. Keep [List Webhooks](/api-reference/webhooks/list)
    subscriptions aligned with the monitor event types you expect to deliver.
  </Card>

  <Card title="Pause monitoring" icon="circle-pause">
    `isActive: false` pauses future account checks, stored events, future webhook
    deliveries, and hourly monitor billing for this monitor.
  </Card>

  <Card title="Resume monitoring" icon="circle-play">
    `isActive: true` resumes checks for matching future account activity. Check
    `nextBillingAt`, then run [Test Webhook](/api-reference/webhooks/test)
    before relying on production alerts.
  </Card>

  <Card title="Account identity" icon="user-check">
    PATCH cannot change `username` or `xUserId`. Delete this monitor and create
    a new account monitor when the tracked account changes.
  </Card>

  <Card title="Downstream join" icon="link">
    Keep using `monitorId` and `username` from
    [List Events](/api-reference/events/list) to reconcile stored events after
    the update. Use returned event IDs with [Get Event](/api-reference/events/get)
    when a workflow needs the full tweet payload.
  </Card>

  <Card title="Delivery audit" icon="activity">
    Use [List Deliveries](/api-reference/webhooks/deliveries) for each webhook
    and join delivery `streamEventId` to event IDs. Do not use `x_event_id` as
    the delivery join key.
  </Card>
</CardGroup>

## Change one account monitor

Read the current monitor first. Send every approved `eventTypes` value. Use
`isActive: false` for a temporary stop. Check credits before sending `true`.
Then verify `id`, `username`, `xUserId`, `eventTypes`, and `nextBillingAt`.

PATCH changes future monitoring only. It never rewrites stored events or past
deliveries. Create another monitor when the tracked profile changes.

## Prepare a reversible account monitor change

Record the current ID, username, events, active state, and billing time. Add the
approved future values beside them. Send only supported PATCH fields.

If verification fails, read the monitor again. Do not send an automatic
rollback. Another approved update may already exist.

## Separate pausing, filtering, and deletion

Pause when the monitor may resume. Replace `eventTypes` to change future scope.
Delete only for permanent removal. Create another monitor for another profile.
This does not change past account events.

## Verify the first event after resuming

Read the monitor and confirm `isActive: true`. Then inspect the first matching
event's type and timestamp. Check deliveries separately. A successful PATCH does
not prove delivery.

## Response

### 200 OK

<ResponseField name="id" type="string">
  Unique monitor ID.
</ResponseField>

<ResponseField name="username" type="string">
  Normalized X username.
</ResponseField>

<ResponseField name="xUserId" type="string">
  Resolved X user ID.
</ResponseField>

<ResponseField name="eventTypes" type="string[]">
  Updated event types.
</ResponseField>

<ResponseField name="isActive" type="boolean">
  Current active status after update.
</ResponseField>

<ResponseField name="createdAt" type="string">
  ISO 8601 creation timestamp.
</ResponseField>

<ResponseField name="nextBillingAt" type="string">
  Next hourly credit charge time for active monitor billing.
</ResponseField>

```json theme={null}
{
  "id": "7",
  "username": "elonmusk",
  "xUserId": "44196397",
  "eventTypes": ["tweet.new", "tweet.reply"],
  "isActive": true,
  "createdAt": "2026-02-24T10:30:00.000Z",
  "nextBillingAt": "2026-02-24T11:30:00.000Z"
}
```

### 400 Invalid input

```json theme={null}
{ "error": "invalid_input", "message": "Empty body, invalid event types, or invalid isActive type" }
```

Empty body, invalid `eventTypes` values, or invalid `isActive` type.

```json theme={null}
{ "error": "invalid_id", "message": "Invalid ID format." }
```

The provided monitor ID is not a valid format.

### 401 Unauthenticated

```json theme={null}
{ "error": "unauthenticated", "message": "Missing or invalid API key" }
```

Missing or invalid API key.

### 404 Not found

```json theme={null}
{ "error": "not_found", "message": "Monitor not found" }
```

No monitor exists with this ID, or it belongs to a different account.

### 409 Profile unavailable

```json theme={null}
{
  "error": "monitor_profile_unavailable",
  "message": "X account is gone or private. Resume once it is back & public."
}
```

The X account is gone or private. Resume the monitor once it is back &
public. You can still pause it or change its event filters.

### 429 Rate limited

```json theme={null}
{
  "error": "rate_limit_exceeded",
  "message": "Too many requests. Try again later.",
  "retryAfter": 60
}
```

Too many requests. Wait for the `Retry-After` header before retrying.

<Info>
  `isActive: false` pauses future checks, stored events, webhook deliveries, and
  hourly monitor billing for this monitor. `isActive: true` resumes future
  checks with the returned `eventTypes`.
</Info>

<Note>
  **Related.** [List Monitors](/api-reference/monitors/list) to refresh inventory, [Get Monitor](/api-reference/monitors/twitter-account-monitor-status) to verify this monitor, [List Events](/api-reference/events/list) to audit stored events, [Get Event](/api-reference/events/get) to inspect one event, [List Webhooks](/api-reference/webhooks/list) to compare subscriptions, or [List Deliveries](/api-reference/webhooks/deliveries) to audit webhook delivery status.
</Note>


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