Toxicity Protection API & Integration Docs
Query the cross-platform ban database (Discord & ND Chat) from your own bots or tools using REST endpoints and API keys.
Authentication
Public read endpoints (GET /api/v1/bans, GET /api/v1/bans/lookup/:id, GET /api/v1/stats) require no auth. Protected write/guild endpoints accept an API key generated in the Owner Panel:
Authorization: Bearer tp_live_your_api_key # or x-api-key: tp_live_your_api_key
Core Endpoints
Searches Discord IDs, ND Chat IDs, usernames, Case IDs (TP-0001), and resolves cross-platform identity links automatically.
curl https://toxicityprotection.com/api/v1/bans/lookup/299729731237052417
Evaluates a joining user against a server's whitelist, minimum severity, category filters, and cross-platform rules. Returns action: "ban" | "kick" | "alert" | "allow".
curl -X POST https://toxicityprotection.com/api/v1/guilds/discord/GUILD_ID/check-member/USER_ID \
-H "x-api-key: tp_live_..." -H "Content-Type: application/json" -d '{"dryRun": true}'Requires scope bans:write. Logs a permanent or temporary ban (duration: "7d") and queues enforcement tasks.
curl -X POST https://toxicityprotection.com/api/v1/bans \
-H "x-api-key: tp_live_..." -H "Content-Type: application/json" \
-d '{"platform":"discord","targetUserId":"123456","targetUsername":"baduser","category":"scam","severity":"high","reason":"Phishing links"}'Staff Webhooks & Bot Notifications
Configure DISCORD_REPORTS_WEBHOOK_URL in .env to stream new community reports into your TP Staff Discord channel, while accepted/rejected reports and appeals automatically DM users when their Discord DMs are open.