tencent cloud

APIs

Cloud Virtual Machine
History
Introduction
API Category
Making API Requests
Region APIs
Instance APIs
Cloud Hosting Cluster APIs
Image APIs
Instance Launch Template APIs
Placement Group APIs
Key APIs
Security Group APIs
Network APIs
Data Types
Error Codes
Tencent Cloud Lighthouse
History
Introduction
API Category
Making API Requests
Image APIs
Firewall APIs
Key APIs
Instance APIs
CCN APIs
Snapshot APIs
Other APIs
Cloud Disk APIs
Scene APIs
Package APIs
Quota APIs
Region APIs
Data Types
Error Codes
Auto Scaling
History
Introduction
API Category
Making API Requests
Scaling Group APIs
Scaling Group Instances APIs
Launch Configuration APIs
Scheduled Action APIs
Alarm Trigger Policy APIs
Notification APIs
Lifecycle Hook APIs
Instance Refresh APIs
Other APIs
Data Types
Error Codes
Batch Compute
History
Introduction
API Category
Making API Requests
Compute Environment APIs
Configuration Viewing-related APIs
Task Template-related APIs
Job-related APIs
Data Types
Error Codes
Tencent Cloud Automation Tools
History
Introduction
API Category
Making API Requests
Remote Command APIs
Scheduled Execution APIs
Managed Instance APIs
Scenario APIs
Statistics APIs
Data Types
Error Codes
Edge Computing Machine
History
API Category
Making API Requests
Region APIs
Module APIs
Instance APIs
Image APIs
VPC APIs
Subnet APIs
Route Table APIs
CLB APIs
ENI APIs
EIP APIs
HAVIP APIs
Other API
Key APIs
Security Group APIs
Data Types
Error Codes
Tencent Kubernetes Engine
History
Introduction
API Category
Making API Requests
Elastic Cluster APIs
Resource Reserved Coupon APIs
Cluster APIs
Third-party Node APIs
Relevant APIs for Addon
Network APIs
Node APIs
Node Pool APIs
TKE Edge Cluster APIs
Cloud Native Monitoring APIs
Scaling group APIs
Super Node APIs
Other APIs
Data Types
Error Codes
TKE API 2022-05-01
Tencent Container Registry
History
Introduction
API Category
Making API Requests
Instance Management APIs
Namespace APIs
Access Control APIs
Instance Synchronization APIs
Tag Retention APIs
Trigger APIs
Helm Chart APIs
Image Repository APIs
Custom Account APIs
Data Types
Error Codes
Tencent Cloud Elastic Microservice
History
Introduction
API Category
Making API Requests
Environment APIs
ModifyIngress
Resource APIs
Application APIs
Service APIs
Application Deployment APIs
Access Policy APIs
Configuration file APIs
Log collecting APIs
Scaling Rule APIs
Application Version APIs
Other APIs
Workload APIs
Data Types
Error Codes
Serverless Cloud Function
History
Introduction
API Category
Making API Requests
Other APIs
Namespace APIs
Layer Management APIs
Async Event Management APIs
Trigger APIs
Function APIs
Function and Layer Status Description
Data Types
Error Codes
Event Bridge
History
Introduction
API Category
Making API Requests
Delivery Target APIs
Event Bus APIs
Event Rule APIs
Event Connector APIs
Data Transformer APIs
Event Storage APIs
Data Types
Error Codes
Cloud Object Storage
Introduction
Common Request Headers
Common Response Headers
Error Codes
Request Signature
Action List
Service APIs
Bucket APIs
Object APIs
Batch Operation APIs
Data Processing APIs
Job and Workflow
Content Moderation APIs
Cloud Antivirus API
Cloud File Storage
History
Introduction
API Category
Snapshot APIs
File system APIs
Lifecycle APIs
Other APIs
Data Flow APIs
Making API Requests
Permission Group APIs
Service APIs
Scaling APIs
Data Migration APIs
Data Types
Error Codes
Cloud Block Storage
History
Introduction
API Category
Making API Requests
Snapshot APIs
Cloud Disk APIs
Data Types
Error Codes
Cloud HDFS
History
Introduction
API Category
Making API Requests
Other APIs
Permission group APIs
Permission rule APIs
Mount point APIs
Lifecycle rule APIs
File system APIs
Restoration task APIs
Data Types
Error Codes
Cloud Log Service
History
Introduction
API Category
Making API Requests
Topic Management APIs
Log Set Management APIs
Index APIs
Topic Partition APIs
Machine Group APIs
Collection Configuration APIs
Log APIs
Metric APIs
Alarm Policy APIs
Data Processing APIs
Kafka Protocol Consumption APIs
Kafka Task APIs
Kafka Data Subscription APIs
COS Task APIs
SCF Delivery Task APIs
Scheduled SQL Analysis APIs
COS Data Import Task APIs
Data Types
Error Codes
TDSQL-C for MySQL
History
Introduction
API Category
Making API Requests
Instance APIs
Multi-Availability Zone APIs
Other APIs
Audit APIs
Database Proxy APIs
Backup and Recovery APIs
Parameter Management APIs
Billing APIs
serverless APIs
Resource Package APIs
Account APIs
Performance Analysis APIs
Data Types
Error Codes
TencentDB for MySQL
History
Introduction
API Category
Instance APIs
Making API Requests
Data Import APIs
Database Proxy APIs
Database Audit APIs
Security APIs
Task APIs
Backup APIs
Account APIs
Rollback APIs
Parameter APIs
Database APIs
Monitoring APIs
Log-related API
Data Types
Error Codes
TencentDB for MariaDB
History
Introduction
API Category
Making API Requests
Security Group APIs
Other APIs
Account APIs
Parameter Management APIs
Monitoring Management APIs
Instance Management APIs
Backup and Restoration APIs
Data Types
Error Codes
TencentDB for PostgreSQL
History
Introduction
API Category
Making API Requests
Instance APIs
Read-only Replica APIs
Backup and Recovery APIs
Parameter Management APIs
Security Group APIs
Performance Optimization APIs
Account APIs
Specification APIs
Network APIs
Data Types
Error Codes
TencentDB for SQL Server
History
Introduction
API Category
Making API Requests
Sales and fee related APIs
Instance Management related APIs
Operation and maintenance management related APIs
Network management related APIs
Account management related APIs
Database management related APIs
Security group management related APIs
Data security encryption related APIs
Parameter configuration related APIs
Extended Event related APIs
Log management related APIs
Read only instance management related APIs
Publish and subscribe related APIs
Backup related APIs
Data migration (cold standby migration) related APIs
Rollback related APIs
Data migration (DTS old version) related APIs
SQL Server Integration Services (SSIS) related APIs
Data Types
Error Codes
TDSQL for MySQL
History
Introduction
API Category
Security Group APIs
Other APIs
Making API Requests
TDSQL APIs
Data Types
Error Codes
Tencent Cloud Distributed Cache (Redis OSS-Compatible)
History
Introduction
API Category
Making API Requests
Instance APIs
Parameter Management APIs
Other APIs
Backup and Restoration APIs
Region APIs
Monitoring and Management APIs
Log APIs
Data Types
Error Codes
TencentDB for MongoDB
History
Introduction
API Category
Making API Requests
Instance APIs
Backup APIs
Account APIs
Other APIs
Task APIs
Introduction
Data Types
Error Codes
TencentDB for TcaplusDB
History
Introduction
API Category
Making API Requests
Table Group APIs
Other APIs
Table APIs
Cluster APIs
Data Types
Error Codes
Data Transfer Service
History
Introduction
API Category
Making API Requests
(NewDTS) Data Migration APIs
Data Sync APIs
Data Consistency Check APIs
(NewDTS) Data Subscription APIs
Data Types
Error Codes
DTS API 2018-03-30
TencentDB for DBbrain
History
Introduction
Introduction
API Category
Making API Requests
Session Killing APIs
Exception Detection APIs
Other APIs
Redis related APIs
Health Report Email Sending APIs
Space Analysis APIs
Security Audit APIs
Slow Log Analysis APIs
Database Audit APIs
Data Types
Error Codes
DBbrain APIs 2019-10-16
Virtual Private Cloud
History
Introduction
API Category
Making API Requests
VPC APIs
Route Table APIs
Elastic Public IP APIs
Elastic IPv6 APIs
Highly Available Virtual IP APIs
ENI APIs
Bandwidth Package APIs
NAT Gateway APIs
Direct Connect Gateway APIs
Cloud Connect Network APIs
Network ACL APIs
Network Parameter Template APIs
Network Detection-Related APIs
Flow Log APIs
Gateway Traffic Monitor APIs
Private Link APIs
Traffic Mirroring APIs
Other APIs
Subnet APIs
VPN Gateway APIs
Security Group APIs
Snapshot Policy APIs
Error Codes
Data Types
Cloud Load Balancer
History
Introduction
API Category
Instance APIs
Listener APIs
Backend Service APIs
Target Group APIs
Redirection APIs
Other APIs
Classic CLB APIs
Load Balancing APIs
Making API Requests
Data Types
Error Codes
CLB API 2017
Direct Connect
History
Introduction
API Category
Making API Requests
Direct Connect APIs
Data Types
Error Codes
Content Delivery Network
History
Introduction
API Category
Content Management APIs
Real-time Log APIs
Service Query APIs
Data Query APIs
Making API Requests
Log Query APIs
Domain Name Management APIs
Configuration Management APIs
Obsoleted APIs
Other APIs
Data Types
Error Codes
Global Application Acceleration Platform
History
Introduction
API Category
Rule APIs
Connection Group APIs
Making API Requests
Origin Server APIs
Listener APIs
Connection APIs
Certificate APIs
Other APIs
Data Types
Error Codes
Tencent Cloud Firewall
History
Introduction
API Category
Making API Requests
Intrusion Defense APIs
Access Control APIs
Other APIs
Enterprise Security Group APIs
Firewall Status APIs
Data Types
Error Codes
Tencent Cloud EdgeOne
History
Introduction
API Category
Making API Requests
Site APIs
Acceleration Domain Management APIs
Site Acceleration Configuration APIs
Edge Function APIs
Alias Domain APIs
Security Configuration APIs
Layer 4 Application Proxy APIs
Content Management APIs
Data Analysis APIs
Log Service APIs
Billing APIs
Certificate APIs
Origin Protection APIs
Load Balancing APIs
Diagnostic Tool APIs
Custom Response Page APIs
API Security APIs
DNS Record APIs
Content Identifier APIs
Legacy APIs
Ownership APIs
Image and Video Processing APIs
Multi-Channel Security Gateway APIs
Version Management APIs
Data Types
Error Codes
Cloud Workload Protection Platform
History
Introduction
API Category
Asset Management APIs
Virus Scanning APIs
Abnormal Log-in APIs
Password Cracking APIs
Malicious Request APIs
High-Risk Command APIs
Local Privilege Escalation APIs
Reverse Shell APIs
Vulnerability Management APIs
New Baseline Management APIs
Baseline Management APIs
Advanced Defense APIs
Security Operation APIs
Expert Service APIs
Other APIs
Overview Statistics APIs
Settings Center APIs
Making API Requests
Intrusion Detection APIs
Data Types
Error Codes
Key Management Service
History
Introduction
API Category
Key APIs
Making API Requests
Asymmetric Key APIs
Data Types
Error Codes
Secrets Manager
History
Introduction
API Category
Making API Requests
Data Security APIs
Other APIs
Data Types
Error Codes
Captcha
History
Introduction
API Category
Making API Requests
Server APIs
Error Codes
Customer Identity and Access Management
History
Introduction
API Category
Making API Requests
User Management APIs
Data Sync APIs
Audit Management APIs
Data Types
Error Codes
Security Token Service
History
Introduction
API Category
Making API Requests
STS APIs
Data Types
Error Codes
SSL Certificates
History
Introduction
API Category
Making API Requests
Certificate APIs
Certificate Renewal (Certificate ID Unchanged) APIs
CSR APIs
Data Types
Error Codes
Private DNS
History
Introduction
API Category
Making API Requests
Private DNS APIs
Data Types
Error Codes
DNSPod
History
Introduction
API Category
Making API Requests
Line APIs
Package and Value-Added Service APIs
Batch Operation APIs
Group APIs
Record APIs
DNS Query Volume APIs
Alias APIs
Domain APIs
Data Types
Error Codes
Elastic MapReduce
History
Introduction
API Category
Cluster Resource Management APIs
Cluster Services APIs
User Management APIs
Data Inquiry APIs
Scaling APIs
Configuration APIs
Other APIs
Serverless HBase APIs
YARN Resource Scheduling APIs
Making API Requests
Data Types
Error Codes
Elasticsearch Service
History
Introduction
API Category
Instance APIs
Making API Requests
Data Types
Error Codes
Data Lake Compute
History
Introduction
API Category
Making API Requests
Data Table APIs
Task APIs
Metadata APIs
Service Configuration APIs
Permission Management APIs
Database APIs
Data Source Connection APIs
Data Optimization APIs
Data Engine APIs
Resource Group for the Standard Engine APIs
Data Types
Error Codes
Face Recognition
History
Introduction
API Category
Making API Requests
Face Detection and Analysis APIs
Facial Feature Localization APIs
Face Comparison APIs
Group Management APIs
Face Search APIs
Face Verification APIs
Image-based Liveness Detection (High Precision) APIs
Data Types
Error Codes
eKYC
History
Introduction
API Category
Making API Requests
Selfie Verification (Pure API) APIs
Selfie Verification (App SDK) APIs
Identity Verification (App SDK) APIs
Identity Verification(Mobile HTML5) APIs
AI Face Shield (Pure API) APIs
Other APIs
Data Types
Error Codes
Text To Speech
History
Introduction
API Category
Making API Requests
General Text-to-Speech APIs
Data Types
Error Codes
Tencent Machine Translation
History
Introduction
API Category
Making API Requests
APIs
Error Codes
Optical Character Recognition
History
Introduction
API Category
Making API Requests
Document Intelligent APIs
Card and Document OCR APIs
General Text OCR APIs
Vehicle Scene OCR APIs
Data Types
Error Codes
IoT Hub
History
Introduction
API Category
Making API Requests
Device Shadow APIs
Device APIs
CA Certificate APIs
Product APIs
Data Types
Error Codes
TDMQ for CKafka
History
Introduction
API Category
Making API Requests
Other APIs
ACL APIs
Instance APIs
Routing APIs
DataHub APIs
Topic APIs
Data Types
Error Codes
Cloud Message Queue
History
API Category
Making API Requests
Topic APIs
Queue APIs
Introduction
Data Types
Error Codes
Chat
JavaScript
Android
iOS & macOS
Swift
Flutter
Electron
Unity
React Native
C APIs
C++
Short Message Service
History
Introduction
API Category
Making API Requests
SMS Mobile Number APIs
SMS Conversion Rate APIs
Status Pull APIs
SMS Statistics APIs
SMS Signature APIs
SMS Delivery APIs
SMS Template APIs
Data Types
Error Codes
SMS Callback APIs
Tencent Push Notification Service
Overview
API Overview
Call Method
Push APIs
Tag APIs
Account APIs
Statistics APIs
User Attribute APIs
Server-Side Error Codes
Server SDKs
API (Java)
Simple Email Service
History
Introduction
API Category
Making API Requests
Domain Verification APIs
Mail APIs
Template APIs
Statistics APIs
Sender Address APIs
Blocklist APIs
Sending Status Query APIs
Batch Task APIs
Custom Blocklist APIs
Data Types
Error Codes
Tencent Real-Time Communication
History
Introduction
API Category
Room Management APIs
Stream mixing and relay APIs
On-cloud recording APIs
Data Monitoring APIs
Pull stream Relay Related interface
Web Record APIs
AI Service APIs
Cloud Slicing APIs
Cloud Moderation APIs
Making API Requests
Call Quality Monitoring APIs
Usage Statistics APIs
Data Types
Appendix
Error Codes
StreamLive
History
Introduction
API Category
Making API Requests
Input Management APIs
Input Security Group Management APIs
Channel Management APIs
Plan APIs
Watermark Management APIs
Statistics APIs
Data Types
Error Codes
StreamPackage
History
Introduction
API Category
Making API Requests
Channel Management APIs
Advertising Insertion Configuration Management APIs
Channel linear assembly management APIs
VOD remux task APIs
Usage Query APIs
HarvestJob Management APIs
Data Types
Error Codes
StreamLink
History
API Category
Making API Requests
Flow APIs
Data Types
Error Codes
Cloud Streaming Services
History
Introduction
API Category
Making API Requests
Live Pad APIs
Live Stream Mix APIs
Time Shifting APIs
Monitoring Data Query APIs
Billing Data Query APIs
Live Transcoding APIs
Delayed Playback Management APIs
Domain Name Management APIs
Watermark Management APIs
Certificate Management APIs
Stream Pulling APIs
Recording Management APIs
Live Callback APIs
Screencapturing and Porn Detection APIs
Authentication Management APIs
Live Stream Management APIs
Data Types
Error Codes
Video on Demand
History
Introduction
API Category
Other APIs
Media Processing APIs
Task Management APIs
Media Upload APIs
Media Management APIs
Event Notification Relevant API
Media Categorization APIs
Domain Name Management APIs
Distribution APIs
AI-based Sample Management APIs
Region Management APIs
Data Statistics APIs
Carousel-Related APIs
Just In Time Transcode APIs
No longer recommended APIs
Making API Requests
AI-based image processing APIs
Parameter Template APIs
Task Flow APIs
Data Types
Error Codes
Video on Demand API 2024-07-18
Media Processing Service
History
Introduction
API Category
Making API Requests
Processing Task Initiation APIs
Task Management APIs
Transcoding and Enhancement Template APIs
Watermark Template APIs
Screenshot Template APIs
Media AI Template APIs
Media AI—Hotword Lexicon APIs
Media AI—Sample Management APIs
Media Quality Inspection Template APIs
Live Streaming Recording Template APIs
Orchestration Management APIs
Data Statistics APIs
StreamLink—Security Group Management APIs
Other APIs
Image Processing Template APIs
AI Generation APIs
Other APIs
Data Types
Error Codes
Cloud Application Rendering
History
Introduction
API Category
Making API Requests
User APIs
Application Management APIs
Project Management APIs
Concurrency Management APIs
Stream Push Service APIs
Data Types
Error Codes
Game Multimedia Engine
History
Introduction
API Category
Usage APIs
Recording APIs
Making API Requests
Voice Chat APIs
Application APIs
Data Types
Error Codes
Tag
History
Introduction
API Category
Making API Requests
Write APIs
Read APIs
Project APIs
Data Types
Error Codes
Cloud Access Management
History
Introduction
API Category
Making API Requests
User APIs
Policy APIs
Role APIs
Identity Provider APIs
Data Types
Error Codes
CloudAudit
History
Introduction
API Category
Calling Method
CloudAudit APIs
Data Types
Error Codes
Tencent Cloud Organization
History
Introduction
API Category
Making API Requests
Organization Settings APIs
Department and Member Management APIs
Unified Member Login APIs
Member Access Management APIs
Organization Service Management APIs
Organization Management Policy APIs
Resource Sharing APIs
Identity Center Management APIs
Identity Center User Management APIs
Identity Center User Group Management APIs
Identity Center Management SCIM Synchronization APIs
Identity Center Single Sign-On Management APIs
Identity Center Permission Configuration Management APIs
Identity Center Multi-Account Authorization Management APIs
Identity Center Sub-User Synchronization Management APIs
Data Types
Error Codes
TCO API 2018-12-25
Tencent Cloud Observability Platform
History
Introduction
API Category
Making API Requests
Monitoring Data Query APIs
Alarm APIs
Legacy Alert APIs
Notification Template APIs
TMP APIs
Grafana Service APIs
Event Center APIs
TencentCloud Managed Service for Prometheus APIs
Monitoring APIs
Data Types
Error Codes
Real User Monitoring
History
Introduction
API Category
Making API Requests
Console APIs
Business System and Project Information APIs
Custom Speed Test APIs
Custom Event APIs
API Monitoring APIs
Exception Analysis APIs
Page View APIs
Static Resource Monitoring APIs
Log APIs
Page Performance APIs
Data Types
Error Codes
International Partners
History
Introduction
API Category
Making API Requests
Customer Management APIs
Credit Management APIs
Agent APIs
Bill Management APIs
Voucher Management APIs
Commission Management APIs
Data Types
Error Codes
Billing Center
API Category
Funds Management APIs
Order Management APIs
Resource Management APIs
Bill Management APIs
Cost Allocation Management APIs
Cost Management APIs
Making API Requests
Organization Account APIs
Data Types
Error Codes
TDSQL Boundless
History
Introduction
API Category
Making API Requests
Instance APIs
Security Group APIs
Task APIs
Backup APIs
Rollback APIs
Parameter APIs
Database APIs
Data Types
Error Codes
TDMQ for MQTT
History
Introduction
API Category
Making API Requests
Cluster APIs
Topic APIs
Authorization Policy APIs
User APIs
Client APIs
Message APIs
Message Enhancement Rule APIs
Data Types
Error Codes
Tencent HY
History
Introduction
API Category
Making API Requests
Hunyuan Text APIs
Hunyuan 3D APIs
Data Types
Error Codes
Smart Media Hosting
History
Introduction
API Category
Making API Requests
PaaS Service APIs
Official Cloud Disk APIs
Data Types
Error Codes
Quota Center
History
Introduction
API Category
Making API Requests
Alarm APIs
Data Types
Error Codes
Message Center
History
Introduction
API Category
Making API Requests
Message Subscription APIs
Data Types
Error Codes
Business Intelligence
History
Introduction
API Category
Making API Requests
Project Management APIs
Role APIs
Database Table APIs
Report Embedding APIs
Page Management APIs
Data Types
Error Codes
LLM Knowledge Engine Basic API
History
Introduction
API Category
Making API Requests
Atomic Capability APIs
Data Types
Error Codes
Tencent Cloud Agent Development Platform
History
API Category
Making API Requests
Atomic Capability APIs
Operation Optimization APIs
Document Library APIs
Q&A Database APIs
Knowledge Tag APIs
Application Management APIs
Enterprise Management APIs
Billing APIs
Release Management APIs
Dialogue Endpoint APIs
Data Statistics APIs
Data Types
Error Codes
Tencent Cloud Blockchain as a Service
History
Introduction
API Category
Making API Requests
Hyperledger Fabric 2.3 APIs
Data Types
Error Codes
Performance Testing Service
History
Introduction
API Category
Making API Requests
PTS-related APIs
Data Types
Error Codes
Real-time Teleoperation
History
Introduction
API Category
Making API Requests
Project APIs
Device APIs
Session APIs
Authorization APIs
Other APIs
Data Types
Error Codes
Gateway Load Balancer
History
Introduction
API Category
Making API Requests
Target Group APIs
GWLB APIs
Other APIs
Data Types
Error Codes
Identity Aware Platform
History
Introduction
API Category
Making API Requests
IAP APIs
Error Codes
Cloud Dedicated Cluster
History
Introduction
API Category
Making API Requests
Cloud Dedicated Cluster (CDC) APIs
Data Types
Error Codes
Image Creation Large Model
History
Introduction
API Category
Making API Requests
Image Style Transfer APIs
Data Types
Error Codes
Face Fusion
API Category
Making API Requests
Image Face Fusion (Basic) APIs
Video Face Fusion (Single Face) APIs
Data Types
Error Codes
Tencent Smart Advisor-Chaotic Fault Generator
History
Introduction
API Category
Making API Requests
Task APIs
Template Library APIs
Data Types
Error Codes
Tencent HealthCare Omics Platform
History
Introduction
API Category
Making API Requests
Environment Management APIs
Tencent Healthcare Omics Platform APIs
Data Types
Error Codes
Tencent Cloud TCHouse-D
History
Introduction
API Category
Making API Requests
Cluster Operation APIs
Database and Table APIs
Cluster Information Viewing APIs
Hot-Cold Data Layering APIs
Database and Operation Audit APIs
User and Permission APIs
Resource Group Management APIs
Data Types
Error Codes
Tencent Cloud WeData
History
Introduction
API Category
Making API Requests
Project Management APIs
Smart Ops Related Interfaces
Resource Group APIs
Data Development APIs
Data Asset - Data Dictionary APIs
Data Development APIs
Ops Center APIs
Data Exploration APIs
Data Operations Related Interfaces
Asset APIs
Metadata Related Interfaces
Task Operations APIs
Data Security APIs
Instance Operation and Maintenance Related Interfaces
Data Map and Data Dictionary APIs
Data Quality Related Interfaces
DataInLong APIs
Platform Management APIs
Data Source Management APIs
Data Quality APIs
Platform Management APIs
Asset Data APIs
Data Source Management APIs
Data Types
Error Codes
WeData API 2025-08-06
Anti-DDoS
History
Introduction
API Category
Making API Requests
Anti-DDoS Advanced Instance APIs
Resource List APIs
Protection Configuration APIs
Other APIs
Alarm Notification APIs
Connection Configuration APIs
Intelligent Scheduling APIs
Black hole unblocking APIs
Statistical Report APIs
Data Types
Error Codes
Cloud Contact Center
History
Introduction
API Category
Making API Requests
Agent APIs
Skill Group APIs
Number APIs
Dual Call APIs
Predictive Outbound Call APIs
SIP Phone APIs
Call Service Record APIs
Billing APIs
Other APIs
Outbound Call APIs
Speech Intelligent Agent APIs
Data Types
Error Codes
Tencent Cloud Super App as a Service
History
Introduction
API Category
Making API Requests
Operation Management APIs
Platform Management APIs
Sensitive API-Related APIs
Role Management APIs
Team Management APIs
Other Console APIs
Mini Program or Mini Game APIs
Management-Sensitive APIs
Global Domain Management APIs
Superapp APIs
User Management APIs
Data Types
Tencent Cloud Smart Advisor
History
Introduction
API Category
Making API Requests
Other APIs
Task APIs
Cloud Architecture Console APIs
Data Types
Error Codes
TDMQ for RabbitMQ
History
Introduction
API Category
Making API Requests
Relevant APIs for RabbitMQ Serverless PAAS Capacity
RabbitMQ Serverless Instance Management APIs
Data Types
Error Codes
Control Center
History
Introduction
API Category
Making API Requests
Account Factory APIs
Data Types
Error Codes
TDMQ for CMQ
API Documentation
API 2.0 to 3.0 Switch Guide
Tencent Cloud TCHouse-P
History
Introduction
API Category
Making API Requests
Information Query APIs
Instance APIs
Query APIs
Cluster Management APIs
Cluster Operation APIs
Data Types
Error Codes
TDMQ for RocketMQ
History
API Category
Making API Requests
Topic APIs
Consumer Group APIs
Message APIs
Role Authentication APIs
Hitless Migration APIs
Cloud Migration APIs
Cluster APIs
Data Types
Error Codes
Cloud Dedicated Zone
History
Introduction
API Category
Making API Requests
Availability Zone APIs
Data Types
Error Codes
Tencent Cloud Health Dashboard
History
Introduction
API Category
Making API Requests
Event APIs
Data Types
Error Codes
Application Performance Management
History
Introduction
API Category
Making API Requests
Application APIs
Business System APIs
General Query APIs
Unavailable APIs
Performance Analysis APIs
Data Types
Error Codes
Config
History
Introduction
API Category
Making API Requests
Rule APIs
Resource APIs
Data Types
Error Codes
Automatic Speech Recognition
History
Introduction
API Category
Making API Requests
Recording Recognition APIs
Real-Time Speech Recognition APIs
Data Types
Error Codes
Tencent Cloud TI Platform
History
Introduction
API Category
Making API Requests
Online Service APIs
Data Types
Error Codes
Web Application Firewall
History
Introduction
API Category
Making API Requests
Asset Management APIs
Billing APIs
Protection Settings APIs
Other APIs
IP Management APIs
Integration APIs
Log Service APIs
Security Overview APIs
Rule Engine APIs
Data Types
Error Codes
Cloud Security Center
History
Introduction
API Category
Making API Requests
Multi-account management related APIs
Scan Task APIs
Risk Center APIs
Asset Center APIs
Cloud Boundary Analysis APIs
Cloud API Anomaly Detection APIs
Report Download APIs
Solid Protection APIs
Cloud Security Center Overview APIs
Data Types
Error Codes
Risk Control Engine
History
Introduction
API Category
Making API Requests
TencentCloud API APIs
Data Types
Error Codes
TencentDB for CTSDB
History
Introduction
API Category
Making API Requests
Instance APIs
Database APIs
Data Types
Error Codes
Tencent Interactive Whiteboard
History
Introduction
API Category
Making API Requests
Whiteboard Push APIs
Other APIs
Document Transcoding APIs
Real-Time Recording APIs
Statistics Query APIs
Whiteboard Snapshot APIs
Recording Video Generation APIs
Data Types
Error Codes
Tencent Container Security Service
History
Introduction
API Category
Making API Requests
Network Security APIs
Cluster Security APIs
Security Compliance APIs
Runtime security - High-risk syscalls
Runtime Security - Reverse Shell APIs
Runtime Security APIs
Alert Settings APIs
Advanced prevention - K8s API abnormal requests
Asset Management APIs
Security Operations - Log Analysis APIs
Runtime Security - Trojan Call APIs
Runtime Security - Container Escape APIs
Image Security APIs
Billing APIs
Data Types
Error Codes
Domains
History
Introduction
API Category
Making API Requests
Domain Management APIs
Domain Query APIs
Bulk Operation APIs
Registrant Profile APIs
Other APIs
Data Types
Error Codes
Low-code Interactive Classroom
History
Introduction
API Category
Making API Requests
User Login APIs
Room Management APIs
Group Management APIs
Application Configuration APIs
Recording Management APIs
Courseware Management APIs
User Management APIs
Developer APIs
Data Types
Error Codes

Push API

포커스 모드
폰트 크기
마지막 업데이트 시간: 2024-01-17 14:24:51

API Calling Description

Request method: POST.
Service URL/v3/push/app
The API service address corresponds to the service access point one by one; therefore, please select the service address corresponding to your application service access point.
Feature: Push API is the general term for all push APIs. Push API supports different push targets. All request fields are JSON encapsulated and uploaded to the backend, which differentiates push targets based on the request parameters. If an error code is returned, see Server-Side Error Codes.
Note:
Based on the needs of business optimization, Tencent Push Notification Service limits the frequency of push to all devices, push to devices with specified tags, and push by account package through the console and API to one message per second.
If the frequency is exceeded, a push exception may occur. If you need a higher frequency, contact our online customer service.

Required Parameters

The required push parameters refer to the parameters that must be carried in a push message.
Parameter
Type
Required
Description
audience_type
String
Yes
Push target. Valid values:
all: Push to all devices
tag: Push to devices with specific tags
token: Push to a single device
token_list: Push to a list of devices
account: Push to a single account
account_list: Push to a list of accounts
package_account_push: Push by account package
package_token_push: Push by token package
message
Object
Yes
Message body. For more information, see [message body type](#message body type).
message_type
String
Yes
Message type. Valid values:
notify: Notification
message: In-app message/Silent message
environment
String
Yes (only for iOS)
Push environment (only available for pushes on iOS). Valid values:
product: Production environment
dev: Development environment
The phone registration environment and push environment must be consistent. For more information, see
upload_id
Integer
Yes (only available for push by account/token package)
Account/Token package upload ID

audience_type: Push target

Push target indicates the devices a push can be delivered to. Push API supports a variety of push targets, such as all devices, devices with specified tags, a single device, a list of devices, a single account, or a list of accounts.
Push Target
Description
Required Parameters and Instructions
all
Push to all devices
None
tag
Push to devices with specific tags
tag_rules(recommended):
Push by a combination of tags. You can set 'AND', 'OR' and 'NOT' rules.
Note:If both tag_rulesand tag_listare specified,tag_listbecomes invalid automatically. For parameter descriptions, see Tag combination rules .
tag_list(no further updates):
Push to devices with tag1 and tag2 {"tags":["tag1","tag2"],"op":"AND"}
Push to devices with tag1 or tag2 {"tags":["tag1","tag2"],"op":"OR"}
A tag list cannot exceed 512 characters
token
Push to a single device
token_list
If the parameter contains multiple tokens, messages are pushed to the device with the first token only.
Format example: ["token1"]
A token string cannot exceed 36 characters.
token_list
Push to a list of devices
token_list
Up to 1,000 tokens
Format example: ["token1","token2"]
A token string cannot exceed 36 characters.
Note:If the token list contains more than 1,000 tokens, the push will fail. To push messages to devices corresponding with more than 1,000 tokens, we recommend you use theToken Package Upload API.
account
Push to a single account
account_list
If the parameter contains multiple accounts, messages are pushed to the first account only.
Format example: ["account1"]
account_list
Push to a list of accounts
account_list
Up to 1,000 accounts
Format example: ["account1","account2"]
Note:If the account list contains more than 1,000 accounts, the push will fail. To push messages to more than 1,000 accounts, you are recommended to use the Account Package Upload API.
package_account_push
Push by account package
Required for uploading the account package to push
package_token_push
Push by token package
Required for uploading the token package to push
Push to all devices
{
"audience_type": "all"
}
Push to devices with specified tags (using tag_rules): Push to male users who were active on April 8, 2020 in Guangdong or Hunan province
{
"audience_type": "tag",
"tag_rules": [
{
"tag_items": [
{
"tags": [
"guangdong",
"hunan"
],
"is_not": false,
"tags_operator": "OR",
"items_operator": "OR",
"tag_type": "xg_auto_province"
},
{
"tags": [
"20200408"
],
"is_not": false,
"tags_operator": "OR",
"items_operator": "AND",
"tag_type": "xg_auto_active"
},
{
"tags": [
"male"
],
"is_not": false,
"tags_operator": "OR",
"items_operator": "AND",
"tag_type": "xg_user_define"
}
],
"operator": "OR",
"is_not": false
}
]
}
Push to a single device: Push to the device with token1 as the token
{
"audience_type": "token",
"token_list": [
"token1"
]
}
Push to a list of devices: Push to devices with token1 and token2 as their tokens
{
"audience_type": "token_list",
"token_list": [
"token1",
"token2"
]
}
Push to a single account: Push to the device bound to account1
{
"audience_type": "account",
"account_list": [
"account1"
]
}
Push to a list of accounts: Push to devices bound to account1 and account2
{
"audience_type": "account_list",
"account_list": [
"account1",
"account2"
]
}

message_type: Message type

The message types may vary slightly by platform. For more information, see the table:
Message Type
Description
Supported Platform
Feature Description
notify
Notification bar message
Android and iOS
Messages are displayed in the notification bar.
Note: This parameter is mutually exclusive with content-available: 1. Do not use them at the same time.
message
In-app message or silent message
Android (in-app message)
iOS (silent message)
Messages are not displayed in the notification bar.
Note: Due to vendor restrictions, Android in-app messages can be delivered only through the Tencent Push Notification Service channel, but not vendor channels.

message: Message body

The message body is the message delivered to the client. Push API handles messages on iOS and Android differently, so message pushes are implemented for the two platforms separately. The push message body is in the JSON format.

General message on Android

The table specifies parameters for the Android platform:
Parameter
Type
Parent Project
Default Value
Required
Description
title
String
message
Empty
Yes
Message title
content
String
message
Empty
Yes
Message content
accept_time
Array
message
Empty
No
The time period that allows pushes.
A single element is formed by a "start" time and an "end" time.
"start" and "end" are expressed in hour and minute. For more information, see the samples.
Note: Due to vendor restrictions, this is valid only for the Tencent Push Notification Service channel.
thread_id
String
message
Empty
No
Thread ID for collapsed notification in threaded display. Note: Due to vendor restrictions, this is valid only for the Tencent Push Notification Service channel.
thread_sumtext
String
message
Empty
No
Summary displayed after the notification is collapsed in a thread, which is valid if thread_id is not empty. Note: Due to vendor restrictions, this is valid only for the Tencent Push Notification Service channel.
xg_media_resources
String
message
Empty
No
URL of large image in the notification bar, which takes effect only for the Tencent Push Notification Service and Mi channels. Note: To use the big image notification feature of the Mi channel, you need to call the Mi image uploading API to upload an image file, get the pic_url image address specified by Mi, and enter it in the xg_media_resources parameter of Tencent Push Notification Service. For more information, see the image uploading API section in Rich Text Message in Mi Push.
xg_media_audio_resources
String
message
Empty
No
URL of audio rich media elements. It supports audio in MP3, with a recommended size not exceeding 5 MB. Note: This parameter is valid only for the Tencent Push Notification Service channel.
android
Object
message
Empty
No
Structure of advanced settings for Android notification. For more information, see Android structure description.

Android structure description

Parameter
Type
Parent Project
Default Value
Required
Description
n_ch_id
String
android
Empty
No
Notification channel ID (valid only for the Tencent Push Notification Service channel). For more information, see "Creating a notification channel" in API Documentation.
n_ch_name
String
android
Empty
No
Notification channel name (valid only for the Tencent Push Notification Service channel). For more information, see "Creating a notification channel" in API Documentation.
xm_ch_id
String
android
Empty
No
Mi channel ID (valid only for the Mi channel)
fcm_ch_id
String
android
Empty
No
FCM channel ID (valid only for the FCM channel)
hw_biz_type
Integer
android
0
No
Whether to enable notifications for Huawei quick apps. Valid values:
1: Enable
0: Disable
Note: This parameter takes effect only for the Huawei channel and you need tocontact Huawei business team for activation.
hw_ch_id
String
android
Empty
No
Huawei channel ID (valid only for the Huawei channel)
hw_category
String
android
Empty
No
Huawei message type, which identifies the message reminding method and accelerates sending messages of the specific type. For more information, see the category
IM: Instant messaging
VOIP: Audio/video call
SUBSCRIPTION: Subscription
hw_importance
Integer
android
Empty
No
Message reminding level. Valid values:
1: Silent reminder in the notification bar, where there are no ringtone and vibration when a message arrives.
2: Strong reminder in the notification bar, where ringtone and vibration are used to remind the user when a message arrives. The actual message reminding method will be adjusted according to the hw_category field value or smart categorization result.
oppo_ch_id
String
android
Empty
No
OPPO channel ID (valid only for the OPPO channel)
vivo_ch_id
String
android
0
No
vivo channel ID (valid only for the vivo channel). Valid values: 0 for operation message, and 1 for System message
n_id
Integer
android
0
No
(This parameter has been disused and will be unavailable in the future. If you need the override feature, use the overriding parameter collapse_id.) A unique ID of the notification message object (valid only for the Tencent Push Notification Service channel) (1) Greater than 0: Overrides the previous message with the same ID (2) Equal to 0: Displays this message without affecting other messages (3) Equal to -1: Clears all previous messages and displays this message only.
builder_id
Integer
android
0
No
Local notification style identifier
badge_type
Integer
android
-1
No
Notification badge:
-2: Automatically increased by 1, valid only for Huawei devices
-1: Unchanged, valid only for Huawei and vivo devices
[0, 100): Direct configuration, valid only for Huawei and vivo devices
Note: The badge adaptation capabilities vary depending on the vendor device. For details about the implementation effect of each parameter value, see Badge Adaptation Guide.
ring
Integer
android
1
No
Whether there is a ringtone. Valid values:
0: No
1: Yes
ring_raw
String
android
Empty
No
Name of the ringtone file in the raw directory of the Android project; no extension is needed. Note: Custom ringtones are supported only for the Huawei, Mi, FCM, and Tencent Push Notification Service channels and must be used with the field n_ch_id. For the configuration process, see How do I set a custom ringtone?.
vibrate
Integer
android
1
No
Whether to enable vibration. Valid values:
0: No
1: Yes
lights
Integer
android
1
No
Whether to use the breathing light. Valid values:
0: No
1: Yes
clearable
Integer
android
1
No
Whether messages can be cleared from the notification bar.
icon_type
Integer
android
0
No
Whether the notification bar thumbnail is an in-app icon or an online resource icon. Valid values:
0: In-app icon (for the Tencent Push Notification Service channel only).
1: Online resource icon. This parameter is supported only for the Tencent Push Notification Service, FCM, Huawei, and HONOR channels.
icon_res
String
android
N/A
No
Specifies image resource of the notification bar thumbnail.
If icon_type is 0, enter the filename (without extension) of the image resource in the Android application (for the Tencent Push Notification Service channel only).
If icon_type is 1, enter the URL of the thumbnail. For more information on the thumbnail formats, see Rich Media Notification. This parameter is supported only for the Tencent Push Notification Service, FCM, Huawei, and HONOR channels.
style_id
Integer
android
1
No
Whether the notification style with the specified number will be overwritten
small_icon
String
android
Empty
No
The icon that the message displays in the status bar. If this parameter is not set, the application icon will be displayed.
icon_color
Integer
android
0
No
Color of the icon in the notification bar
This parameter takes effect only for the Tencent Push Notification Service channel.
To use an RGB color such as #01e240, enter 123456.
action
Object
android
Yes
No
The action after the notification bar is clicked; the default action is to open the app. For more information, see action parameter description.
custom_content
String
android
N/A
No
A custom parameter (which should be serialized into a JSON string). For how to obtain this parameter, see [Notification Tap-to-Redirect-Getting parameters on the client](https://www.tencentcloud.com/document/product/1024/38354)
Note: Huawei officially announced that "the v2 protocol will be disused starting September 30, 2021". Tencent Push Notification Service has upgraded the Huawei push protocol to v5, which does not support carrying custom parameters through the extra parameter(s) field. If you have integrated the Huawei channel, we recommend you use Intent to carry custom parameters; otherwise, custom parameters cannot be delivered through the Huawei channel.
show_type
Integer
android
2
No
Whether to display the notification when the application is running in the foreground, which is displayed by default. This parameter takes effect only for the Tencent Push Notification Service and FCM channels. Valid values:
1: No
2: Yes Note: If the value is 1 and the application is running in the foreground, this push is imperceptible to end users, but arrival data will be reported.
action parameter description
Parameter
Type
Parent Project
Default Value
Required
Description
action_type
Integer
action
1
No
One-click actions. Valid values:
1: Open activity or the application
2: Open the browser
3: Open the application's custom page (recommended; for more information, see here).
activity
String
action
Empty
Yes if action_type is 1 and an activity needs to be opened
Full name of activity, such as com.x.y.PushActivity
aty_attr
Object
action
Empty
No if action_type is 1 and an activity needs to be opened
Activity attribute
if: Flag attribute of Intent in Integer type
pf: Flag attribute of PendingIntent in Integer type
browser
Object
action
Empty
Yes if action_type is 2
Action to open a browser
url: Webpage URL in String type. Only HTTP and HTTPS URLs are supported
confirm: Whether user's confirmation is required. The value is in Integer type.
1: Yes
0: No
intent
String
action
Empty
Yes if action_type is 3
Custom scheme, such as xgscheme://com.tpns.push/notify_detail
Below is a sample of a complete message:
{
"title": "xxx",
"content": "xxxxxxxxx",
"xg_media_resources": "xxx" , // Enter the URL of rich media elements, such as `https://www.xx.com/img/bd_logo1.png?qua=high`
"xg_media_audio_resources":"xxx", // Enter the URL of audio rich media elements, such as `http://sc1.111ttt.cn/2018/1/03/13/396131227447.mp3`
"thread_id":"Activity_id",
"thread_sumtext":"Operational activity",
"accept_time": [
{
"start": {// Period start time
"hour": "13",// Start time in hour. Value range: [0,24)
"min": "00"// Start time in minute. Value range: [0,60)
},
"end": {// Period end time
"hour": "14",// End time in hour. Value range: [0,24)
"min": "00" // End time in minute. Value range: [0,60)

}
},
{
"start": {
"hour": "00",
"min": "00"
},
"end": {
"hour": "09",
"min": "00"
}
}
],
"android": {
"n_ch_id": "default_message",
"n_ch_name": "default notification",
"n_id": 0,
"builder_id": 0,
"ring": 1,
"ring_raw": "ring",
"badge_type":-1,
"vibrate": 1,
"lights": 1,
"clearable": 1,
"icon_type": 0,
"icon_res": "xg",
"style_id": 1,
"small_icon": "xg",
"action": {
"action_type": 1,// Action type; 1. Open activity or application; 2. Open browser; 3. Open Intent
"activity": "com.x.y.PushActivity",
"aty_attr": {// Activity attribute, only for action_type=1
"if": 0, // Intent's flag attribute
"pf": 0 // PendingIntent's flag attribute
},
"browser": {
"url": "https://cloud.tencent.com ", // Only HTTP and HTTPS URLs are supported
"confirm": 1 // Whether user's confirmation is required
},
"intent": "xgscheme://com.tpns.push/notify_detail" //The SDK must be version 1.0.9 or later. Configure the data tag in the client's Intent and set the scheme attribute
},
"custom_content":"{\\"key\\":\\"value\\"}"
}
}

Notification message on iOS

The table below specifies parameters for the iOS platform.
Parameter
Type
Parent Project
Default Value
Required
Description
title
String
message
Empty
Yes
Message title, which will override the content in title under alert.
content
String
message
Empty
Yes
Message content, which will override the content in body under alert.
thread_id
String
message
Empty
No
Thread ID for collapsed notification in threaded display
ios
Object
message
Empty
Yes
iOS message structure. See iOS parameter description for more information.
show_type
Integer
message
2
No
Whether to display the notification when the application is running in the foreground. Valid values:
1: No
2: Yes
Note: If the value is 1 and the application is running in the foreground, this push is imperceptible to end users, but arrival data will be reported.
xg_media_resources
String
message
Empty
No
URL of rich media elements such as image, audio, and video. For more information, see Rich Media Notification.

iOS parameter description

Field
Type
Parent Project
Default Value
Required
Description
aps
Object
ios
Empty
Yes
APNs-specific parameter. For more information, see aps parameter description. For further information, see Payload.
custom_content
String
ios
Empty
No
Custom parameter for delivery, which must be serialized to a JSON string.
aps parameter description
Parameter
Type
Parent Project
Default Value
Required
Description
alert
Object
aps
Empty
Yes
Contains the title and message content.
badge_type
Integer
aps
Empty
No
User-configured badge number. Valid values:
-1: The badge number does not change.
-2: The badge number automatically increases by 1.
>=0: A custom badge number is configured.
category
String
aps
Empty
No
Action identifier displayed when the message is pulled down.
mutable-content
Integer
aps
1
No
This is an additional notification field that carries "mutable-content" during push.
1 means that the Service Extension supports iOS 10.
Once enabled, the push details will include the arrival data report.
Before using this feature, see Notification Service Extension to implement the Service Extension API. If mutable-content is not carried, arrival data will not be reported.
sound
String
aps
Empty
No
Use instructions:
To play the system default ringtone, use "sound":"default"
To play local custom ringtone, use "sound":"chime.aiff"
To mute, use "sound":"" or remove the sound parameter.
Note: If you want to use a custom ringtone, the ringtone must be in Linear PCM, MA4 (IMA/ADPCM), alaw, or μLaw format, saved in the bundle directory of the project, and last for 30 seconds at most; otherwise, the system default ringtone will be used.
interruption-level
String
aps
active
No
Valid only for devices with iOS 15 or later. It needs to enable Time Sensitive Notifications in Capabilities. There are four interruption levels:
passive: Indicates notifications not requiring immediate attention.
active: Indicates default notifications.
time-sensitive: Indicates notifications requiring immediate attention.
critical: Indicates highly important notifications requiring immediate attention.

Below is a sample of a complete message:
{
"title": "xxx",
"content": "xxxxxxxxx",
"thread_id":"Activity_id",
"xg_media_resources":"https://www.xx.com/img/bd_logo1.png",
"show_type":1,
"ios":{
"aps": {
"alert": {
"subtitle": "my subtitle"
},
"badge_type": 5,
"category": "INVITE_CATEGORY",
"sound":"default",
"interruption-level":"time-sensitive",
"mutable-content":1
},
"custom_content":"{\\"key\\":\\"value\\"}"
}
}

In-app message on Android

In-app message is unique to the Android platform and not displayed in the notification bar of the mobile phone. It can be used to deliver controlled messages to users imperceptibly.
Note:
Due to vendor restrictions, Android in-app messages can be delivered through only the Tencent Push Notification Service channel and cannot be delivered through vendor channels.
The table specifies parameters for the Android platform:
Parameter
Type
Parent Project
Default Value
Required
Description
title
String
message
Empty
Yes
Command description
content
String
message
Empty
Yes
Command content
android
Object
message
Empty
No
Android message structure
accept_time
Array
message
Empty
No
The time period that allows pushes.
A single element is formed by a "start" time and an "end" time.
"start" and "end" are indicated by hour and minute. For more information, see the samples.
Note: This is valid only for the Tencent Push Notification Service channel due to vendor restrictions.
custom_content
String
android
Empty
No
Custom content, which must be serialized to a JSON string
Complete sample:
{
"title": "this is title",
"content": "this is content",
"android": {
"custom_content":"{\\"key\\":\\"value\\"}"
},
"accept_time": [
{
"start": {
"hour": "13",
"min": "00"
},
"end": {
"hour": "14",
"min": "00"
}
},
{
"start": {
"hour": "00",
"min": "00"
},
"end": {
"hour": "09",
"min": "00"
}
}
]
}

iOS silent messages

Similar to in-app messages on Android, silent messages are unique to the iOS platform and are not displayed. When a silent message arrives at the device, iOS wakes up the application for a period of time (less than 30 seconds) in the background to let the application handle the message logic.
The specific parameters are as follows:
Parameter
Type
Parent Project
Default Value
Required
Description
ios
Object
message
Empty
Yes
iOS message structure
aps
Object
ios
Empty
Yes
APNs-specific parameter, where the most important key-value pair is as follows:
content-available: Identifies the message type (which must be 1), in integer.
The value cannot contain the alert, sound, or badge_type parameters. For more information, see Payload.
Note:content-available: 1 is mutually exclusive with [message_type:"notify"](#message body type). Do not use them at the same time.
custom_content
String
ios
Empty
No
Custom content, which must be serialized to a JSON string.
Complete sample:
{
"ios":{
"aps": {
"content-available": 1
},
"custom_content":"{\\"key\\":\\"value\\"}"
}
}

Optional Parameters

Optional push API parameters refer to advanced parameters that can be carried in a push message, except audience_type, message_type, and message.
Parameter
Type
Parent Project
Required
Default Value
Description
expire_time
Integer
None
No
86,400 (24 hours)
Offline message retention duration (in seconds), up to 72 hours.
If expire_time is 0, it indicates a real-time message.
If expire_time is greater than 0 and less than 800s, the system will reset it to 800s.
If expire_time is greater than or equal to 800s, the message will be retained according to the set value, up to 72 hours.
The value set cannot exceed 259200; otherwise, the push will fail.
To adjust the offline message retention duration, contact our online customer service.
send_time
String
None
No
Current system time
Push time. You can specify a push time in the next 90 days.
The format is yyyy-MM-DD HH:MM:SS.
If the push time specified is earlier than the current server time, the push starts immediately.
This parameter is supported only for push to all devices, push by account package, or push to devices with specified tags.
multi_pkg
Boolean
None
No
false
Multi-package name push: For an application that has multiple packages (such as for MyApp and Wandoujia), if you want the application in all channels to receive the push message, you can set this value to true. Note: This parameter controls the multi-package name push of the Tencent Push Notification Service channel by default. To implement multi-package name push on vendor channels, see Configuring vendor channel for multi-package name.
loop_param
Object
None
No
0
Loop push parameters. This parameter is supported only for push to all devices, push by account package, or push to devices with specified tags. For more information about loop push parameters, see the loop_param parameter description below.
group_id
String
None
No
tpns_yyyymmdd, where yyyymmdd indicates the push date
This parameter has been disused and will be unavailable in the future. If you need to use the aggregate statistics feature, use the push plan parameter (plan_id).
plan_id
String
None
No
Empty
Push plan ID. For more information about how to create and use the push plan, see Push Plan.
tag_rules
Array
None
Yes for tag push only
Empty
For push based on a combination of tags, you can set 'AND', 'OR', and 'NOT' rules
Note: If both tag_rules and tag_list are specified, tag_list becomes invalid automatically. For parameter descriptions, see tag_rules parameter description.
account_list
Array
None
Yes for push to a single account or a list of accounts
Empty
For push to a single account:
audience_type must be account
Format: ["account1"]
For push to a list of accounts:
Format: ["account1","account2"]
Up to 1,000 accounts
account_push_type
Integer
None
No for push by account
0
Push type. Valid values:
0: Push messages to the latest device of the account
1: Push messages to all devices associated with the account
account_type
Integer
None
No
0
Account type, which must be consistent with that of the accounts to push to. For valid values, see Account Type Value Table.
token_list
Array
None
Yes for push to a single device or a list of devices
Empty
For push to a single device:
audience_type must be token
Format: ["token1"] For push to a list of devices:
Format: ["token1","token2"]
Up to 1,000 tokens
ignore_invalid_token
int
None
No
0
0: The API call will fail if there is an invalid token.
1: Ignore the invalid token and continue to deliver.
Note: This parameter takes effect only for push by a token or token list.
push_speed
Integer
None
No
Empty
Push speed limit to X pushes per second. Value range of X: 1,000-50,000
This parameter is valid only for push to all devices, push by account package, and push to devices with specified tags.
collapse_id
Integer
None
No
System-assigned collapse_id
Message overriding parameter. After the first push task has been scheduled and delivered, if the second push task carries the same collapse_id, it will stop the Tencent Push Notification Service channel data in the first push task that has not been delivered yet and will also overwrite the message in the first push task.
The collapse_id of a completed task can be obtained via the Querying Push Information for One Task API.
Currently, this is supported only for push to all devices, push to devices with specified tags, and push by account package.
channel_rules
Array
None
No
Empty
Push channel selection policy.
You can select the channels through which a push can be delivered. Messages are pushed through all channels by default. For more information about the push policy, see Channel Policies.
For the data structure of single elements in the channel_rules array, see [channel_rules field description](#channel_rules field description 1) below.
tpns_online_push_type
Integer
None
No
0
Whether to push the message to online devices through the Tencent Push Notification Service channel. Valid values:
0: Yes
1: No
force_collapse
Boolean
None
No
false
Whether to deliver messages to OPPO or vivo devices that do not support message overriding. Valid values:
false: No
true: Yes
Note:
The collapse_id parameter is subject to the following restrictions:
This parameter currently cannot be customized. Only collapse_id values generated by Tencent Push Notification Service can be used.
This parameter is supported only for the Tencent Push Notification Service channel, APNs channel, Mi channel, Meizu channel, and Huawei devices on EMUI 10 or later.
For the Huawei channel, you must use intent to carry custom parameters to implement message overriding. If you use custom_content, the API layer will block custom parameters.
Currently, the OPPO and vivo channels do not support message overriding. When an overriding message is created, delivery to the OPPO and vivo channels can be disabled by setting the force_collapse parameter to false.

tag_rules parameter description

Parameter
Type
Parent Project
Required
Description
tag_items
Array
tag_rules
Yes
Tag rule. See tag_items description.
operator
String
tag_rules
Yes
Operator between elements in the tag_rules array. The operator of the first tag_rules element is invalid data. The operator of the second tag_rules element is the operator between the first and second tag_rules elements, and so on. Valid values:
OR: OR operation
AND: AND operation
is_not
Boolean
tag_rules
Yes
Whether to perform "NOT" operation on the calculation result of the tag_items array.
true: Yes
false: No

tag_items description

Parameter
Type
Parent Project
Required
Description
tags
Array
tag_items
Yes
Specific tag value in string type, such as tag1 and guangdong
is_not
Boolean
tag_items
Yes
Whether to perform "NOT" operation on the calculation result of the tags array. Valid values:
true: Yes
false: No
tags_operator
String
tag_items
Yes
Operator for tag in tags. Valid values:
OR: OR operation
AND: AND operation
items_operator
String
tag_items
Yes
Operator between elements in the tag_items array. The items_operator of the first tag_items element is invalid. The items_operator of the second tag_items element is the operator between the first and second tag_items elements, and so on. Valid values:
OR: OR operation
AND: AND operation
Note: For different rules, AND takes precedence over OR.
tag_type
String
tag_items
Yes

tag_type value table

Tag Name
tag_type Value
Sample Tag
Custom tag
xg_user_define
tag1, tag2
Application version
xg_auto_version
1.1.0, 1.2.0.1
Device district information
xg_auto_province
guangdong, shanghai
Active information
xg_auto_active
20200131, 20200201
XG SDK version
xg_auto_sdkversion
1.1.5.2, 1.1.5.3
System language
xg_auto_systemlanguage
zh, en
Mobile phone brand
xg_auto_devicebrand
Mi, vivo
Mobile phone model
xg_auto_deviceversion
MI 9 SE, vivo X9Plus
Country/Region
xg_auto_country
CN, SG
Note:
For more information about the usage, see Sample tag push.

channel_rules parameter description

Parameter
Type
Parent Project
Required
Description
channel
String
channel_rules
Yes
Delivery push channel. Valid values:
xg: Tencent Push Notification Service channel
hw: Huawei channel
xm: Mi channel
mz: Meizu channel
vivo: vivo channel
oppo: OPPO channel
apns: APNs channel
honor: HONOR channel
fcm: FCM channel
disable
Boolean
channel_rules
Yes
Whether to disable the channel specified in
channel
, which is enabled by default. Valid values:
true: Disable
false: Enable

loop_param parameter description

Parameter
Type
Parent Project
Required
Description
startDate
String
loop_param
Yes
Loop interval start date in YYYY-MM-DD format, such as 2019-07-01. You can choose a date in the next 90 days.
endDate
String
loop_param
Yes
Loop interval end date in YYYY-MM-DD format, such as 2019-07-07. You can choose a date in the next 90 days.
loopType
Integer
loop_param
Yes
Loop type. Valid values:
1: Daily
2: Weekly
3: Monthly
loopDayIndexs
Array
loop_param
Yes
Daily loop value: [0], indicating the push will be done every day. Weekly loop value: [0-6]; for example, [0, 1, 2] indicates the push will be done on every Sunday, Monday, and Tuesday. Monthly loop value: dates; for example, [1, 10, 20] indicates the push will be done on the 1st, 10th, and 20th days of each month.
dayTimes
Array
loop_param
Yes
Specific push time in HH:MM:SS format. If the value is ["19:00:00", "20:00:00"], it indicates that the push will be done at 19:00 and 20:00 every day.

Response Parameters

Parameter
Type
Description
seq
Integer
Same as the request (if the request does not contain this parameter, this parameter returns 0).
push_id
String
Push ID
Note: If you use the loop push type, multiple pushid values will be returned and placed in an array.
invalid_targe_list
Array
This parameter is returned only when the push target is a token list or a single token and the value of ignore_invalid_token is 1. This parameter stores filtered invalid tokens and delivers pushes to devices with valid tokens properly.
ret_code
Integer
Error code. For more information, see the error codes table.
environment
String
Push environment specified by the user (only for iOS). Valid values:
product: production environment
dev: development environment
err_msg
String
Error message when a request error occurs
result
String
When the request is correct:
If there is extra data to be returned, the result will be encapsulated in this parameter in JSON format.
If there is no extra data, this parameter may not exist.

Examples

Android request message for push by account

{
"audience_type": "account",
"account_list": [
"account1"
],
"multi_pkg":true,
"push_speed":50000,
"channel_rules": [
{
"channel": "mz",
"disable": true
},
{
"channel": "xm",
"disable": false
}
],
"message_type": "notify",
"message": {
"title": "Test title",
"content": "Test content",
"xg_media_resources": "xxx1" , // Enter the URL of rich media elements, such as `https://www.xx.com/img/bd_logo1.png?qua=high`
"xg_media_audio_resources":"xxx", // Enter the URL of audio rich media elements, such as `http://sc1.111ttt.cn/2018/1/03/13/396131227447.mp3`
"accept_time": [
{
"start": {// Period start time
"hour": "13",// Start time in hour. Value range: [0,24)
"min": "00"// Start time in minute. Value range: [0,60)
},
"end": {// Period end time
"hour": "14",// End time in hour. Value range: [0,24)
"min": "00" // End time in minute. Value range: [0,60)

}
},
{
"start": {
"hour": "00",
"min": "00"
},
"end": {
"hour": "09",
"min": "00"
}
}
],
"android": {
"n_ch_id": "default_message",
"n_ch_name": "default notification",
"n_id": 0,
"builder_id": 0,
"ring": 1,
"ring_raw": "ring",
"badge_type":-1,
"vibrate": 1,
"lights": 1,
"clearable": 1,
"icon_type": 0,
"icon_res": "xg",
"style_id": 1,
"small_icon": "xg",
"action": {
"action_type": 1,// Action type; 1. Open activity or application; 2. Open browser; 3. Open Intent
"activity": "xxx",
"aty_attr": {// Activity attribute, only for action_type=1
"if": 0, // Intent's flag attribute
"pf": 0 // PendingIntent's flag attribute
},
"browser": {
"url": "xxxx ", // Only HTTP and HTTPS URLs are supported
"confirm": 1 // Whether user's confirmation is required
},
"intent": "xxx" // The SDK must be version 1.0.9 or later. Configure the data tag in the client's intent and set the scheme attribute
},
"custom_content":"{\\"key\\":\\"value\\"}"
}
}
}

Response message for push by account

{
"seq": 0,
"environment": "product",
"ret_code": 0,
"push_id": "3895624686"
}

iOS request message for push to a single device

{
"audience_type": "token",
"environment":"dev",
"token_list": [ "05da87c0ae********fa9e08d884aada5bb2"],
"message_type":"notify",
"message":{
"title": "Push title",
"content": "Push content",
"ios":{
"aps": {
"alert": {
"subtitle": "Push subtitle"
},
"badge_type": -2,
"sound":"Tassel.wav",
"category": "INVITE_CATEGORY"

},
"custom_content":"{\\"key\\":\\"value\\"}"
}
}
}

Response message for push to a single device

{
"seq": 0,
"push_id": "427184209",
"ret_code": 0,
"environment": "dev",
"err_msg": "",
"result": "[0]"
}

Push by tag (using tag_rules)

Sample 1: Push messages to male users who were active on April 8, 2020 in Guangdong or Hunan province Expression: (xg_auto_province.guangdong OR xg_auto_province.hunan) AND xg_auto_active.20200408 AND xg_user_define.male
{
"audience_type": "tag",
"tag_rules": [
{
"tag_items": [
{
"tags": [
"guangdong",
"hunan"
],
"is_not": false, //Whether to perform the "NOT" operation on the calculation result of the tags in `tags`. Valid values: `true`: Yes; `false`: No
"tags_operator": "OR", //Operator for tags in `tags`
"items_operator": "OR", //Operator between elements in `tag_items`. The `items_operator` of the first element is invalid data. The `items_operator` of the second element is the operator between the first and second elements, and so on.
"tag_type": "xg_auto_province" //Type of tags in `tags`
},
{
"tags": [
"20200408"
],
"is_not": false,
"tags_operator": "OR",
"items_operator": "AND",
"tag_type": "xg_auto_active"
},
{
"tags": [
"male"
],
"is_not": false,
"tags_operator": "OR",
"items_operator": "AND",
"tag_type": "xg_user_define"
}
],
"operator": "OR",
"is_not": false
}
]
}
Sample 2: Push messages to Huawei users who were active in the last 3 days on an application version other than 1.0.2 Expression: (xg_auto_active.20200406 OR xg_auto_active.20200407 OR xg_auto_active.20200408) AND (NOT xg_auto_version.1.0.2) AND xg_auto_devicebrand.huawei
{
"audience_type": "tag",
"tag_rules": [
{
"tag_items": [
{
"tags": [
"20200406",
"20200407",
"20200408"
],
"is_not": false, //Whether to perform the "NOT" operation on the calculation result of the tags in `tags`. Valid values: `true`: Yes; `false`: No
"tags_operator": "OR", //Operator for tags in `tags`
"items_operator": "OR", //Operator between elements in `tag_items`. The `items_operator` of the first element is invalid data. The `items_operator` of the second element is the operator between the first and second elements, and so on.
"tag_type": "xg_auto_active" //Type of tags in `tags`
},
{
"tags": [
"1.0.2"
],
"is_not": true,
"tags_operator": "OR",
"items_operator": "AND",
"tag_type": "xg_auto_verison"
},
{
"tags": [
"huawei"
],
"is_not": false,
"tags_operator": "OR",
"items_operator": "AND",
"tag_type": "xg_auto_devicebrand"
}
],
"operator": "OR",
"is_not": false
}
]
}


도움말 및 지원

문제 해결에 도움이 되었나요?

피드백