---
title: "Thử bộ lọc webhook"
locale: vi
url: https://tlg.builera.app/docs/reference/rest/webhooks.preview_filter
verified: 2026-10-24
app_version: "2.0"
generated: true
---

# Thử bộ lọc webhook

Bộ lọc này có cho sự kiện này qua không? Truyền filters + eventType và một payload mẫu hoặc một eventId thật (evt_…, 30 ngày gần đây). Trả match, lý do khi không khớp, và câu mô tả bộ lọc.

Bộ lọc này có cho sự kiện này qua không? Truyền filters + eventType và một payload mẫu hoặc một eventId thật (evt_…, 30 ngày gần đây). Trả match, lý do khi không khớp, và câu mô tả bộ lọc.

## Thông tin

| Tên | Giá trị |
| --- | --- |
| Mã | `webhooks.preview_filter` |
| Scope cần | `webhooks.read` |
| Mức | Chỉ đọc |
| Có thể cần xác nhận | Không |
| Kiểu chạy | Trả kết quả ngay |
| Cần `Idempotency-Key` | Không |
| Vai trò thành viên được phép | `owner`, `manager`, `agent` |
| Trong app | Cài đặt → Webhook |

## Trường vào

| Trường | Kiểu | Bắt buộc | Mô tả |
| --- | --- | --- | --- |
| `filters` | `đối tượng` | Không |   |
| `eventType` | `chữ` | Có |   |
| `sample` | `đối tượng` | Không |   |
| `eventId` | `chữ` | Không |   |
| `webhookId` | `uuid` | Không |   |

## Ví dụ gọi

```bash
curl -X POST https://tlg.builera.app/api/public/v2/ops/webhooks.preview_filter \
  -H "Authorization: Bearer $TELEGRAM_AUTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"eventType":"…"}'
```

## Trường ra (`data`)

| Trường | Kiểu | Bắt buộc |
| --- | --- | --- |
| `ok` | `true` | Có |
| `match` | `đúng/sai` | Có |
| `reason` | `null \| chữ` | Có |
| `reason_text` | `null \| chữ` | Có |
| `filters_text` | `chữ` | Có |
| `applicable_filters` | `"direction" \| "keywords" \| "chat_types" \| "mention_only" \| "exclude_self" \| "exclude_sent_by" \| "exclude_connection_ids" \| "exclude_own_connection" \| "include_backfill" \| "conversation_ids" \| "conversation_tags" \| "has_media" \| "person_stage_ids" \| "campaign_ids"[]` | Có |

## Ví dụ trả về

```json
{
  "data": {
    "ok": true,
    "match": true,
    "reason": "text",
    "reason_text": "text",
    "filters_text": "text",
    "applicable_filters": [
      "direction"
    ]
  }
}
```

## Dùng qua MCP

Không có tên sẵn trong profile nào: gọi `tools_describe` rồi `tools_run` với `code: "webhooks.preview_filter"`. Tên tool khi được liệt kê: `webhooks_preview_filter`.
