Crear Plantilla
Templates
Create Template
Create a new HSM template and submit it to WhatsApp for approval
POST
Crear Plantilla
Create custom HSM templates with positional parameters, interactive buttons, and media. Optionally, submit the template directly to WhatsApp for approval.Documentation Index
Fetch the complete documentation index at: https://docs.jelou.ai/llms.txt
Use this file to discover all available pages before exploring further.
Path Parameters
| Property | Type | Description |
|---|---|---|
| botId | string | Unique bot ID. Example: 123456789 |
Query Parameters
| Property | Type | Description |
|---|---|---|
| sendToAprove | boolean | Defines whether the template should be submitted to WhatsApp for approval. |
Request Body
| Property | Type | Description |
|---|---|---|
| category | string | HSM template category. Values: UTILITY, MARKETING, AUTHENTICATION |
| language | string | Template language. |
| isVisible | boolean | Defines whether the template should be shown to operators. |
| params | array | Parameter structure. For the authentication category, Meta has restricted to one parameter. |
| paramsNumber | number | Number of parameters. For the authentication category, Meta has restricted to one parameter. |
| elementName | string | Unique identifier for the template. Can only contain lowercase letters, underscores (_), and numbers. |
| displayName | string | Display name of the template. |
| template | string | Template body. For the authentication category, Meta has restricted the content. |
| type | string | HSM type. Values: HSM, IMAGE, VIDEO, DOCUMENT |
| mediaUrl | string | Media URL. Required when the HSM type is IMAGE, VIDEO, DOCUMENT. Not applicable for the authentication category. |
| interactiveAction | string | HSM interactive action. Values: NONE, CALL_TO_ACTION, QUICK_REPLY, OTP |
| buttons | array | Button structure. Required when the HSM interactive action is CALL_TO_ACTION, QUICK_REPLY, or OTP. |
| header | string | Template header. Applicable only for text-type templates. Not applicable for the authentication category and has a 60-character limit. |
| exampleHeader | string | Header example. Required only if the template will have a header. |
| headerParams | array | Parameter structure. The header supports a maximum of one parameter. |
| example | string | Template example. If the template has a parameter, it must be replaced with an example. |
| extraSettings | object | Optional settings for the template. |
Request Examples
Text
Text
Text with quick reply buttons
Text with quick reply buttons
Text with CTA buttons
Text with CTA buttons
Image
Image
Document
Document
Video
Video
Responses
200 - Successful response
200 - Successful response
400 - Bad Request
400 - Bad Request
401 - Unauthorized
401 - Unauthorized
404 - Not Found
404 - Not Found
The
status field in the response indicates whether your template has been approved by WhatsApp.Language
The language supported by WhatsApp is detailed on the official page. Please review it carefully at the following link.Content Restrictions (Authentication Category)
Meta has restricted content for the authentication category. The content will be according to the template language. Meta is restricted to a single parameter.Language
| Language | Code | Content |
|---|---|---|
| English | en | {{1}} is your verification code. |
| Portuguese (BR) | pt_BR | Seu código de verificação é {{1}}. |
| Spanish | es | Tu código de verificación es {{1}}. |
Parameter Structure
Use the following structure in theparams field when creating a template:
Button Structure
Use the following structure in thebuttons field when the interactive actions are CALL_TO_ACTION, QUICK_REPLY, or OTP.
QUICK_REPLY
Used to obtain quick replies. It is an array of objects and can have a maximum of 3 buttons.| Property | Description |
|---|---|
| text | Button text, this value cannot be updated. |
| type | Button type. Value: QUICK_REPLY |
CALL_TO_ACTION
Used to offer a call to action. Can have a maximum of 2 buttons and a maximum of 1 button of each type.| Property | Description |
|---|---|
| text | Button text, this value cannot be updated. |
| type | Button type. Values: PHONE_NUMBER, URL |
| phone_number | Button phone number. |
| url | Button URL. |
| example | URL example. Required when the button type is URL. |
OTP
Used to obtain a “One Time Password”. Can have a maximum of 1 button.| Property | Description |
|---|---|
| text | Button text, this value cannot be updated. |
| type | Button type. Value: OTP |
extraSettings Structure
| Property | Type | Description |
|---|---|---|
| addSecurityRecommendation | boolean | Adds an additional security message in authentication templates. |
| codeExpirationMinutes | number | Adds a footer message with the code expiration time. Values between 1 and 90 minutes. |
| allowChangeCategory | boolean | Allows Meta to update the template category if necessary. |
Authorizations
Basic authentication using Base64 encoded clientId:clientSecret
Path Parameters
Query Parameters
Body
application/json
Available options:
UTILITY, MARKETING, AUTHENTICATION Pattern:
^[a-z0-9_]+$Available options:
HSM, IMAGE, VIDEO, DOCUMENT Available options:
NONE, CALL_TO_ACTION, QUICK_REPLY, OTP Maximum string length:
60