Softservv API
  1. Templates
Softservv API
  • Authentication
    • Login
      POST
  • Accounts
    • Get Account
      GET
  • Whatsapp Accounts
    • Get Whatsapp Accounts
      GET
    • Get Whatsapp Account
      GET
    • Update Whatsapp Account Webhook
      POST
    • Upgrade Whatsapp Account Plan
      POST
    • Suspend Whatsapp Account (Resellers Only)
      POST
    • Unsuspend Whatsapp Account (Resellers Only)
      POST
  • Messages
    • JSON Examples for Sending Messages
    • Get Conversations List
      GET
    • Get Conversation Messages
      GET
    • Get Received Messages
      GET
    • Get Received Message
      GET
    • Get Sent Messages
      GET
    • Get Sent Message
      GET
    • Send Message
      POST
    • Mark Message As Read
      POST
  • Media
    • Get Media
      GET
    • Upload Media
      POST
    • Delete Media
      DELETE
  • Templates
    • JSON Examples for Creating Templates
    • Get Templates
      GET
    • Get Template
      GET
    • Create New Template
      POST
    • Update Template
      POST
    • Delete Template
      DELETE
  • Billing
    • Get Pricing Plans
  • Embedded Inbox
    • Embedded Inbox - How To
    • Generate Embed Code
    • Generate Embed Token
  • Onboarding
    • Create Onboarding Invite
  • Schemas
    • Schemas
  1. Templates

JSON Examples for Creating Templates

Below is example JSON that creates a marketing template that uses positional parameters in the header and body, includes a footer and buttons.
More information about template components can be found here:
https://developers.facebook.com/docs/whatsapp/business-management-api/message-templates/components
Create a Template with Positional Parameters
{
    "name": "seasonal_promotion",
    "language": "en_US",
    "category": "MARKETING",
    "components": [
        {
            "type": "HEADER",
            "format": "TEXT",
            "text": "Our {{1}} is on!",
            "example": {
                "header_text": [
                  "Summer Sale"
                ]
            }
        },
        {
            "type": "BODY",
            "text": "Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise.",
            "example": {
                "body_text": [
                    [
                        "the end of August","25OFF","25%"
                    ]
                ]
            }
        },
        {
            "type": "FOOTER",
            "text": "Use the buttons below to manage your marketing subscriptions"
        },
        {
            "type":"BUTTONS",
            "buttons": [
                {
                    "type": "QUICK_REPLY",
                    "text": "Unsubscribe from Promos"
                },
                {
                    "type":"QUICK_REPLY",
                    "text": "Unsubscribe from All"
                }
            ]
        }
    ]
}
Create a Template with Named Parameters
{
  "name": "seasonal_promotion2",
  "parameter_format": "NAMED",
  "components": [
    {
      "type": "HEADER",
      "format": "TEXT",
      "text": "Our {{specialname}} is on!",
      "example": {
        "header_text_named_params": [
          {
            "param_name": "specialname",
            "example": "Summer Sale"
          }
        ]
      }
    },
    {
      "type": "BODY",
      "text": "Shop now through {{specialend}} and use code {{code}} to get {{discount}} off of all merchandise.",
      "example": {
        "body_text_named_params": [
          {
            "param_name": "specialend",
            "example": "May 2026"
          },
          {
            "param_name": "code",
            "example": "MAY2026"
          },
          {
            "param_name": "discount",
            "example": "10%"
          }
        ]
      }
    },
    {
      "type": "FOOTER",
      "text": "Use the buttons below to manage your marketing subscriptions"
    },
    {
      "type": "BUTTONS",
      "buttons": [
        {
          "type": "QUICK_REPLY",
          "text": "Unsubscribe from Promos"
        },
        {
          "type": "QUICK_REPLY",
          "text": "Unsubscribe from All"
        }
      ]
    }
  ],
  "category": "MARKETING",
  "language": "en"
}
Modified at 2025-09-17 13:46:54
Previous
Delete Media
Next
Get Templates
Built with