Guides

Last updated: November 17, 2026

1. Your First API Request

Send a message as the request body and get a verdict back:

curl -X POST https://bot.tgfilter.co/moderate \ --data-binary "долларов в неделю пишите в лс"

The response carries the verdict, a score from 0 to 1 and the reason codes that produced it. POST /moderate/batch takes newline-separated messages and returns an array of verdicts.

2. Understanding Verdicts

Every decision is allow, review or delete. Review is the grey zone: the message is kept and logged, and escalated to the judge when one is configured. Delete is a conviction. Before wiring verdicts into a bot, read the plain-English guide to why precision matters in moderation.

3. Batching a Backfill

POST /moderate/batch classifies many messages in one round trip: send one message per line and read back a JSON array in the same order. Telegram itself delivers updates to /webhook one at a time, so batching is for history scans and imports.

4. Reading a Verdict

A verdict is a JSON object with a verdict, a score and an array of reasons. The reasons name the layer and the evidence: a signature phrase, a blocklisted URL, an obfuscation signal or a campaign. Every verdict is also written to the decision log in the dashboard.

TG Filter

Telegram spam filtering for groups, with an auditable decision log.