Skip to content

WhatsApp API deleteTemplate

CodingMakeWordBetter edited this page Jun 14, 2023 · 3 revisions

Delete Message Template

Delete specified template information under a WhatsApp number through the API.

  • URL: https://api2.nxcloud.com/api/wa/deleteTemplate
  • Method: POST
  • Content-Type: application/json
  • Requires authentication: Yes

Authentication Mechanism

Refer to the following address for authentication rules: API Interface Call Convention

Request Parameters

Header parameters:

Parameter Name Type Required Example Value Description
accessKey String Yes fmexxx3ki User identity identifier
ts String Yes 1655710885431 Current timestamp of the request in milliseconds. The maximum allowable time difference between the server and the user is 60 seconds.
bizType String Yes 2 WhatsApp business type, fixed value "2"
action String Yes deleteTemplate WhatsApp business operation, fixed value "deleteTemplate"
sign String Yes 6e95xxx826 API input parameter signature, signature algorithm

Body parameters:

Parameter Name Type Required Example Value Description
appkey String Yes Appkey of the NxCloud WhatsApp application
business_phone String Yes 86158xxx1795 List of merchant's WhatsApp numbers, including country code, such as 185xxx99
messaging_product String Yes whatsapp Channel for sending messages. When sending WhatsApp messages, the value must be "whatsapp"
name String Yes String Template name (delete multiple language templates with the same name)

Request Example

Body (application/json) parameters:

{
    "business_phone": "185xxx99",
    "appkey": "jh42xxxd434",
    "messaging_product": "whatsapp",
    "name": "template"
}

Response Parameters

Parameter Name Type Description
code Integer Result code
data JsonObject Request result
message String Description of the request result
  • data JsonObject parameters:
Parameter Name Type Description
success boolean Operation success status. True for successful deletion, false for deletion failure.

Response Example

Successful Example

{
    "code": 0,
    "data": {
        "success": true
    },
    "message": "Request successful"
}

Failed Example

{
    "code": -1,
    "message": "Request failed",
    "data": null
}

Response Code Explanation

code message Solution
0 Request successful
-1 Request failed Please contact technical support to troubleshoot the issue.
1000~100X Authentication issue Refer to the API authentication section for details.
9000 Parameter exception Missing parameters, please check the required parameters.
9001 System business error Please contact technical support to troubleshoot the issue.
9002 Merchant phone number error Please confirm whether the merchant number belongs to a WhatsApp number.
9006 The WhatsApp number is not bound to the application Please contact the business personnel to handle the binding operation between the application and the phone number.

Introduction

WhatsApp

Short message

Voice

Call Center(NXLink)

Call Center(Callbot)

Flash Call

Short links

邮件验证码

DID号码

通用

号码检测

Clone this wiki locally