For the complete documentation index, see llms.txt. This page is also available as Markdown.

Template (Asynchronous)

Create template

Request API address

POST    https://api.innopaas.com/api/whatsapp/v3/template/submit

Request parameters

Field

Data type

Required

Description

wabaId

String

Yes

Unique identifier of the WhatsApp business account

name

String

Yes

Template name: (eg:limited_time_offer_tuscan_getaway_2023) composed of lowercase letters, numbers, and underscores, field limit is 512 characters.

category

String

Yes

Template type: 1-MARKETING,2-AUTHENTICATION,3-UTILITY

messageLanguage

String

Yes

Template-supported language, (Language abbreviation code needs to be passed)Please refer to Appendix 1

headerType

Integer

Yes

Whether multimedia is supported, default 1, 1:None, 2:Text, 3:Image, 4:Video, 5:Document

caption

String

No

Header content:Field limited to characters (for multimedia templates, this field is empty), dynamic parameter format {{1}}

messageBody

String

No

Body content:Field limited to 1024 characters. Dynamic parameter format {{1}}{{2}}, inserted in order from front to back

footer

String

No

Footer content:Field limited to 60 characters (for AUTHENTICATION templates, this field indicates the expiration time, optional, expiration time limited to within 90 minutes)

safetyAdvice

Integer

No

Whether to add safety advice to the AUTHENTICATION template (0: do not add, 1: add), optional. If not added, display: *{{1}}* is your verification code. After adding, display: *{{1}}* is your verification code. For safety, please do not share this verification code.

buttons

Object[]

No

The total number of buttons does not exceed 10

├─actionType

String

Button type 1-quick reply,2-visit website,3-call phone number,4-copy code(category is 2),5-auto fill (category is 2)

├─label

String

Button text

├─ phoneArea

String

Phone area code (eg:86)

├─ phone

String

Phone number (eg:18877776666)

├─packageName

String

Application package name Template type is:AUTHENTICATION, actionType=5 Required when

├─sigNatureHash

String

Application hash Template type is:AUTHENTICATION, actionType=5Required when

├─ autoFill

String

Auto fill Template type is:AUTHENTICATION, actionType=5Required when

├─ zeroTapTermsAccepted

boolean

Accept fill terms Template type is:AUTHENTICATION, actionType=5Required whentrue

├─ targetUrl

String

Website URL access (eg:"https://www.chuanglan.com/{{1}}") only supports one dynamic parameter, format {{1}}

├─buttonExample

Array

Button variable example (eg:"buttonExample": ["https://www.chuanglan.com/whatsApp"]) required when the URL contains variables; the variable content must be a complete URL

headerExample

Objec

No

├─ header_handle

Array

Multimedia template variable (eg:"header_handle": ["4::axxxx"]) For multimedia templates, fill in the handle returned when the file is uploaded

├─ header_link

String

Resource address URL, must be accessible from the external network,Choose one of header_link and header_handle; when header_link is not empty, header_handle will be replaced

├─ header_text

Array

Plain text template variable (eg:"header_text": ["创蓝云智"]) Text dynamic parameter template variable, the number of dynamic parameters is limited to 1

bodyExample

Object

No

├─ body_text

Array

body variable (eg: "body_text":[["variable1","variable2"]]) The example variables correspond to the variables in order, variable {{1}} corresponds to variable1, and so on

Request example

Response example

Update template

Request API address

Request parameters

Field

Data type

Required

Description

templateId

String

Yes

Template ID

wabaId

String

Yes

Unique identifier of the WhatsApp business account

name

String

Yes

Template name: (eg:limited_time_offer_tuscan_getaway_2023) composed of lowercase letters, numbers, and underscores, field limit is 512 characters.

category

String

Yes

Template type: 1-MARKETING,2-AUTHENTICATION,3-UTILITY

messageLanguage

String

Yes

Template-supported language:(Language abbreviation code needs to be passed)Please refer to Appendix 1

headerType

Integer

Yes

Whether multimedia is supported, default 1, 1:None, 2:Text, 3:Image, 4:Video, 5:Document

caption

String

No

Header content:Field limited to characters (for multimedia templates, this field is empty), dynamic parameter format {{1}}

messageBody

String

No

Body content:Field limited to 1024 characters. Dynamic parameter format {{1}}{{2}}, inserted in order from front to back

footer

String

No

Footer content:Field limited to 60 characters (for AUTHENTICATION templates, this field indicates the expiration time, optional, expiration time limited to within 90 minutes)

safetyAdvice

Integer

No

Whether to add safety advice to the AUTHENTICATION template (0: do not add, 1: add), optional. If not added, display: *{{1}}* is your verification code. After adding, display: *{{1}}* is your verification code. For safety, please do not share this verification code.

buttons

Object[]

No

The total number of buttons does not exceed 10

├─actionType

String

Button type 1-quick reply,2-visit website,3-call phone number,4-copy code(category is 2),5-auto fill (category is 2)

├─label

String

Button text

├─ phoneArea

String

Phone area code (eg:86)

├─ phone

String

Phone number (eg:18877776666)

├─packageName

String

Application package name,Template type is AUTHENTICATION, optional

├─signatureHash

String

Application hash,Template type is AUTHENTICATION, optional

├─ autoFill

String

Auto fill,Template type is AUTHENTICATION, optional

├─ targetUrl

String

Website URL access (eg:"https://www.chuanglan.com/{{1}}") only supports one dynamic parameter, format {{1}}

├─buttonExample

Array

Button variable example (eg:"buttonExample": ["https://www.chuanglan.com/whatsApp"]) required when the URL contains variables; the variable content must be a complete URL

headerExample

Object[]

No

├─ header_handle

Array

Multimedia template variable (eg:"header_handle": ["4::axxxx"]) For multimedia templates, fill in the handle returned when the file is uploaded

├─ header_link

String

Resource address URL, must be accessible from the external network,Choose one of header_link and header_handle; when header_link is not empty, header_handle will be replaced

├─ header_text

Array

Plain text template variable (eg:"header_text": ["创蓝云智"]) Text dynamic parameter template variable, the number of dynamic parameters is limited to 1

bodyExample

Object[]

No

├─ body_text

Array

body variable (eg: "body_text":[["variable1","variable2"]]) The example variables correspond to the variables in order, variable {{1}} corresponds to variable1, and so on

Request example

Response example

Template list

Request API address

Request parameters

Field

Data type

Required

Description

page

Integer

Yes

Page number

size

Integer

Yes

Number of entries returned per page

wabaId

String

Yes

Unique identifier of the WhatsApp business account

name

String

No

Template name

templateId

String

No

Template ID

category

list

No

Template type 1-MARKETING,2-AUTHENTICATION,3-UTILITY

messageLanguage

list

No

Template language (eg:en)

auditStatus

list

No

Template status 1: Pending, 2: Approved 3: Rejected 4: Paused 5: Disabled

Request example code

Response example

Delete template

Request API address

API description:

Request parameters

Name
Type
Required
Remarks
Other information

wabaId

string

Required

Unique identifier of the WhatsApp business account

id

integer

Template primary key ID

At least one of id/templateId must be passed

templateId

string

Template ID

At least one of id/templateId must be passed

Return parameters

Name
Type
Required
Default value
Remarks
Other information

code

integer

Required

0: Success Others: Failure

data

object

Required

message

string

Required

最后更新于