> ## 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 a tweet monitor, X (Twitter) API docs

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

> For the complete documentation index, see [llms.txt](https://docs.xquik.com/llms.txt).

`DELETE https://xquik.com/api/v1/monitors/posts/{id}`

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

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

```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/bash.json","/languages/csharp.json","/languages/go.json","/languages/java.json","/languages/javascript.json","/languages/kotlin.json","/languages/php.json","/languages/python.json","/languages/ruby.json","/languages/typescript.json"]}}
curl -X DELETE https://xquik.com/api/v1/monitors/posts/31 \
  -H "x-api-key: xq_YOUR_KEY_HERE" | jq
```

```javascript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/bash.json","/languages/csharp.json","/languages/go.json","/languages/java.json","/languages/javascript.json","/languages/kotlin.json","/languages/php.json","/languages/python.json","/languages/ruby.json","/languages/typescript.json"]}}
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={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/bash.json","/languages/csharp.json","/languages/go.json","/languages/java.json","/languages/javascript.json","/languages/kotlin.json","/languages/php.json","/languages/python.json","/languages/ruby.json","/languages/typescript.json"]}}
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

| Path parameter | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | The post monitor ID. |

## Headers

| Header | Type | Required | Description |
| - | - | - | - |
| `x-api-key` | `string` | Yes | 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

| Field | Type | Description |
| - | - | - |
| `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={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/bash.json","/languages/csharp.json","/languages/go.json","/languages/java.json","/languages/javascript.json","/languages/kotlin.json","/languages/php.json","/languages/python.json","/languages/ruby.json","/languages/typescript.json"]}}
{
  "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](https://docs.xquik.com/api-reference/monitors/list-posts.md) to check removal.
> * [Create Post Monitor](https://docs.xquik.com/api-reference/monitors/create-post.md) to track a new post.

## Response examples

* **400** `{ "error": "invalid_input", "message": "Invalid input. Check the request body." }`
* **401** `{ "error": "unauthenticated", "message": "Authentication required. Provide a valid API key or bearer token." }`
* **403** `{ "error": "api_key_paused", "message": "This API key is paused. Resume it at dashboard.xquik.com/api-keys to use it again." }`
* **404** `{ "error": "not_found", "message": "Resource not found." }`
* **429** `{ "error": "rate_limit_exceeded", "message": "Too many requests. Try again later.", "retryAfter": 60 }`


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