tencent cloud

Chat

News and Announcements
Release Notes
Announcements
Product Introduction
Overview
Basic Concepts
Scenarios
Features
Account System
User Profile and Relationship Chain
Message Management
Group Related
Official Account
Audio/Video Call
Use Limits
Purchase Guide
Billing Overview
Pricing
Purchase Instructions
Renewal Guide
Service Suspension Explanation
Refund Policy
Development Guidelines
Demo Zone
Activate Service
Free Demos
Quick Run
Download
SDK and Demo Source Code
Update Log
Chat Interaction (UI Included)
TUIKit Introduction
Getting Started
Full-feature Integration
Single-function Integration
Build with AI
Build Basic Interfaces
More Features
Customizing Appearance
Internationalization
Push Service
Overview
Noun explanation
Activate the Service
Quick Start
Manufacturer Channel
Statistics
Troubleshooting Tool
Client APIs
REST API
Push Callback
Advanced Features
Release Notes
Error Codes
FAQS
Desk
Overview
Quick Start
Integration Guide
Admin Operation Manual
Agent Manual
More Practices
Live Streaming Setup Guide
AI Chatbot
Super Large Entertainment and Collaboration Community
Discord Implementation Guide
How to Integrate Chat into Games
WhatsApp Channel-style Official Account Integration Solution
Send Red Packet
Firewall Restrictions
No UI Integration
Quick Start
SDK Integration
Initialization
Login and Logout
Message
Conversation
Group
Community Topic
User Profile and Relationship Chain
Offline Push
Cloud Search
Local Search
Official Channel Management
Client APIs
JavaScript
Android
iOS & macOS
Swift
Flutter
Electron
Unity
React Native
C APIs
C++
Server APIs
Secure authentication with UserSig
RESTful APIs
Webhooks
Console Guide
New Console Introduction
Creating and Upgrading an Application
Basic Configuration
Feature Configuration
Account Management
Group Management
Official Channel Management
Webhook Configuration
Usage
Viewing Guide for Resource Packages
Real-Time Monitor
Auxiliary Development Tools
Access Management
Advanced Features
FAQs
uni-app FAQs
Purchase
SDK
Account Authentication
User Profile and Relationship Chain
Message
Group
Audio-Video Group
Nickname and Profile Photo
Security Compliance Certification
Service Level Agreement
Security Compliance Certification
Chat Policies
Privacy Policy
Data Privacy and Security Agreement
Migration
Migration Solutions
Migration Solutions Lite
Error Codes
Contact Us

Cloud Moderation Webhooks

PDF
Focus Mode
Font Size
Last updated: 2026-03-13 11:05:41

Overview

Once Content Understanding is enabled, moderation results can be sent to your app backend using webhook configuration.

Notes

To activate webhooks, set the webhook URL and enable the corresponding switch. For configuration steps, refer to Third-Party Callback Introduction.
Webhook requests are sent from the Chat backend to your app backend via HTTP POST.
When your app backend receives a webhook request, it must verify that the SDKAppID parameter in the request URL matches your own SDKAppID.
By default, only moderation results for violations are sent via webhook. If needed, you can configure the webhook to forward all moderation results to your app backend.

API Description

Request URL Example

In this example, the webhook URL configured by the app is https://www.example.com:
https://www.example.com?SdkAppid=$SDKAppID&CallbackCommand=$CallbackCommand&contenttype=json

Request parameters

Field
Description
https
The request protocol is HTTPS, and the request method is POST.
www.example.com
Webhook URL.
SdkAppid
SDKAppID assigned in the Chat console when creating the application.
CallbackCommand
Fixed value: ContentCallback.ResultNotify.
contenttype
Request body type is always json.

Request Example

{
"Scene":"C2C",
"SdkAppId":1400187352,
"From_Account":"jared",
"ContactItem":{
"ContactType":1,
"To_Account":"Jonh"
},
"ContentType":"Text",
"TextContent":[
"aaabbbccc",
"1234567"
],
"MsgID":"1434460578_4137340972_1661154487",
"CtxcbResult":1,
"CtxcbRequestId":"241ed925-4c56-4357-95dd-1e6e7798f214",
"CtxcbKeywords":["aaabbbccc","1234567"],
"CtxcbSuggestion":"Review",
"CtxcbLabel":"Sexy",
"CtxcbSubLabel":"InsinuationPorn",
"CtxcbSubLabelDesc":"XXXX",
"CtxcbLibName":"test",
"CloudCustomData":"aaabbbccc"
}

Request Fields

Field
Type
Description
Scene
String
Moderation scenario:
C2C Chat = C2C
C2C Custom Message = C2CCustom
Group Chat = Group
Group Custom Message = GroupCustom
Group Profile = GroupInfo
Group Member Profile = GroupMemberInfo
Relationship Chain = RelationChain
User Profile = UserInfo
From_Account
String
UserID of the sender of the content submitted for moderation.
ContactItem
Object
Indicates the recipient of the message during moderation.
ContactType
Integer
Distinguishes whether the recipient is a group or C2C Chat:
ContactType = 1 indicates C2C Chat.
ContactType = 2 indicates Group Chat.
To_Account
String
When ContactType = 1, recipient UserID.
ToGroupId
String
When ContactType = 2, recipient GroupID.
ContentType
String
Type of content submitted for moderation:
Text = Text
Image = Image
Audio = Audio
Video = Video
TextContent
Array
When ContentType is Text, contains the text content submitted for moderation. Custom text messages may return multiple array elements; other message types return only one array element.
FileURL
String
When ContentType is Image/Audio/Video, the file URL submitted for moderation.
MsgID
String
For C2C moderation, MsgID is the C2C message MsgKey.
For Group moderation, MsgID is the group message MsgSeq. If a group message has no MsgID, it indicates the message was blocked due to violation or not delivered for other reasons.
CtxcbResult
Integer
Chat handling strategy:
1: Blocked.
0: Allowed.
CtxcbRequestId
String
Identifier for third-party content moderation service.
CtxcbKeywords
Array
Sensitive keywords detected in the text.
CtxcbSuggestion
String
Moderation suggestion from third-party content moderation service: Block/Review/Normal.
CtxcbLabel
String
Primary violation category detected during moderation: Normal/Illegal/Abuse/Polity/Ad/Porn/Sexy/Terror/Composite.
CtxcbSubLabel
String
Secondary violation category detected during moderation. This field is present only when triggered by the model.
CtxcbSubLabelDesc
String
Chinese description corresponding to the secondary violation category detected during moderation.
CtxcbLibName
String
Name of the custom keyword library triggered by keyword detection. This field is present only when keywords are matched.
CloudCustomData
String
For C2C or group message moderation, the CloudCustomData custom field in the message body is returned as-is. For other moderation scenarios, this field is empty.

Response Example

{
"ActionStatus": "OK",
"ErrorInfo": "",
"ErrorCode": 0
}

Response Fields

Field
Type
Description
ActionStatus
String
Processing result:
OK indicates success.
FAIL indicates failure.
ErrorCode
Integer
Error code:
0: App backend processed successfully.
1: App backend processing failed.
ErrorInfo
String
Error message.

Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback