Create a Message Template

In this quickstart, you'll learn how to create a message template for WhatsApp Business API. Templates are pre-approved message formats that allow businesses to initiate conversations with users or send notifications after the 24-hour messaging window has closed.

1

Understanding Template Basics

Before creating a template, it's important to understand the key components:

Template Categories:

  • Marketing: For promotional offers and sales notifications

  • Utility: For transactional updates like order confirmations

  • Authentication: For sending verification codes

Template Components:

  • Header (Optional): Can include text, image, video, or document

  • Body (Required): Main content with variables ({{1}}, {{2}}, etc.)

  • Footer (Optional): Additional static information

  • Buttons (Optional): Action buttons like links or quick replies

2

Choose Your Creation Method

Using the Template Library:

  • Pre-written templates for common use cases

  • Instant approval in most cases

  • Limited customization options

  • Best for getting started quickly

We'll cover both methods in the following steps.

3

Creating a Template from the Template Library

Here's how to create a template using the Template Library:

  • In WhatsApp Business Manager, navigate to Message Templates in the left sidebar

  • Select Create Template

  • Under "Browse the WhatsApp Template Library," click Browse Templates

  • Find a suitable template for your use case

  • Click on your desired template to select it

  • Complete the template form by adding your template name, selecting the language, and filling in button details if applicable

  • Click Submit

If using the API instead:

# Create a template from the library
curl --location 'https://waba-v2.360dialog.io/message_templates' \
--header 'Content-Type: application/json' \
--header 'D360-API-KEY: YOUR_API_KEY' \
--data '{
    "name": "my_order_confirmation",
    "category": "UTILITY",
    "language": "en_US",
    "library_template_name": "order_confirmation_1",
    "library_template_button_inputs": [
        {
            "type": "URL",
            "url": {
                "base_url": "https://your-store.com/orders"
            }
        }
    ]
}'
4

Creating a Custom Template

For more flexibility, you can create a custom template:

curl --location 'https://waba-v2.360dialog.io/v1/configs/templates' \
--header 'D360-API-KEY: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
  "name": "order_confirmation",
  "category": "UTILITY",
  "language": "en_US",
  "allow_category_change": true,
  "components": [
    {
      "type": "HEADER",
      "format": "TEXT",
      "text": "Order Confirmation"
    },
    {
      "type": "BODY",
      "text": "Thank you for your order, {{1}}! Your order number is {{2}}. We will notify you when it ships.",
      "example": {
        "body_text": [
          [
            "John","ORD-12345"
          ]
        ]
      }
    },
    {
      "type": "FOOTER",
      "text": "Contact us for any questions about your order."
    },
    {
      "type": "BUTTONS",
      "buttons": [
        {
          "type": "URL",
          "text": "Track Order",
          "url": "https://www.mystore.com/orders/{{1}}",
          "example": [
            "ORD-12345"
          ]
        }
      ]
    }
  ]
}'

Including "allow_category_change": true lets Meta recategorize your template if needed, preventing rejection.

5

Review and Approval Process

After submitting your template:

  • Category Validation: Meta checks if your template is correctly categorized

  • Template Review: Meta reviews the content against their guidelines

    • Library templates are usually approved instantly

    • Custom templates can take up to 24 hours for approval

  • Check Status: You can check the status using:

curl --request GET --url https://waba-v2.360dialog.io/v1/configs/templates \
--header 'D360-API-KEY: YOUR_API_KEY'

Your template will be marked as PENDING, APPROVED, or REJECTED.

6

Tips for Template Success

For better approval chances and user engagement:

  • Keep content clear and consistent with your template category

  • Provide accurate examples for all variables

  • Use allow_category_change: true to prevent miscategorization rejections

  • Make the first 60-65 characters engaging (this appears in message previews)

  • For marketing templates, include clear opt-out options

  • Test different templates to see which ones perform better

Once approved, your template is ready to use in your WhatsApp messaging campaigns!

Quick Examples

Here are simple examples for each template category:

{
  "name": "seasonal_promotion",
  "category": "MARKETING",
  "components": [
    {
      "type": "HEADER",
      "format": "TEXT",
      "text": "Our Summer Sale is on!"
    },
    {
      "type": "BODY",
      "text": "Shop now through August 31 and use code SUMMER25 to get 25% off all merchandise."
    },
    {
      "type": "FOOTER",
      "text": "Reply STOP to unsubscribe from promotions"
    }
  ]
}

That's it! You're now ready to create your first WhatsApp template and start sending structured messages to your customers.

Last updated

Was this helpful?