All Products
Search
Document Center

Chat App Message Service:ModifyChatappTemplate

Last Updated:Jul 07, 2026

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

Changes to the template status and quality can be monitored through MNS or HTTP. For more information, see Receipt messages.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

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 set to AUTHENTICATION, Components cannot contain a node with Type set to HEADER. When Type is set to BODY or FOOTER and the Text content is empty, the content is automatically generated.

array<object>

No

The message template component.

Type

string

Yes

The component type.

  • BODY

  • HEADER

  • FOOTER

  • BUTTONS

  • CAROUSEL

  • LIMITED_TIME_OFFER

Note
  • For WhatsApp templates, the character length of the BODY component cannot exceed 1024 characters. The character length of the HEADER and FOOTER components cannot exceed 60 characters.

BODY

Text

string

No

The text of the message to be sent.

Note

When Category is set to AUTHENTICATION, this property value is empty.

hello chatapp

Format

string

No

The media resource type.

  • TEXT: text

  • IMAGE: image

  • DOCUMENT: document

  • VIDEO: video

TEXT

Url

string

No

The material 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 set to HEADER and Format is set to IMAGE/DOCUMENT/VIDEO.

This is a video

FileName

string

No

The file name.

Note

A file name can be specified when Type is set to HEADER and Format is set to DOCUMENT.

video

Buttons

array<object>

No

The button list. This parameter applies only to the BUTTONS component.

Note

WhatsApp button limits:

  • For WhatsApp templates with Category set to MARKETING or UTILITY, a maximum of 10 buttons are allowed.

  • Only one PHONE_NUMBER button is allowed.

  • A maximum of two URL buttons are allowed.

  • QUICK_REPLY buttons cannot be mixed in random order with PHONE_NUMBER or URL buttons.

array<object>

No

The button definition.

Type

string

Yes

The button type.

  • PHONE_NUMBER: phone call button

  • URL: web button

  • QUICK_REPLY: quick reply button

  • COPY_CODE: copy verification code or coupon code

  • ONE_TAP: autofill button for AUTHENTICATION templates

  • ZERO_TAP: autofill button for AUTHENTICATION templates

  • MPM: multi-product catalog

  • CATALOG: catalog

  • FLOW: open a WhatsApp flow

Note
  • For WhatsApp templates with Category set to AUTHENTICATION, only one button is allowed, and the type can only be COPY_CODE or ONE_TAP. When the type is COPY_CODE, Text is required. When the type is ONE_TAP, Text (displayed when the target application is not installed on the device, indicating the name of the copy verification code button) is required, and SignatureHash, PackageName, and AutofillText are required.

PHONE_NUMBER

Text

string

No

The button text.

phone-button-text

PhoneNumber

string

No

The phone number.

+861388888****

Url

string

No

The URL to visit when the button is clicked.

https://www.website.com/***

UrlType

string

No

The URL type.

  • static: static

  • dynamic: dynamic

dynamic

SignatureHash deprecated

string

No

Use the properties under SupportedApps instead.

29dkeke

PackageName deprecated

string

No

Use the properties under SupportedApps instead.

com.demo

AutofillText

string

No

Required when the WhatsApp template Category is AUTHENTICATION and Button Type is ONE_TAP or ZERO_TAP. The button text for the WhatsApp autofill operation.

Autofill

IsOptOut

boolean

No

Valid when the WhatsApp template 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 the send control operation is configured in ChatApp, subsequent Marketing messages will not be sent to the customer.

false

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

FlowId

string

No

Flow ID。

664597077870605

FlowAction

string

No

The flow data event type. Valid values:

  • DATA_EXCHANGE: data exchange.

  • NAVIGATE: navigation.

NAVIGATE

NavigateScreen

string

No

The navigate screen. Required when FlowAction is set to NAVIGATE.

DETAILS

SupportedApps

array<object>

No

The list of supported applications.

object

No

A list of supported apps.

SignatureHash

string

No

Required for WhatsApp templates when Category is AUTHENTICATION and Button Type is ONE_TAP or ZERO_TAP. This is the signature hash of the application launched by WhatsApp.

fk39kd93ks9

PackageName

string

No

Required for WhatsApp templates when Category is AUTHENTICATION and Button Type is ONE_TAP or ZERO_TAP. This is the package name of the application launched by WhatsApp.

com.example.myapplication

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

Duration

integer

No

Invalid field.

120

FileType

string

No

Invalid field.

docx

CodeExpirationMinutes

integer

No

The validity period (in minutes) of the verification code in WhatsApp AUTHENTICATION templates. Valid only for WhatsApp messages when Category is AUTHENTICATION and Component Type is Footer. This information is displayed in the Footer section.

5

AddSecretRecommendation

boolean

No

Valid for WhatsApp templates when Category is AUTHENTICATION and Component Type is Body. Displays a message in the Body section advising not to share the verification code with others.

false

HasExpiration

boolean

No

Specifies whether the coupon code has an expiration time. Used when type is set to LIMITED_TIME_OFFER.

true

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 components in the Carousel card.

array<object>

No

A list of controls in the Carousel card.

Type

string

Yes

The component type. Valid values:

  • BODY

  • HEADER

  • BUTTONS

BODY

Format

string

No

The media resource type. This is valid when Type is HEADER.

  • IMAGE

  • VIDEO

IMAGE

Text

string

No

The content of the BODY in the Carousel card.

Who is the very powerful team

Url

string

No

The URL of the media asset.

https://alibaba.com/****/img.png

Buttons

array<object>

No

A list of buttons. This applies only to the BUTTONS component. Each Carousel card can have a maximum of two buttons.

object

No

The button object.

Text

string

No

The button text.

Call me

Type

string

Yes

The button type.

  • PHONE_NUMBER: Call button

  • URL: URL button

  • QUICK_REPLY: Quick reply button

PHONE_NUMBER

Url

string

No

The URL to visit when the button is clicked.

https://alibaba.com/xx

UrlType

string

No

The URL type.

  • static

  • dynamic

static

PhoneNumber

string

No

The phone number.

+861368893****

Language

string

Yes

The template language. For detailed language codes, see Language codes.

en

Example

object

No

The examples for creating the template.

string

No

The examples for creating the template.

StringConcat('a', 'b', 'c')

CustWabaId deprecated

string

No

The ISV customer WabaId.

Note

Deprecated parameter. Use CustSpaceId instead.

65921621816****

IsvCode

string

No

The ISV verification code used to verify whether the RAM user is authorized by the ISV.

ksiekdki39ksks93939

TemplateCode

string

No

The message template code.

8472929283883

CustSpaceId

string

Yes

The SpaceId of the ISV sub-customer or the instance ID of a direct customer.

28251486512358****

Category

string

No

The templatetype cannot be modified.

text

TemplateType

string

No

The templatetype.

  • WHATSAPP

WHATSAPP

MessageSendTtlSeconds

integer

No

The validity period for sending template messages in WhatsApp.

  • AUTHENTICATION: valid values are 30 to 900.

  • UTILITY: valid values are 30 to 43200.

120

TemplateName

string

No

The template name.

test_name

No

Specifies whether to pause sending when a Utility template is changed to Marketing type.

Response elements

Element

Type

Description

Example

object

The response parameters.

RequestId

string

The request ID.

90E63D28-E31D-1EB2-8939-A9486641****

Code

string

The request status code.

  • OK indicates the request was successful.

  • For other error codes, see Error codes.

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

Examples

Success response

JSON format

{
  "RequestId": "90E63D28-E31D-1EB2-8939-A9486641****",
  "Code": "OK",
  "Message": "None",
  "Data": {
    "TemplateCode": "8472929283883",
    "TemplateName": "hello_whatsapp"
  },
  "AccessDeniedDetail": "None"
}

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.