Create WhatsApp Template

Create a WhatsApp template. Created template will be submitted for WhatsApp's review and approval. Once approved, template can be sent to end-users. Refer to template guidelines for additional info.

Please log in to see full path URL. Learn why.
post
/whatsapp/2/senders/{sender}/templates
Request rate limit:
200 requests / hour (per account)
path Parameters
sender
required
string
Example: 447796344125

Registered WhatsApp sender number. Must be in international format.

Request Body schema:
application/json
collapse all -
name
required
string

Template name. Must only contain lowercase alphanumeric characters and underscores.

language
required
string
Enum: "af" "sq" "ar" "az" "bn" "bg" "ca" "zh_CN" "zh_HK" "zh_TW" "hr" "cs" "da" "nl" "en" "en_GB" "en_US" "et" "fil" "fi" "fr" "ka" "de" "el" "gu" "ha" "he" "hi" "hu" "id" "ga" "it" "ja" "kn" "kk" "rw_RW" "ko" "ky_KG" "lo" "lv" "lt" "mk" "ms" "ml" "mr" "nb" "fa" "pl" "pt_BR" "pt_PT" "pa" "ro" "ru" "sr" "sk" "sl" "es" "es_AR" "es_ES" "es_MX" "sw" "sv" "ta" "te" "th" "tr" "uk" "ur" "uz" "vi" "zu" "unknown"

Template language, one template with same name can have multiple transliterations.

category
required
string

Category of the template. Mind that each category has different fields available for the endpoint. If you're sending traffic in India, for AUTHENTICATION, use fields available for UTILITY with AUTHENTICATION as category.

allowCategoryChange
boolean
Default: false

If set to true, Meta will be able to assign category based on their template guidelines. If omitted, template will not be auto-assigned a category and may get rejected if determined to be miscategorized.

structure
required
object

Structure of the created template. Can consist of body (mandatory), header, footer, buttons, carousel, limited time offer and shortening options.

header
object

Template header. Can be image, document, video, location or text.

format
string
text
required
string

Template header text. Can contain up to 60 characters, with one placeholder {{1}}.

example
string

An example of the content for the template header a user could use. Cannot contain placeholders.

body
required
object

Template body.

text
required
string

Plain text or text with placeholders. Placeholders have to be correctly formatted and in the correct order, regardless of other sections. Example: {{1}}, {{2}}, {{3}}...

examples
Array of strings

Placeholders examples. The number of examples has to be the same as the number of placeholders. Examples cannot contain placeholders.

footer
object

Template footer.

text
required
string [ 0 .. 60 ] characters

Plain text, up to 60 characters.

buttons
Array of objects

Template buttons. Can contain 1 to 10 buttons which include up to 2 URL buttons, a phone number button and copy code button. quick reply and non quick reply buttons have to be grouped together.

Array
type
string
text
required
string [ 0 .. 25 ] characters

Button text.

phoneNumber
required
string

Phone number to which a phone call would be placed by end-user when hitting the button.

carousel
object

Template carousel.

cards
required
Array of objects [ 1 .. 10 ] items

List of cards.

Array
header
required
object

Template header. Can be image, document, video, location or text.

format
string
text
required
string

Template header text. Can contain up to 60 characters, with one placeholder {{1}}.

example
string

An example of the content for the template header a user could use. Cannot contain placeholders.

body
required
object

Template body.

text
required
string

Plain text or text with placeholders. Placeholders have to be correctly formatted and in the correct order, regardless of other sections. Example: {{1}}, {{2}}, {{3}}...

examples
Array of strings

Placeholders examples. The number of examples has to be the same as the number of placeholders. Examples cannot contain placeholders.

buttons
required
Array of objects [ 1 .. 2 ] items

Card buttons. Can contain 1 to 2 buttons.

Array
type
string
text
required
string [ 0 .. 25 ] characters

Button text.

phoneNumber
required
string

Phone number to which a phone call would be placed by end-user when hitting the button.

limitedTimeOffer
object

Limited time offer.

hasExpiration
boolean
Default: false

Indicates whether offer expiration details will appear in the delivered message. If set to true, copy code button must be included in the buttons array, and must appear first in the array.

text
required
string [ 1 .. 16 ] characters

Offer details text. Up to 16 characters.

shorteningOptions
object

URL shortening options. Applicable only if at least one dynamic URL button is present. Modifying this provided URL outside of our company's services may lead to unexpected results.

customDomain
required
string

Custom domain to be used for URL shortening.

platform
object

Platform options. For more details, see documentation.

entityId
string [ 0 .. 255 ] characters

Used when specifying an entity in outbound send requests. It is also returned in notification events. For detailed usage, refer to the documentation.

applicationId
string [ 0 .. 255 ] characters

Used when specifying an application in outbound send requests. It is also returned in notification events. For detailed usage, refer to the documentation.

Responses

201

Template created.

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found.

429

Too Many Requests

500

Internal Server Error

Request samples

Content type
application/json
Example
Copy
Collapse all
{
  • "name": "text_template",
  • "language": "en",
  • "category": "MARKETING",
  • "allowCategoryChange": false,
  • "structure":
    {
    • "body":
      {
      • "text": "body {{1}} content",
      • "examples":
        [
        • "example"
        ]
      },
    • "type": "TEXT"
    }
}

Response samples

Content type
application/json
Example
Copy
Collapse all
{
  • "id": "111",
  • "businessAccountId": 222,
  • "name": "media_template",
  • "language": "en",
  • "status": "APPROVED",
  • "category": "MARKETING",
  • "structure":
    {
    • "header":
      {
      • "format": "IMAGE"
      },
    • "body":
      {
      • "text": "example {{1}} body"
      },
    • "footer":
      {
      • "text": "exampleFooter"
      },
    • "type": "MEDIA"
    },
  • "quality": "HIGH",
  • "platform":
    {
    • "entityId": "entityId",
    • "applicationId": "applicationId"
    },
  • "createdAt": "2024-01-01T00:00:00.000+0000",
  • "lastUpdatedAt": "2024-01-01T00:00:00.000+0000"
}

Encountering issues

Contact our support

What's new? Check out

Release Notes

Unsure about a term? See

Glossary

Research panel

Help shape the future of our products
Learn more
Service status

Copyright @ 2006-2025 Infobip ltd.