All Products
Search
Document Center

Chat App Message Service:ModifyChatappTemplate

Last Updated:Jun 10, 2026

Mengubah templat Paket. Anda hanya dapat mengubah templat yang belum ditinjau atau telah ditolak.

Deskripsi operasi

QPS limits

The queries per second (QPS) limit for this API is 50 calls per second for each user. If you exceed this limit, your API calls are subject to rate limiting. This may affect your business. Make sure that you call this API within the specified limit.

Status changes

You can monitor changes in template status and quality through MNS or HTTP. For more information, see Receipt messages.

Coba sekarang

Coba API ini di OpenAPI Explorer tanpa perlu penandatanganan manual. Panggilan yang berhasil akan secara otomatis menghasilkan contoh kode SDK sesuai dengan parameter Anda. Unduh kode tersebut dengan kredensial bawaan yang aman untuk penggunaan lokal.

Test

RAM authorization

Tabel berikut menjelaskan otorisasi yang diperlukan untuk memanggil API ini. Anda dapat menentukannya dalam kebijakan Resource Access Management (RAM). Kolom pada tabel dijelaskan sebagai berikut:

  • Action: Aksi yang dapat digunakan dalam elemen Action pada pernyataan kebijakan izin RAM untuk memberikan izin guna melakukan operasi tersebut.

  • API: API yang dapat Anda panggil untuk melakukan aksi tersebut.

  • Access level: Tingkat akses yang telah ditentukan untuk setiap API. Nilai yang valid: create, list, get, update, dan delete.

  • Resource type: Jenis resource yang mendukung otorisasi untuk melakukan aksi tersebut. Ini menunjukkan apakah aksi tersebut mendukung izin tingkat resource. Resource yang ditentukan harus kompatibel dengan aksi tersebut. Jika tidak, kebijakan tersebut tidak akan berlaku.

    • Untuk API dengan izin tingkat resource, jenis resource yang diperlukan ditandai dengan tanda bintang (*). Tentukan Nama Sumber Daya Alibaba Cloud (ARN) yang sesuai dalam elemen Resource pada kebijakan.

    • Untuk API tanpa izin tingkat resource, ditampilkan sebagai All Resources. Gunakan tanda bintang (*) dalam elemen Resource pada kebijakan.

  • Condition key: Kunci kondisi yang didefinisikan oleh layanan. Kunci ini memungkinkan kontrol granular, berlaku baik hanya untuk aksi maupun untuk aksi yang terkait dengan resource tertentu. Selain kunci kondisi spesifik layanan, Alibaba Cloud menyediakan serangkaian common condition keys yang berlaku di semua layanan yang didukung RAM.

  • Dependent action: Aksi dependen yang diperlukan untuk menjalankan aksi tersebut. Untuk menyelesaikan aksi tersebut, pengguna RAM atau role RAM harus memiliki izin untuk melakukan semua aksi dependen.

Action

Access level

Resource type

Condition key

Dependent action

cams:ModifyChatappTemplate

update

*全部资源

*

None None

Parameter permintaan

Parameter

Type

Required

Description

Example

Components

array<object>

Yes

Daftar Komponen templat Paket.

Catatan

Jika kategori adalah AUTHENTICATION, Components tidak boleh berisi node dengan tipe yang diatur ke Header. Jika tipe adalah BODY atau FOOTER, konten Text kosong dan dibuat secara otomatis.

array<object>

No

A message template component.

Type

string

Yes

The component type:

  • BODY

  • HEADER

  • FOOTER

  • BUTTONS

  • CAROUSEL

  • LIMITED_TIME_OFFER

Catatan
  • For WhatsApp templates, the BODY component cannot exceed 1,024 characters. The HEADER and FOOTER components cannot exceed 60 characters.

BODY

Text

string

No

The text of the message.

Catatan

If Category is AUTHENTICATION, this property is empty.

hello chatapp

Format

string

No

The media resource type.

  • TEXT: Text

  • IMAGE: Image

  • DOCUMENT: Document

  • VIDEO: Video

TEXT

Url

string

No

The URL of the media asset.

https://img.****.com/png_preview/00/10/24/1GygxVK3F4.jpg

Caption

string

No

The description.

Catatan

You can add a description when Type is HEADER and Format is IMAGE, DOCUMENT, or VIDEO.

This is a video

FileName

string

No

The file name.

Catatan

Specify the file name when Type is HEADER and Format is DOCUMENT.

video

Buttons

array<object>

No

A list of buttons. This applies only to the BUTTONS component.

Catatan

Number of buttons for WhatsApp:

  • For MARKETING or UTILITY templates, WhatsApp allows a maximum of 10 buttons.

  • Only one button of the PHONE_NUMBER type is allowed.

  • A maximum of two buttons of the URL type are allowed.

  • QUICK_REPLY buttons cannot be mixed with PHONE_NUMBER or URL buttons.

array<object>

No

The button definition.

Type

string

Yes

The button type.

  • PHONE_NUMBER: Call button

  • URL: URL button

  • QUICK_REPLY: Quick reply button

  • COPY_CODE: Copy verification code or coupon code

  • ONE_TAP: Backfill button for AUTHENTICATION templates

  • ZERO_TAP: Backfill button for AUTHENTICATION templates

  • MPM: Multi-product message

  • CATALOG: Catalog

  • FLOW: Open WhatsApp flow

Catatan
  • For WhatsApp templates where Category is AUTHENTICATION, only one button is allowed, and its type must be COPY_CODE or ONE_TAP. If the type is COPY_CODE, Text is required. If the type is ONE_TAP, the Text (the name of the copy code button, displayed when the target application is not installed), SignatureHash, PackageName, and AutofillText properties 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

  • dynamic

dynamic

SignatureHash deprecated

string

No

Use the properties under SupportedApps.

29dkeke

PackageName deprecated

string

No

Use the properties under SupportedApps.

com.demo

AutofillText

string

No

Required for WhatsApp templates when Category is AUTHENTICATION and Button Type is ONE_TAP or ZERO_TAP. This is the button text for the WhatsApp Autofill action.

Autofill

IsOptOut

boolean

No

For WhatsApp templates, this is valid when Category is Marketing and Button type is QUICK_REPLY. It indicates that the button is a marketing opt-out button. If a customer clicks this button and a sending control action is configured in ChatApp, subsequent marketing messages are not sent to the customer.

false

CouponCode

string

No

The coupon code. It supports only letters and numbers. You can pass a variable, such as `$(couponCode)`, and provide the actual coupon code at the time of sending.

120293

FlowId

string

No

The Flow ID.

664597077870605

FlowAction

string

No

The Flow data event type. Valid values:

  • DATA_EXCHANGE: Data exchange.

  • NAVIGATE: Navigation.

NAVIGATE

NavigateScreen

string

No

The screen to navigate to. This is required when FlowAction is NAVIGATE.

DETAILS

SupportedApps

array<object>

No

A list of supported apps.

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

This field is invalid.

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

This field is invalid.

120

FileType

string

No

This field is invalid.

docx

CodeExpirationMinutes

integer

No

The validity period of the verification code for a WhatsApp AUTHENTICATION template, in minutes. This is valid only for WhatsApp messages when Category is AUTHENTICATION and Component Type is Footer. This information is displayed in the footer.

5

AddSecretRecommendation

boolean

No

For WhatsApp templates, this is valid when Category is AUTHENTICATION and Component Type is Body. It indicates that a message is displayed above the body, advising users not to share the verification code.

false

HasExpiration

boolean

No

Indicates whether the coupon code has an expiration time. Used when type is LIMITED_TIME_OFFER.

true

Cards

array<object>

No

A list of cards for the Carousel template.

array<object>

No

A list of cards for the Carousel template.

CardComponents

array<object>

Yes

A list of controls 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

Bahasa templat. Untuk daftar kode bahasa, lihat Kode bahasa.

en

Example

object

No

Contoh templat.

string

No

The template example.

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

CustWabaId deprecated

string

No

ID WhatsApp Business Account (WABA) pelanggan independent software vendor (ISV).

Catatan

Parameter ini tidak digunakan lagi. Gunakan CustSpaceId sebagai gantinya.

65921621816****

IsvCode

string

No

Kode verifikasi ISV. Kode ini digunakan untuk memverifikasi bahwa Pengguna RAM telah diotorisasi oleh ISV.

ksiekdki39ksks93939

TemplateCode

string

No

Kode templat Paket.

8472929283883

CustSpaceId

string

Yes

ID Space pelanggan sub-ISV, atau ID instans pelanggan langsung.

28251486512358****

Category

string

No

Tipe templat tidak dapat diubah.

text

TemplateType

string

No

Tipe templat.

  • WHATSAPP.

WHATSAPP

MessageSendTtlSeconds

integer

No

Pengatur waktu-to-live (TTL) dari templat Paket dalam detik.

  • Untuk templat AUTHENTICATION, nilai berkisar antara 30 hingga 900.

  • Untuk templat UTILITY, nilai berkisar antara 30 hingga 43,200.

120

TemplateName

string

No

Nama templat.

test_name

Elemen respons

Element

Type

Description

Example

object

The returned data.

RequestId

string

The request ID.

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

Code

string

The request status code.

  • A value of OK indicates a successful request.

  • 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

Details about the access denial.

None

Contoh

Respons sukses

JSONformat

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

Kode kesalahan

HTTP status code

Error code

Error message

Description

400 Product.Unsubscript 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.
400 Unknown.ResourceOwnerId The resource does not belong to the current user.

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.