> ## 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 post monitor & metric history

> Stop a post monitor. Xquik removes its stored events & hourly metric history in batches. Poll the status URL until it answers 404, then deletion is done.

**202**

```json theme={null}
{
  "deletionStatus": "deleting",
  "statusUrl": "/api/v1/monitors/42",
  "success": true
}
```

**400**

```json theme={null}
{
  "error": "invalid_input",
  "message": "Invalid input. Check the request body."
}
```

**401**

```json theme={null}
{
  "error": "unauthenticated",
  "message": "Authentication required. Provide a valid API key or bearer token."
}
```

**403**

```json theme={null}
{
  "error": "forbidden",
  "message": "This API key calls paid X read routes only, such as GET /api/v1/x/tweets/search. Create a Full access key at dashboard.xquik.com/account?tab=api-keys to call this route."
}
```

**404**

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

**429**

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

> For the complete documentation index, see [llms.txt](/llms.txt).

Delete a post monitor only when you no longer need the post's events or
metrics. Pause it instead when you might resume.

**Free.** This endpoint does not consume credits.

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

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

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

monitor_id = "31"
response = requests.delete(
    f"https://xquik.com/api/v1/monitors/posts/{monitor_id}",
    headers={"x-api-key": "xq_YOUR_KEY_HERE"},
)
result = response.json()
receipt = {
    "post_monitor_id": monitor_id,
    "success": result["success"] is True,
    "verify_endpoint": result["statusUrl"],
}
print(json.dumps(receipt))
```

Poll `verify_endpoint` while it answers `200`. Deletion is done when it
answers `404`. Wait for `Retry-After` between requests.

## Before you delete

Export the events & metrics you need first. Deletion removes the monitor's
stored events & hourly metric history.

A monitor that Xquik paused for a deleted post costs nothing. Delete it to
tidy your list.

## Path parameters

**id** `string` *required*

The post monitor ID.

## Headers

**x-api-key** `string` *required*

Your API key. Session cookie authentication is also supported. Generate a key from the [dashboard](https://dashboard.xquik.com/en/account?tab=api-keys).

## Response

### 202 Accepted

**deletionStatus** `string`

Returns `deleting` while cleanup runs.

**statusUrl** `string`

Poll this URL until it answers `404`.

**success** `boolean`

Returns `true` when deletion starts.

```json theme={null}
{
  "deletionStatus": "deleting",
  "statusUrl": "/api/v1/monitors/posts/31",
  "success": true
}
```

The response also has `Location` & `Retry-After` headers.

### 400 Invalid input

The monitor ID is not valid.

### 401 Unauthenticated

Missing or invalid API key.

### 403 Forbidden

This API key can't change monitors. Use a Full access key.

### 404 Not found

No post monitor has this ID on your account.

### 429 Rate limited

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

> [!NOTE]
>
> **Related.** [List Post Monitors](/api-reference/monitors/list-posts.md) to check removal, or [Create Post Monitor](/api-reference/monitors/create-post.md) to track a new post.


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