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.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

connection_idstringRequired

Request

This endpoint expects an object.
namestringRequired1-512 characters
Template name. Meta requires lowercase letters, digits and underscores, and it must be unique on the WABA.
categorystringRequired
MARKETING, UTILITY, or AUTHENTICATION. Meta may recategorize based on the content.
languagestringOptional>=2 charactersDefaults to en_US

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

parameter_formatstring or nullOptional

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.

componentslist of objects or nullOptional

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 or nullOptional>=1 character

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_inputslist of objects or nullOptional

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

library_template_body_inputsobject or nullOptional

Library templates only: toggles the optional body lines a library entry offers. code_expiration_minutes.

Response

Successful Response

Errors

422
Unprocessable Entity Error