---
title: "Whatsapp Create Template"
method: POST
path: "/integrations/whatsapp/{connection_id}/templates"
tags: ["whatsapp"]
---

# Whatsapp Create Template

`POST /integrations/whatsapp/{connection_id}/templates`

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.

## Path parameters

- `connection_id` string, required

## Request body

- WhatsAppTemplateCreateRequest — A template submission, passed through to Meta close to verbatim. Only structurally-required checks happen here. Meta owns the authoring rules (name casing, variable numbering and placement, category fit) and returns specific, actionable errors for them — a partial local validator would reject payloads Meta would have accepted.
  - `name` string, required — Template name. Meta requires lowercase letters, digits and underscores, and it must be unique on the WABA.
  - `language` string — Meta language code, e.g. en_US or es_MX.
  - `category` string, required — MARKETING, UTILITY, or AUTHENTICATION. Meta may recategorize based on the content.
  - `parameter_format` string, 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.
  - `components` object[], 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_name` string, 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_inputs` object[], 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_inputs` object, 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"}.

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/agentphone/apis/agentphone-api.md) · [All operations](https://skmtc.net/agentphone/apis/agentphone-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/agentphone/agentphone-api/revisions/99a2d19dd0fd/schema)
