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

# Delete Twitter Keyword Monitor & Stop Webhooks

> Delete a keyword monitor, stop polling its X search query, and prevent new matching tweet events and webhook deliveries. Includes signature and retry examples.

<Panel>
  <Tabs defaultTabIndex={0} sync={false}>
    <Tab title="200" id="response-monitors-delete-keyword-200">
      ```json theme={null}
      {
        "success": true
      }
      ```
    </Tab>

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

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

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

    <Tab title="429" id="response-monitors-delete-keyword-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>

Delete a keyword monitor only when its tweet query should stop permanently.
Pause it instead when future monitoring might resume.

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

<CodeGroup>
  ```bash cURL theme={null}
  curl -X DELETE https://xquik.com/api/v1/monitors/keywords/21 \
    -H "x-api-key: xq_YOUR_KEY_HERE" | jq
  ```

  ```javascript Node.js theme={null}
  const monitorId = "21";
  const response = await fetch(
    `https://xquik.com/api/v1/monitors/keywords/${monitorId}`,
    {
      method: "DELETE",
      headers: { "x-api-key": "xq_YOUR_KEY_HERE" },
    },
  );
  const result = await response.json();
  const deletionReceipt = {
    keyword_monitor_id: monitorId,
    success: result.success === true,
    verify_endpoint: `/api/v1/monitors/keywords/${monitorId}`,
    list_endpoint: "/api/v1/monitors/keywords",
  };
  process.stdout.write(`${JSON.stringify(deletionReceipt)}\n`);
  ```

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

  monitor_id = "21"
  response = requests.delete(
      f"https://xquik.com/api/v1/monitors/keywords/{monitor_id}",
      headers={"x-api-key": "xq_YOUR_KEY_HERE"},
  )
  result = response.json()
  deletion_receipt = {
      "keyword_monitor_id": monitor_id,
      "success": result["success"] is True,
      "verify_endpoint": f"/api/v1/monitors/keywords/{monitor_id}",
      "list_endpoint": "/api/v1/monitors/keywords",
  }
  print(json.dumps(deletion_receipt))
  ```

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

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

  type DeleteResult struct {
      Success bool `json:"success"`
  }

  type KeywordMonitorDeletion struct {
      KeywordMonitorID string `json:"keyword_monitor_id"`
      Success          bool   `json:"success"`
      VerifyEndpoint   string `json:"verify_endpoint"`
      ListEndpoint     string `json:"list_endpoint"`
  }

  func main() {
      monitorID := "21"
      req, err := http.NewRequest(
          "DELETE",
          "https://xquik.com/api/v1/monitors/keywords/"+monitorID,
          nil,
      )
      if err != nil {
          log.Fatal(err)
      }
      req.Header.Set("x-api-key", "xq_YOUR_KEY_HERE")

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

      var result DeleteResult
      if err := json.NewDecoder(resp.Body).Decode(&result); err != nil {
          log.Fatal(err)
      }
      receipt := KeywordMonitorDeletion{
          KeywordMonitorID: monitorID,
          Success:          result.Success,
          VerifyEndpoint:   "/api/v1/monitors/keywords/" + monitorID,
          ListEndpoint:     "/api/v1/monitors/keywords",
      }
      if err := json.NewEncoder(os.Stdout).Encode(receipt); err != nil {
          log.Fatal(err)
      }
  }
  ```
</CodeGroup>

The Node.js, Python, and Go examples convert the delete response into one receipt row.
Store `keyword_monitor_id`, `success`, `verify_endpoint`, and `list_endpoint`, then verify
that the deleted ID no longer appears in the list and that the verify endpoint
returns `404`.

## Remove one keyword without deleting the monitor

Use this route when the monitor should continue with fewer search terms.
Confirm both the monitor ID and keyword ID before deletion.

Save the keyword text in your approval record. The response identifies the
removed keyword. Other keywords and monitor delivery settings remain a
separate concern.

Use a full monitor deletion only when the entire monitor should stop. Do not
delete the monitor to remove one unwanted keyword.

## Path parameters

<ParamField path="id" type="string" required>
  The unique keyword 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>

## Response

### 200 OK

<ResponseField name="success" type="boolean">Always `true` on successful deletion.</ResponseField>

```json theme={null}
{ "success": true }
```

### 400 Invalid ID

```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 keyword monitor exists with this ID, or it belongs to a different account.

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

## Deletion handoff

Use this endpoint when a keyword query should stop permanently. Use
[Update Keyword Monitor](/api-reference/monitors/update-keyword) with
`isActive: false` when you only need to pause alerts and keep the monitor
available.

<CardGroup cols={2}>
  <Card title="Permanent Remove" icon="trash-2">
    Delete removes the keyword monitor. Store returned `success` before treating
    the deleted ID as permanently removed. The deleted ID cannot be fetched,
    updated, resumed, or billed again.
  </Card>

  <Card title="Stored History" icon="database">
    Stored events and webhook delivery records tied to this keyword monitor are
    removed with it. Export or reconcile records before deletion.
  </Card>

  <Card title="Pause Instead" icon="circle-pause">
    Use `PATCH /monitors/keywords/{id}` with `isActive: false` to stop future
    polling, alerts, and hourly billing while preserving the monitor record.
  </Card>

  <Card title="Verify Removal" icon="list-checks">
    Call [List Keyword Monitors](/api-reference/monitors/list-keywords) after
    deletion. [Get Keyword Monitor](/api-reference/monitors/get-keyword) should
    return `404` for the deleted ID.
  </Card>

  <Card title="Track New Query" icon="search">
    Create a new keyword monitor when the X search query changes. Store the new
    `id`, `query`, `eventTypes`, `isActive`, and `nextBillingAt`.
  </Card>

  <Card title="Webhook Reuse" icon="webhook">
    Existing webhook endpoints remain configured. Keep their `eventTypes`
    aligned, then run [Test Webhook](/api-reference/webhooks/test) before
    relying on new keyword monitor alerts.
  </Card>
</CardGroup>

<Info>
  The keyword monitor is deleted and its stored events are removed with it. Pause with `isActive: false` if you want to stop new checks without deleting the monitor.
</Info>

<Note>
  **Related:** [List Keyword Monitors](/api-reference/monitors/list-keywords) to verify removal, or [Create Keyword Monitor](/api-reference/monitors/create-keyword) to track a new query.
</Note>
