latestOpenAPI 3.1.02026-08-199195257.2 KB

99a2d19dd0fd

whatsapp

Whatsapp Create Template

Submit a template, authored or from Meta's Template Library.

An authored template (with components) comes back PENDING and can't be sent until it reaches APPROVED — UTILITY usually clears in minutes, MARKETING can take up to 24h.

Passing library_template_name instead builds from Meta's library, where a template used unchanged skips review and is usable straight away. That makes it the quickest way to get something sendable; the trade is that the copy is Meta's, customizable only through the library button/body inputs.

post/integrations/whatsapp/{connection_id}/templates

Path parameters

connection_idstring required

Request body

namestring required

Template name. Meta requires lowercase letters, digits and underscores, and it must be unique on the WABA.

languagestring

Meta language code, e.g. en_US or es_MX.

categorystring required

MARKETING, UTILITY, or AUTHENTICATION. Meta may recategorize based on the content.

parameter_formatstring nullable

How the body's placeholders are written: POSITIONAL for {{1}}, {{2}} or NAMED for {{first_name}}. Omit for Meta's default, POSITIONAL. A template's format also dictates the shape you must send: positional templates take an array of variables, named templates take an object keyed by parameter name.

componentsobject[] nullable

Meta's component array, passed through as given. Must include a BODY. Required unless library_template_name is set, which supplies its own. Positional: [{"type": "BODY", "text": "Your order {{1}} has shipped.", "example": {"body_text": [["1234"]]}}]. Named: [{"type": "BODY", "text": "Thanks {{first_name}}!", "example": {"body_text_named_params": [{"param_name": "first_name", "example": "Pablo"}]}}]. Components containing variables require an example or Meta rejects the submission.

library_template_namestring nullable

Build from Meta's Template Library instead of authoring one. Use the library entry's slug, e.g. "appointment_confirmation_1" (visible under each card in WhatsApp Manager > Template library). A library template used unchanged skips Meta's review and is usable immediately, so this is the fastest route to a sendable template. Omit components when using it.

library_template_button_inputsobject[] nullable

Library templates only: fills in the buttons the library entry ships with. Each entry takes {"type", "phone_number", "url", "otp_type", "zero_tap_terms_accepted", "supported_apps"} as the button requires — a URL button needs your url, a CALL button your phone number.

library_template_body_inputsobject nullable

Library templates only: toggles the optional body lines a library entry offers. {"add_contact_number", "add_learn_more_link", "add_security_recommendation", "add_track_package_link", "code_expiration_minutes"}.

Example request

{
  "name": "order_shipped",
  "parameter_format": "NAMED",
  "library_template_name": "appointment_confirmation_1"
}

Response

Successful Response

{"stackTrail":"paths:/integrations/whatsapp/{connection_id}/templates:post:responses:200:content:application/json:schema","oasType":"schema","type":"unknown"}