Modifies a message template. Only templates that have not been reviewed or that failed the review can be modified.
Operation description
QPS limit
The single-user QPS limit for this operation is 50 calls per second. If this limit is exceeded, the API calls are throttled, which may affect your business. Call this operation as needed.
Status changes
You can monitor template status and quality changes 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:ModifyChatappTemplate |
update |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Components |
array<object> |
Yes |
The list of message template components. Note
When Category is AUTHENTICATION, Components cannot contain a node with Type set to HEADER. When Type is BODY/FOOTER, the Text content is empty and is automatically generated. |
|
|
array<object> |
No |
The message template component. |
||
| HasExpiration |
boolean |
No |
Specifies whether the coupon code has an expiration time. This parameter is used when type is LIMITED_TIME_OFFER. |
true |
| ThumbUrl |
string |
No |
Invalid field. |
https://cdn.multiplymall.mobiapp.cloud/cloudcode/yc-165407506207478-165511576113195/20220905/ec5b9737-1507-4208-bb27-8da3958da961.jpg?x-oss-process=image/resize,w_100 |
| FileName |
string |
No |
The file name. Note
Specifies the file name when Type is HEADER and Format is DOCUMENT. |
video |
| Text |
string |
No |
The text of the message to be sent. Note
When Category is AUTHENTICATION, this property value is empty. |
hello chatapp |
| Duration |
integer |
No |
Invalid field. |
120 |
| Url |
string |
No |
The media resource path. |
https://img.****.com/png_preview/00/10/24/1GygxVK3F4.jpg |
| Caption |
string |
No |
The description. Note
A description can be added when Type is HEADER and Format is IMAGE/DOCUMENT/VIDEO. |
This is a video |
| AddSecretRecommendation |
boolean |
No |
Valid for WhatsApp templates when Category is AUTHENTICATION and Component Type is Body. Displays a prompt above the Body advising not to share the verification code with others. |
false |
| Type |
string |
Yes |
The component type.
Note
|
BODY |
| Format |
string |
No |
The media resource type.
|
TEXT |
| CodeExpirationMinutes |
integer |
No |
The validity period (in minutes) of the verification code for WhatsApp AUTHENTICATION templates. Valid only for WhatsApp messages when Category is AUTHENTICATION and Component Type is Footer. This information is displayed in the Footer position. |
5 |
| FileType |
string |
No |
Invalid field. |
docx |
| Buttons |
array<object> |
No |
The list of buttons. Applicable only to BUTTONS components. Note
WhatsApp button quantity rules:
|
|
|
array<object> |
No |
The button definition. |
||
| AutofillText |
string |
No |
Required for WhatsApp templates when Category is AUTHENTICATION and Button Type is ONE_TAP/ZERO_TAP. The button text for the WhatsApp Autofill operation. |
Autofill |
PackageName
deprecated
|
string |
No |
Use the properties under SupportedApps instead. |
com.demo |
| Text |
string |
No |
The button text. |
phone-button-text |
| Url |
string |
No |
The URL to visit when the button is clicked. |
https://www.website.com/*** |
| FlowId |
string |
No |
Flow ID。 |
664597077870605 |
| Type |
string |
Yes |
The button type.
Note
|
PHONE_NUMBER |
| CouponCode |
string |
No |
The coupon code value. Only letters and numbers are supported. You can pass in a variable such as $(couponCode) and provide the actual coupon code when sending the message. |
120293 |
| IsOptOut |
boolean |
No |
Valid for WhatsApp templates when Category is Marketing and Button type is QUICK_REPLY. Indicates the button is a marketing opt-out button. If the customer clicks this button and send control is configured on ChatApp, subsequent Marketing messages will not be sent to the customer. |
false |
| FlowAction |
string |
No |
The Flow data event type. Valid values:
|
NAVIGATE |
SignatureHash
deprecated
|
string |
No |
Use the properties under SupportedApps instead. |
29dkeke |
| NavigateScreen |
string |
No |
The navigate screen. Required when FlowAction is NAVIGATE. |
DETAILS |
| PhoneNumber |
string |
No |
The phone number. |
+861388888**** |
| SupportedApps |
array<object> |
No |
The list of supported applications. |
|
|
object |
No |
The list of supported applications. |
||
| SignatureHash |
string |
No |
Required for WhatsApp templates when Category is AUTHENTICATION and Button Type is ONE_TAP/ZERO_TAP. The signature hash value of the application invoked by WhatsApp. |
fk39kd93ks9 |
| PackageName |
string |
No |
Required for WhatsApp templates when Category is AUTHENTICATION and Button Type is ONE_TAP/ZERO_TAP. The package name of the application invoked by WhatsApp. |
com.example.myapplication |
| UrlType |
string |
No |
The URL type.
|
dynamic |
| Cards |
array<object> |
No |
The list of Carousel template cards. |
|
|
array<object> |
No |
The list of Carousel template cards. |
||
| CardComponents |
array<object> |
Yes |
The list of controls in a Carousel card. |
|
|
array<object> |
No |
The list of controls in a Carousel card. |
||
| Type |
string |
Yes |
The component type. Valid values:
|
BODY |
| Format |
string |
No |
The media resource type. Valid when Type is HEADER.
|
IMAGE |
| Text |
string |
No |
The BODY content in a Carousel card. |
Who is the very powerful team |
| Buttons |
array<object> |
No |
The list of buttons. Applicable only to BUTTONS components. Each Carousel card can have a maximum of two buttons. |
|
|
object |
No |
The button object. |
||
| Type |
string |
Yes |
The button type.
|
PHONE_NUMBER |
| PhoneNumber |
string |
No |
The phone number. |
+861368893**** |
| Text |
string |
No |
The button text. |
Call me |
| UrlType |
string |
No |
The URL type.
|
static |
| Url |
string |
No |
The URL to visit when the button is clicked. |
https://alibaba.com/xx |
| Url |
string |
No |
The media resource path. |
https://alibaba.com/****/img.png |
| Language |
string |
Yes |
The template language. For language codes, see Language codes. |
en |
| Example |
object |
No |
The example for creating a template. |
|
|
string |
No |
The example for creating a template. |
StringConcat('a', 'b', 'c') |
|
CustWabaId
deprecated
|
string |
No |
The ISV customer WabaId. Note
This parameter is deprecated. Use CustSpaceId instead. |
65921621816**** |
IsvCode
deprecated
|
string |
No |
The ISV verification code used to verify whether the sub-account is authorized by the ISV. |
ksiekdki39ksks93939 |
| TemplateCode |
string |
No |
The message template code. |
8472929283883 |
| CustSpaceId |
string |
No |
The SpaceId of the ISV sub-customer or the instance ID of the direct customer. |
28251486512358**** |
| Category |
string |
No |
The templatetype cannot be modified. |
text |
| TemplateType |
string |
No |
The templatetype.
|
|
| MessageSendTtlSeconds |
integer |
No |
The validity period for sending template messages in WhatsApp.
|
120 |
| TemplateName |
string |
No |
The template name. |
test_name |
| CategoryChangePaused |
boolean |
No |
When a Utility template is changed to Marketing type, the template is paused for sending. |
120 |
|
No |
productSetId |
939*** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| RequestId |
string |
The request ID. |
90E63D28-E31D-1EB2-8939-A9486641**** |
| Code |
string |
The response code.
|
OK |
| Message |
string |
The error message. |
None |
| Data |
object |
The returned data. |
|
| TemplateCode |
string |
The template code. |
8472929283883 |
| TemplateName |
string |
The template name. |
hello_whatsapp |
| AccessDeniedDetail |
string |
The access denied details. |
None |
| Success |
boolean |
true |
Examples
Success response
JSON format
{
"RequestId": "90E63D28-E31D-1EB2-8939-A9486641****",
"Code": "OK",
"Message": "None",
"Data": {
"TemplateCode": "8472929283883",
"TemplateName": "hello_whatsapp"
},
"AccessDeniedDetail": "None",
"Success": true
}
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.