> ## 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 webhook endpoint & stop events

> Deactivate a webhook endpoint and stop future tweet and profile event deliveries to its URL. The record and delivery history stay. Reactivate it with PATCH.

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

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

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

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

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

<CodeGroup>
  ```bash cURL theme={null}
  curl -X DELETE https://xquik.com/api/v1/webhooks/15 \
    -H "x-api-key: xq_YOUR_KEY_HERE" \
    | jq --arg webhook_id "15" '{
      webhook_id: $webhook_id,
      success,
      inventory_endpoint: "/api/v1/webhooks",
      deliveries_endpoint: ("/api/v1/webhooks/" + $webhook_id + "/deliveries")
    }'
  ```

  ```javascript Node.js theme={null}
  const webhookId = "15";
  const response = await fetch(`https://xquik.com/api/v1/webhooks/${webhookId}`, {
    method: "DELETE",
    headers: { "x-api-key": "xq_YOUR_KEY_HERE" },
  });
  const result = await response.json();
  const deactivationHandoff = {
    webhook_id: webhookId,
    success: result.success === true,
    inventory_endpoint: "/api/v1/webhooks",
    deliveries_endpoint: `/api/v1/webhooks/${webhookId}/deliveries`,
  };
  ```

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

  webhook_id = "15"
  response = requests.delete(
      f"https://xquik.com/api/v1/webhooks/{webhook_id}",
      headers={"x-api-key": "xq_YOUR_KEY_HERE"},
  )
  result = response.json()
  deactivation_handoff = {
      "webhook_id": webhook_id,
      "success": result["success"] is True,
      "inventory_endpoint": "/api/v1/webhooks",
      "deliveries_endpoint": f"/api/v1/webhooks/{webhook_id}/deliveries",
  }
  ```

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

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

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

  type DeactivationHandoff struct {
    DeliveriesEndpoint string `json:"deliveries_endpoint"`
    InventoryEndpoint  string `json:"inventory_endpoint"`
    Success            bool   `json:"success"`
    WebhookID          string `json:"webhook_id"`
  }

  func main() {
    webhookID := "15"
    req, err := http.NewRequest("DELETE", "https://xquik.com/api/v1/webhooks/"+webhookID, 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)
    }
    handoff := DeactivationHandoff{
      DeliveriesEndpoint: "/api/v1/webhooks/" + webhookID + "/deliveries",
      InventoryEndpoint:  "/api/v1/webhooks",
      Success:            result.Success,
      WebhookID:          webhookID,
    }
    _ = handoff
  }
  ```
</CodeGroup>

These snippets build a deactivation receipt. Store the webhook ID with its
list and delivery-log endpoints. Do not print the raw delete
response.

## What delete does

`DELETE /webhooks/{id}` deactivates the endpoint by setting `isActive` to
`false`. It does not remove the record. The webhook record stays available in
[List Webhooks](/api-reference/webhooks/list), and previous delivery rows stay
available in [List Deliveries](/api-reference/webhooks/deliveries).

The response contains only `{ "success": true }`. It does not return the URL, event
types, or signing secret. To receive events again, call
[Update Webhook](/api-reference/webhooks/update) with `isActive: true`, then run
[Test Webhook](/api-reference/webhooks/test) before routing production monitor
events to the receiver.

## Path parameters

<ParamField path="id" type="string" required>
  The webhook ID to deactivate.
</ParamField>

## Headers

<ParamField header="x-api-key" type="string" required>
  Your API key. This endpoint also accepts session cookie authentication.
</ParamField>

## Response

### 200 OK

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

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

Xquik deactivates the webhook immediately. It may still attempt in-flight deliveries, but it queues no new deliveries.

### 401 Unauthenticated

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

Missing or invalid API key or session cookie.

### 400 Invalid ID

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

The provided webhook ID is not a valid format.

### 404 Not found

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

No webhook 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.

## Deactivation handoff

Use this endpoint when a receiver should stop getting future monitor events.
The webhook record and delivery history stay for audit or rollback.

<CardGroup cols={2}>
  <Card title="Soft deactivate" icon="toggle-left">
    The endpoint sets `isActive` to `false` and returns `{ "success": true }`.
    It does not return the webhook configuration.
  </Card>

  <Card title="Future deliveries" icon="ban">
    Inactive webhooks do not receive new monitor deliveries or scheduled retries.
    In-flight delivery attempts may still finish.
  </Card>

  <Card title="Audit trail" icon="list-checks">
    Use [List Webhooks](/api-reference/webhooks/list) to confirm
    `webhooks[].isActive: false`, then use
    [List Deliveries](/api-reference/webhooks/deliveries) for prior delivery
    status, attempts, errors, and timestamps.
  </Card>

  <Card title="Delivery audit" icon="activity">
    Delivery rows for inactive endpoints can show `pending`, `failed`, or
    `exhausted`. Reactivate the webhook to receive waiting deliveries.
    Store `streamEventId`, `status`, `attempts`,
    `lastStatusCode`, `lastError`, `createdAt`, and `deliveredAt`.
  </Card>

  <Card title="Event join" icon="link">
    Use delivery `streamEventId` as the `{id}` for
    [Get Event](/api-reference/events/get). Store `monitorId`, `monitorType`,
    `type`, `occurredAt`, and `data` with the deactivation record.
  </Card>

  <Card title="Receiver cleanup" icon="route-off">
    Remove queue, CRM, alerting, or warehouse routing only after the endpoint is
    inactive and you expect no more production events.
  </Card>

  <Card title="Reactivate" icon="rotate-ccw">
    To reuse the same webhook, call
    [Update Webhook](/api-reference/webhooks/update) with `isActive: true`, then
    run [Test Webhook](/api-reference/webhooks/test).
  </Card>

  <Card title="Signing secret" icon="shield-check">
    Delete returns no `secret`. Keep the original Create Webhook secret for
    audit records or future reactivation.
  </Card>
</CardGroup>

<Note>
  This endpoint accepts 2 auth methods. Send an API key in the `x-api-key` header or a session cookie from the dashboard.

  **Related.** [List Webhooks](/api-reference/webhooks/list) · [Update Webhook](/api-reference/webhooks/update) · [Test Webhook](/api-reference/webhooks/test) · [List Deliveries](/api-reference/webhooks/deliveries) · [Get Event](/api-reference/events/get) · [Create Webhook](/api-reference/webhooks/create)
</Note>


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