All Products
Search
Document Center

ChatAPP:ModifyChatappTemplate

Last Updated:Mar 29, 2023

Modifies a message template. Only templates that are not reviewed or not approved can be modified.

Operation Description

QPS limit

You can call this operation up to five times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
ComponentsarrayYes

The list of components of the message template.

objectNo

The component of the message template.

TypestringYes

The type of the component. Valid values:

  • BODY
  • HEADER
  • FOOTER
  • BUTTONS
BODY
TextstringNo

The text of the message that is sent.

hello chatapp
FormatstringNo

The type of the media resources that are included in the message.

  • TEXT: text
  • IMAGE: image
  • DOCUMENT: document
  • VIDEO: video
TEXT
UrlstringNo

The URL of the material.

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

The description.

NoteWhen the Type parameter is set to HEADER and the Format parameter is set to IMAGE, DOCUMENT, or VIDEO, you can specify the description.
This is a video.
FileNamestringNo

The name of the file

NoteWhen the Type parameter is set to HEADER and the Format parameter is set to DOCUMENT, you can specify a name of the file.
Video
ButtonsarrayNo

The list of buttons, which applies only to the BUTTONS component.

objectNo

The definition of the button.

TypestringYes

The type of the button.

  • PHONE_NUMBER: a phone number button
  • URL: a URL button
  • QUICK_REPLY: a quick reply button
PHONE_NUMBER
TextstringNo

The text of the message that is sent.

phone-button-text
PhoneNumberstringNo

The phone number.

+8613888887889
UrlstringNo

The URL to be visited after users click the button.

https://www.website.com/
UrlTypestringNo

The type of the URL. Valid values:

  • static: a static URL
  • dynamic: a dynamic URL
dynamic
LanguagestringYes

The language that is used in the message template. For more information, see Language codes.

en
ExampleobjectNo

The examples of variables that are used when you create the message template.

stringNo

The examples of variables. This parameter is specified when the original JSON structure is converted into a string.

{"textVariable":"text"}
CustWabaIdstringNo

The ID of the WhatsApp Business account (WABA) under the ISV account.

659216218162179
IsvCodestringNo

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

ksiekdki39ksks93939
TemplateCodestringYes

The code of the message template.

8472929283883
CustSpaceIdstringNo

The space ID of the user under the ISV account.

28251486512358****

Response parameters

ParameterTypeDescriptionExample
object

The data returned.

RequestIdstring

The ID of the request.

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

The HTTP status code returned.

  • A value of OK indicates that the call is successful.
  • Other values indicate that the call fails. For more information, see Error codes.
OK
Messagestring

The error message returned.

None
Dataobject

The data returned.

TemplateCodestring

The code of the message template.

8472929283883
TemplateNamestring

The name of the message template.

hello_whatsapp

Examples

Sample success responses

JSONformat

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

Error codes

HTTP status codeError codeError message
400Product.UnsubscriptYou have not subscribed to the specified product.
400Ram.PermissionDenyYou are not authorized to perform the operation.
400System.LimitControlThe system is under flow control.
400Unknown.ResourceOwnerIdThe resource does not belong to the current user.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-03-02The error codes of the API operation change.,The input parameters of the API operation change.
Change itemChange content
Error CodesThe error codes of the API operation change.
    delete Error Codes: 400
Input ParametersThe input parameters of the API operation change.
    Added Input Parameters: Category
    Added Input Parameters: TemplateType
2022-09-29Add Operation