v2

latestOpenAPI 3.1.02026-08-075421692.0 MB
WhatsApp

Create template

Create a new message template. Supports two modes:

Custom template: Provide components with your own content. Submitted to Meta for review (can take up to 24h).

Library template: Provide library_template_name instead of components to use a pre-built template from Meta's template library. Library templates are pre-approved (no review wait). You can optionally customize parameters and buttons via library_template_body_inputs and library_template_button_inputs.

Browse available library templates at: https://business.facebook.com/wa/manage/message-templates/

post/v1/whatsapp/templates

Request body

accountIdstring required

WhatsApp social account ID

namestring required

Template name (lowercase, letters/numbers/underscores, must start with a letter)

category'AUTHENTICATION' | 'MARKETING' | 'UTILITY' required

Template category

languagestring required

Template language code (e.g., en_US)

parameter_format'POSITIONAL' | 'NAMED' | 'positional' | 'named'

Variable style: POSITIONAL ({{1}}, the default) or NAMED ({{customer_name}}). Named templates provide examples via body_text_named_params / header_text_named_params. Inferred as NAMED when omitted but a named-params example is present.

library_template_namestring

Name of a pre-built template from Meta's template library (e.g., "appointment_reminder", "auto_pay_reminder_1", "address_update"). When provided, the template is pre-approved by Meta with no review wait. Omit components when using this field.

library_template_body_inputsobject

Optional body customizations for library templates. Available options depend on the template (e.g., add_contact_number, add_learn_more_link, add_security_recommendation, add_track_package_link, code_expiration_minutes).

Response

Template created (pre-approved for library templates, pending review for custom)

successboolean