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

Template (Async) Template

Create template

Request API endpoint

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 limited to 512 characters.

parameterFormat

String

Yes

Variable format named: named variables positional: numeric variables When parameterFormat=named, the title and Body variable format can be: {{name}},{{order_id}} When parameterFormat=positional, the title and Body variable format can only be: {{1}},{{2}}

category

String

Yes

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

messageLanguage

String

Yes

Language supported by the template, (language abbreviation code required) 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 (empty for multimedia templates), 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, it displays: *{{1}}* is your verification code. After adding, it displays: *{{1}}* is your verification code. For security reasons, please do not share this verification code.

buttons

Object[]

No

The total number of buttons cannot 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 when and must betrue

├─ 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 website access contains variables, variable content must be a complete URL

headerExample

Objec

├─ 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 URL, must be accessible from the public internet,Either header_link or header_handle must be chosen; when header_link is not empty, header_handle will be replaced

├─header_text_named_params

String

When parameterFormat=named, dynamic parameters are passed in "header_text_named_params": [ { "param_name": "order", "example": "1111" } ]

├─ header_text

Array

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

bodyExample

Object

No

├─ body_text

Array

When parameterFormat=positional, dynamic parameters are passed in

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

├─ body_text_named_params

Array

When parameterFormat=named, dynamic parameters are passed in

Custom variable names "body_text_named_params": [

{ "param_name": "order_id", "example": "A1024" }, { "param_name": "ship_time", "example": "Today 10:24" }, { "param_name": "tracking_no", "example": "SF88888888" } ] }

Request example

When parameterFormat=positional

When parameterFormat=named

Response example

Modify template

Request API endpoint

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 limited to 512 characters.

category

String

Yes

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

messageLanguage

String

Yes

Language supported by the template:(language abbreviation code required) 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 (empty for multimedia templates), 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, it displays: *{{1}}* is your verification code. After adding, it displays: *{{1}}* is your verification code. For security reasons, please do not share this verification code.

buttons

Object[]

No

The total number of buttons cannot 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 website access contains variables, 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 URL, must be accessible from the public internet,Either header_link or header_handle must be chosen; 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, number of dynamic parameters limited to 1

bodyExample

Object[]

No

├─ body_text

Array

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

├─ custom_text

Array

Custom variable names [{"name":"Custom Name 1","value":"variable1"},{"name":"Custom Name 2","value":"variable2"}] custom_text and Choose either body_text; when custom_text is not empty, body_text is invalid

Request example

Response example

Template list

Request API endpoint

Request parameters

Field

Data type

Required

Description

page

Integer

Yes

Page number

Number of items returned per page

Integer

Yes

Template name

wabaId

String

Yes

Unique identifier of the WhatsApp Business account

name

String

No

list

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 endpoint

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

Send at least one of id/templateId

templateId

string

Template ID

Send at least one of id/templateId

Response parameters

Name
Type
Required
Default value
Remarks
Other information

code

integer

Required

0: success Others: failure

data

object

Required

message

string

Required

最后更新于