# Danh sách sự kiện

> events_list — Events of the workspace in order (new DM, reply, mention, follower gained/lost, post published/failed, campaign person entered/replied, account session lost, VPS offline, your jobs finishing…).

Source: https://x.builera.app/docs/vi/reference/events_list

`events_list` · Đọc dữ liệu đã lưu

> [!NOTE]
> Mô tả kỹ thuật bằng tiếng Anh — đúng chữ AI agent đọc qua MCP.

Events of the workspace in order (new DM, reply, mention, follower gained/lost, post published/failed, campaign person entered/replied, account session lost, VPS offline, your jobs finishing…). Pass after = the last cursor you saw to get only newer ones; kept 30 days. This is the exact path — webhooks are only faster. Message text appears only with the read-message-text right.

| | |
|---|---|
| REST | `GET /api/public/v1/events` |
| Công cụ MCP | `events_list` |
| Quyền cần có | `view` — Chủ, Quản lý, Vận hành, Chỉ xem |
| Nhóm quyền | `events:read` |
| Nhóm | Sự kiện và webhook |
| Hiện sẵn trong hồ sơ | Điều khiển nick, Tự động, Khách & danh sách, Báo cáo, Hạ tầng |

## Đầu vào {#input}

| Trường | Kiểu | Bắt buộc | Mô tả |
|---|---|---|---|
| `after` | string or integer (0–9007199254740991) | Không | Cursor of the last event you processed (events newer than it). Omit = the newest page. |
| `types` | array of `job.succeeded` · `job.failed` · `job.unknown` · `job.held` · `job.cancelled` · `batch.completed` · `dm.received` · `dm.request_received` · `reply.received` · `mention.received` · `follower.gained` · `follower.lost` · `post.published` · `post.failed` · `post.partial` · `campaign.person_entered` · `campaign.person_replied` · `campaign.person_completed` · `campaign.paused_auto` · `account.session_lost` · `account.session_restored` · `account.safety_changed` · `account.x_rate_limited` · `account.chat_locked` · `vps.offline` · `vps.online` · `proxy.failed` · `alert.opened` · `integration.paused` · `scan.completed` · `limit.reached` (1–31 items) | Không | Only these event types. |
| `account` | string (0–100 chars) | Không | Only events of this account (account_id or @handle). |
| `limit` | integer (1–200) | Không |  |

## Kết quả {#output}

Trả về trong phong bì `{ data, meta }`, không tạo việc trên X. Danh sách có `next_cursor` và `has_more`.

## Ví dụ {#example}

### Gọi qua REST {#example-rest}

```bash
curl -X GET "https://reach-link-craft.lovable.app/api/public/v1/events" \
  -H "Authorization: Bearer $XBUDDY_API_KEY"
```

### Gọi qua MCP {#example-mcp}

```json
{
  "method": "tools/call",
  "params": {
    "name": "events_list",
    "arguments": {}
  }
}
```

## Lỗi có thể gặp {#errors}

| Mã | HTTP | Thử lại được |
|---|---|---|
| [`unauthorized`](/docs/vi/errors/unauthorized) | 401 | Không |
| [`key_expired`](/docs/vi/errors/key_expired) | 401 | Không |
| [`integration_revoked`](/docs/vi/errors/integration_revoked) | 401 | Không |
| [`connection_not_linked`](/docs/vi/errors/connection_not_linked) | 403 | Không |
| [`integration_paused`](/docs/vi/errors/integration_paused) | 403 | Không |
| [`workspace_integrations_paused`](/docs/vi/errors/workspace_integrations_paused) | 403 | Không |
| [`integration_authorization_lost`](/docs/vi/errors/integration_authorization_lost) | 403 | Không |
| [`workspace_suspended`](/docs/vi/errors/workspace_suspended) | 403 | Không |
| [`forbidden`](/docs/vi/errors/forbidden) | 403 | Không |
| [`invalid_input`](/docs/vi/errors/invalid_input) | 422 | Không |
| [`rate_limited`](/docs/vi/errors/rate_limited) | 429 | Có |
| [`internal`](/docs/vi/errors/internal) | 500 | Có |
| [`ambiguous_account`](/docs/vi/errors/ambiguous_account) | 409 | Không |
| [`account_not_allowed`](/docs/vi/errors/account_not_allowed) | 403 | Không |
| [`not_found`](/docs/vi/errors/not_found) | 404 | Không |

[Về danh sách thao tác](/docs/vi/reference)
