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

# Update a tweet monitor, X (Twitter) API docs

> Rename a post monitor, change its post event types, or pause & resume it. Resuming reads the post first & answers 409 while X still hides it from public view.

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

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

Change a post monitor's label, event types or active state. The tracked post
stays the same, so the monitor ID & its history stay usable.

**Free.** This endpoint does not consume credits. Active monitors bill 30 credits per hour.

```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 PATCH https://xquik.com/api/v1/monitors/posts/31 \
  -H "x-api-key: xq_YOUR_KEY_HERE" \
  -H "Content-Type: application/json" \
  -d '{
    "eventTypes": ["post.reply.new", "post.likes.changed"],
    "isActive": true
  }' |
  jq -c '{
    post_monitor_id: .id,
    event_types: .eventTypes,
    is_active: .isActive,
    next_billing_at: .nextBillingAt
  }'
```

```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: "PATCH",
  headers: {
    "x-api-key": "xq_YOUR_KEY_HERE",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    eventTypes: ["post.reply.new", "post.likes.changed"],
    isActive: true,
  }),
});
const monitor = await response.json();
const state = {
  post_monitor_id: monitor.id,
  event_types: monitor.eventTypes,
  is_active: monitor.isActive,
  next_billing_at: monitor.nextBillingAt,
};
process.stdout.write(`${JSON.stringify(state)}\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.patch(
    f"https://xquik.com/api/v1/monitors/posts/{monitor_id}",
    headers={"x-api-key": "xq_YOUR_KEY_HERE"},
    json={
        "eventTypes": ["post.reply.new", "post.likes.changed"],
        "isActive": True,
    },
)
monitor = response.json()
state = {
    "post_monitor_id": monitor["id"],
    "event_types": monitor["eventTypes"],
    "is_active": monitor["isActive"],
    "next_billing_at": monitor["nextBillingAt"],
}
print(json.dumps(state))
```

## Pause & resume a post monitor

Send `isActive: false` to stop reads, events & hourly billing. The monitor &
its history stay.




Send `isActive: true` to resume. Xquik reads the post first. While X hides the
post, the route answers `409` & changes nothing. The monitor stays paused &
costs nothing.




A resumed monitor reports nothing from its pause. Its first read sets the new
starting point.




To track a different post, create a new monitor. Then delete or pause the old
one.

## 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). |
| `Content-Type` | `string` | Yes | Must be `application/json`. |

## Body

Send at least 1 field.

| Body parameter | Type | Required | Description |
| - | - | - | - |
| `eventTypes` | `string[]` | No | Post event types to send, 1 to 10. Replaces the current list. Valid types are `post.reply.new`, `post.quote.new`, `post.likes.changed`, `post.retweets.changed`, `post.replies.changed`, `post.quotes.changed`, `post.bookmarks.changed`, `post.views.changed`, `post.edited` & `post.deleted`. |
| `name` | `string \| null` | No | New label, 1 to 80 characters. Send `null` to remove it. |
| `isActive` | `boolean` | No | `false` pauses the monitor. `true` resumes it once X shows the post. |

## Response

### 200 OK

Returns the updated monitor, shaped like the
[Get Post Monitor](https://docs.xquik.com/api-reference/monitors/get-post.md) response.

| Field | Type | Description |
| - | - | - |
| `id` | `string` | Unique post monitor ID. |
| `eventTypes` | `string[]` | Post event types this monitor sends. |
| `isActive` | `boolean` | Whether the monitor is active. |
| `nextBillingAt` | `string` | Next hourly credit charge time. |
| `metrics` | `object` | The 6 metrics, each with `current` & `gain` since tracking began. |

### 400 Invalid input

No field to change, or a field is invalid. The message says what to fix.

### 401 Unauthenticated

Missing or invalid API key.

### 404 Not found

No post monitor has this ID on your account.

### 409 Post unavailable

X still hides the post, so the monitor stays paused. `reason` is `deleted`,
`protected`, `author_deactivated`, `author_suspended` or `unavailable` when X
names it.

### 429 Rate limited

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

### 502 X unavailable

X failed the read while resuming. Retry after a short wait.

### 503 Busy

Xquik is busy right now. Wait for `Retry-After`, then retry.

> [!NOTE]
>
> **Related.** [Get Post Monitor](https://docs.xquik.com/api-reference/monitors/get-post.md), [Delete Post Monitor](https://docs.xquik.com/api-reference/monitors/delete-post.md), [Update Webhook](https://docs.xquik.com/api-reference/webhooks/update.md), or [List Events](https://docs.xquik.com/api-reference/events/list.md).

## Response examples

### 200 example

```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"]}}
{
  "id": "31",
  "postId": "2102882545427714266",
  "postUrl": "https://x.com/NASA/status/2102882545427714266",
  "authorId": "11348282",
  "authorUsername": "NASA",
  "authorName": "NASA",
  "media": [],
  "text": "Today, Croatia became the 74th nation that has committed to a peaceful and prosperous exploration of space.",
  "postedAt": "2026-09-23T22:07:23.000Z",
  "eventTypes": ["post.reply.new"]
}
```

* **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." }`
* **409** `{ "error": "post_unavailable", "message": "The author deleted this post. Delete this monitor." }`
* **429** `{ "error": "rate_limit_exceeded", "message": "Too many requests. Try again later.", "retryAfter": 60 }`
* **502** `{ "error": "x_api_unavailable", "message": "X data source temporarily unavailable. Try again later." }`
* **503** `{ "error": "x_api_unavailable", "message": "Xquik is busy right now. Retry shortly." }`


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