Create a WhatsApp Template with Text

POST Method allows you to create a WhatsApp template using the API. After you create a WhatsApp template, it has to get approved by Meta before you can use the WhatsApp template to send messages.

Template Category



Marketing, Authentication, and Utility template categories are supported by Kaleyra. For more information, see the WhatsApp Template Category page.

Base URL


To create the WhatsApp template, perform the following:

Signup or Login to and create your API key

Refer to the Create an API Key page for steps to create your API key. To view the API Key and the SID, see View API Key and SID.



After you sign up, your account will be on the trial version. You must complete the KYC to access all the features in

API Request to Create WhatsApp template

To create the WhatsApp template, use the whatsapp/template endpoint with the following request method:

Request format

curl --location --request POST '{{url}}/v1/{{sid}}/whatsapp/template' \
--header 'api-key: {{api-key}}' \
--header 'Content-Type: {{content_type}}' \
--data-raw '{
	"body": "{{message_body}}",
	"footer_content": "{{footer_content}}",
	"waba_id": {{whatsapp_business_id}}

The following table displays the parameter used to create WhatsApp template API:

ParameterData TypeDescriptionExampleMandatory
sidStringAccount SID (Security Identifier).HXXXXXXX071USYes
content-typeStringThe format in which the data is sent.application/x-www-form-urlencodedYes
api-keyStringAPI key generated from account.Axxxxxxxxxxxxxxxxxxxxxxxxxxxx3Yes
nameStringTemplate name.Kaleyra_01Yes
languageStringThe language in which, you want to create the template.en_usYes
categoryStringSelect one of the following:
- Marketing -Authentication
- Utility
header_content_typeStringSelect one of the following:
Video Document
header_contentStringHeader textTextYes
bodyStringBody of the message.Hi, this is a WhatsApp test message.Yes
footer_contentStringFooter textTextNo
waba_idStringWhatsApp Business Account IDxxxxxxxxxxxxxx74443Yes

Sample Request Format

The following is the sample request format to create a WhatsApp template:

curl --location --request POST '' \
--header 'api-key: Axxxxxxxxxxxxxxxxxxxxxxxxxxxx3' \
--header 'Content-Type: application/json' \
--data-raw '{
	"header: {
      type": "none"
	"body": "Hi {{$1}},This is WhatsApp test message.",
	"footer_content": "footer",
	"waba_id": xxxxxxxxxxxxxx74443

Sample Success Response

The following success message appears with status 200:

    "status": 200,
    "message": "Template created successfully.",
    "data": [],
    "error": {}

Error Codes

For information related to the WhatsApp error code, see WhatsApp Error Codes.