Sends Chat App messages in batches.
Operation description
-
You can call this operation to send messages in batches. You can also manually send messages in batches on the Channel Management > Management > Message Sending page.
-
Before calling this operation, make sure that you have created a channel and have an approved template.
-
For WhatsApp channels, complete WABA registration and bindng and add a phone number.
-
For Messenger channels, complete connecting a public page account.
-
For Instagram channels, complete connecting a professional account.
-
For Viber channels, complete applying for a service ID.
QPS limit
-
The single-user QPS limit for this operation is 10 calls per second. If this limit is exceeded, API calls are throttled, which may affect your business. Call this operation as appropriate.
-
A maximum of 1,000 phone numbers are supported per request.
Status changes
You can monitor message sending status through MNS or HTTP. For more information, see Receipt messages.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
cams:SendChatappMassMessage |
create |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ChannelType |
string |
Yes |
The channel type. Valid values:
|
|
| TemplateCode |
string |
No |
The template code. You can view the template code on the Channel Management > Management > Template Design page. |
1119*************** |
| Language |
string |
Yes |
The language. For a list of language codes, see Language codes. |
en |
| From |
string |
Yes |
The sender phone number.
|
861387777**** |
CustWabaId
deprecated
|
string |
No |
The ISV customer WABA ID. This parameter is deprecated. Use CustSpaceId instead, which is the direct customer instance ID. You can view it on the Channel Management page. |
cams-8c8********* |
| FallBackId |
string |
No |
The fallback policy ID. This parameter is for the China site (Chinese). China site users can ignore this parameter. You can view the policy ID on the Fallback Policy page. |
S0**** |
| FallBackContent |
string |
No |
The custom fallback content. This parameter is for the China site (Chinese). China site users can ignore this parameter. |
Fallback SMS |
| TaskId |
string |
No |
The custom task ID. |
10000**** |
| SenderList |
array<object> |
No |
The list of recipient phone numbers. |
|
|
array<object> |
No |
The recipient phone number. |
||
| TemplateParams |
object |
No |
The collection of template parameters. |
|
|
string |
No |
The template parameter. The parameter is in key-value format, where Key is the parameter name and Value is the parameter value. |
{ "param1": "value1", "param2": "value2" } |
|
| FlowAction |
object |
No |
The Flow message object. |
|
| FlowActionData |
object |
No |
The collection of flow default parameters. |
|
|
any |
No |
The flow default parameter. The parameter is in key-value format, where Key is the parameter name and Value is the parameter value. |
{ "name": "name" } |
|
| FlowToken |
string |
No |
The custom flow token information. |
kde**** |
| Payload |
array |
No |
The list of button trigger message identifiers. |
|
|
string |
No |
The button trigger message. |
payloadtext |
|
| To |
string |
No |
The recipient phone number.
|
861386666**** |
| ProductAction |
object |
No |
The product information. This parameter applies only to WhatsApp channels and refers to the product information you uploaded on Meta. |
|
| ThumbnailProductRetailerId |
string |
No |
The product catalog ID. You can obtain this ID by calling the ListProductCatalog operation. |
skkks99**** |
| Sections |
array<object> |
No |
The list of product categories. A maximum of 10 categories and 30 products are supported. |
|
|
array<object> |
No |
The product category. |
||
| Title |
string |
No |
The category name. View it on the Channel Management > Manage > Catalog Management > Product Management page or get it by calling the ListProduct API. |
abcd |
| ProductItems |
array<object> |
No |
The list of product information. |
|
|
object |
No |
The product information. |
||
| ProductRetailerId |
string |
No |
The product ID. View it on the Channel Management > Manage > Catalog Management > Product Management page or get it by calling the ListProduct API. |
ksi3**** |
| RecipientType |
string |
No |
individual |
|
IsvCode
deprecated
|
string |
No |
The ISV verification code used to verify whether a RAM user is authorized by the ISV. This parameter is deprecated and can be ignored. |
skdi3kksloslikd**** |
| CustSpaceId |
string |
No |
The ISV sub-customer SpaceId or direct customer instance ID. You can view it on the Channel Management page. |
cams-8c8********* |
| Ttl |
integer |
No |
The timeout period for Viber message sending. This parameter is for the international site. China site users can ignore this parameter. Unit: seconds. Valid values: 30 to 1209600. |
46 |
| Label |
string |
No |
The Viber message type. This parameter is for the international site. China site users can ignore this parameter. Valid values:
|
promotion |
| Tag |
string |
No |
The tag information. Custom tag information for Viber message sending. |
Tag |
| FallBackDuration |
integer |
No |
The fallback trigger time. This parameter is for the international site. China site users can ignore this parameter. If no delivery receipt is returned within the specified time, the fallback is triggered. If this parameter is not specified, the fallback is triggered only when the message fails to send or a failure status report is received. Unit: seconds. Minimum value: 60. Maximum value: 43200. |
120 |
| FallBackRule |
string |
No |
The fallback rule. This parameter is for the international site. China site users can ignore this parameter. Valid values:
|
undelivered |
| TemplateName |
string |
No |
The template name. You can view the template name on the Channel Management > Management > Template Design page. |
test_name |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| AccessDeniedDetail |
string |
The details about the access denial. |
None |
| RequestId |
string |
The request ID. |
90E63D28-E31D-1EB2-8939-A9486641**** |
| Message |
string |
The error message. |
User not authorized to operate on the specified resource. |
| GroupMessageId |
string |
The batch message ID. |
890000010002**** |
| Code |
string |
The request status code.
|
OK |
Examples
Success response
JSON format
{
"AccessDeniedDetail": "None",
"RequestId": "90E63D28-E31D-1EB2-8939-A9486641****",
"Message": "User not authorized to operate on the specified resource.",
"GroupMessageId": "890000010002****",
"Code": "OK"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | Product.Unsubscript | You have not subscribed to the specified product. | You have not subscribed to the specified product. |
| 400 | Ram.PermissionDeny | You are not authorized to perform the operation. | |
| 400 | System.LimitControl | The system is under flow control. | The system is under flow control. |
| 400 | Unknown.ResourceOwnerId | The resource does not belong to the current user. | The resource does not belong to the current user. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.