Create or update message template
Create a new WhatsApp message template, or update an existing one.
- Omit
hsm_idto create a new template. - Include
hsm_idas a query parameter to update an existing template.
Templates must be approved by WhatsApp before they can be used. After creation, templates enter a PENDING state until reviewed.
Side effect: Enqueues a template sync job on success to update Kapso’s local template cache.
Authorizations
Query Parameters
Body
Request body for template creation or update.
- For create requests,
name,language,category, andcomponentsare required. - For update requests, include
hsm_idin the query string and provide the fields you want to change.
Format for template parameters (defaults to POSITIONAL if omitted).
NAMED: Parameters use unique names wrapped in double curly brackets (e.g., {{first_name}}, {{order_number}}). Values can appear in any order in send payloads.
POSITIONAL: Parameters use ordered array indices starting from 1 (e.g., {{1}}, {{2}}). Values must appear in order in send payloads.
NAMED, POSITIONAL "NAMED"
Template components. Supported types:
HEADER - Optional component at top. Formats: TEXT (1 param), IMAGE, VIDEO, DOCUMENT, LOCATION
BODY - Required text component. Supports multiple parameters (positional or named)
FOOTER - Optional text-only component. No parameters supported
BUTTONS - Optional interactive components. Types: QUICK_REPLY (10 max), PHONE_NUMBER (1 max), URL (2 max), COPY_CODE (1 max), OTP, CATALOG, MPM, FLOW

